Ignore:
Timestamp:
Mar 24, 2010, 11:51:25 AM (13 years ago)
Author:
jahn
Message:

Added an actually non editable show. (Parameters script needs to be adapted, still.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/eventDescription/showMyProtocolFilled.gsp

    r299 r308  
    251251
    252252
    253 <tr class="prop">
    254     <td id='test'> Protocol </td>
    255 
    256     <% def protocols = dbnp.studycapturing.Protocol.list() %>
    257         <td>Name</td>
    258 </tr>
    259 <tr class="prop">
     253
     254<g:if test="${editable}">
     255<tbody name="protocolselector" >
     256
     257<tr>
     258    <td>Protocol </td>
     259
    260260    <td>
     261           <% def protocols = dbnp.studycapturing.Protocol.list() %>
    261262           <g:if test="${protocol==null}">
    262263               <g:select name="protocol" from="${protocols}" optionKey="id"   optionValue="name"  noSelection="['':'-- Select Protocol -- ']"
    263                    onchange= "${remoteFunction( action:'showProtocolParameters', update:'showProtocolParameters', params:'\'id=\'+this.value' )}; deleteHiddenDialogs();" />
    264            </g:if>
     264                   onchange= "${remoteFunction( action:'showProtocolParameters', update:'showProtocolParameters', params:'\'id=\'+this.value' )}; deleteHiddenDialogs();" />
     265           </g:if>
    265266
    266267           <g:else>
    267268               <g:select name="protocol" from="${protocols}" optionKey="id"   optionValue="name" value='${protocol.id}'
    268                    onchange= "${remoteFunction( action:'showProtocolParameters', update:'showProtocolParameters', params:'\'id=\'+this.value' )}; deleteHiddenDialogs();" />
     269                   onchange= "${remoteFunction( action:'showProtocolParameters', update:'showProtocolParameters', params:'\'id=\'+this.value' )}; deleteHiddenDialogs();" />
    269270           </g:else>
    270271    </td>
    271 
    272 
    273272</tr>
    274273
    275274
    276 
    277 <tr><td></td>
    278 <td>
    279 
    280 <table id="someId" >
    281 
    282 
    283 <thead>
    284     <tr class="prop">
     275</tbody>
     276</g:if>
     277
     278
     279
     280
     281
     282
     283<tr> <td colspan=2>
     284
     285    <table id="someId" >
     286    <thead>
     287        <tr class="prop">
    285288
    286289         <th valign="top" class="name" width=200>
     
    312315         </th>
    313316
    314     </tr>
    315 </thead>
    316 
    317 
    318 
    319 <tbody id="showProtocolParameters">
    320     <g:include action="showProtocolParameters" controller="eventDescription" id="${description.id} params="[protocol:protocol]" />
    321 </tbody>
    322 
    323 
    324 <tbody> <tr>
    325 <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td> <input type="button" value="Add Parameter" onclick="addRowEmpty('showProtocolParameters')"/> </td>
    326 </tr> </tbody>
    327 
    328 </table>
    329 
     317        </tr>
     318    </thead>
     319
     320
     321
     322    <tbody id="showProtocolParameters">
     323         <g:include action="showProtocolParameters" controller="eventDescription" id="${description.id} params="[protocol:protocol]" />
     324    </tbody>
     325
     326
     327    <g:if test="${editable}">
     328    <tbody>
     329        <tr>
     330             <td> </td> <td></td> <td></td> <td></td> <td></td> <td></td>
     331             <td> <input type="button" value="Add Parameter" onclick="addRowEmpty('showProtocolParameters')"/> </td>
     332        </tr>
     333    </tbody>
     334    </g:if>
     335
     336
     337
     338    </table>
    330339
    331340</td> </tr>
Note: See TracChangeset for help on using the changeset viewer.