Changeset 389 for trunk/grails-app/views


Ignore:
Timestamp:
Apr 28, 2010, 4:28:39 PM (12 years ago)
Author:
duh
Message:
  • reverted changes of revisions 386, 387 and 388 as they completely broke the repository (you need to get cake now! ;)
  • committed development version of modified study capture wizard (works until events)
Location:
trunk/grails-app/views
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/sandbox/index.gsp

    r386 r389  
    3737                <td>Type</td>
    3838        </tr>
     39        <g:each in="${subject.giveDomainFields()}" var="field">
     40            <tr>
     41                    <td>Domain field</td>
     42                        <td>${field.key}</td>
     43                         <td>${field.value}</td>
     44                </tr>
     45        </g:each>
    3946        <g:each in="${subject.giveFields()}" var="field">
    4047            <tr>
  • trunk/grails-app/views/study/list.gsp

    r386 r389  
    55    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    66    <meta name="layout" content="main" />
    7     <g:set var="entityName" value="${message(code: 'study.label', default: 'Study')}" />
    8     <title><g:message code="default.list.label" args="[entityName]" /></title>
     7  <g:set var="entityName" value="${message(code: 'study.label', default: 'Study')}" />
     8  <title><g:message code="default.list.label" args="[entityName]" /></title>
    99</head>
    1010<body>
     
    1212  <g:form action="list_extended">
    1313
     14  <div class="nav">
     15    <span class="menuButton"><a class="home" href="${createLink(uri: '/')}">Home</a></span>
     16    <span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span>
     17  </div>
    1418  <div class="body">
    1519    <h1><g:message code="default.list.label" args="[entityName]" /></h1>
     
    1822    </g:if>
    1923
    20     <div class="list">
    21       <table>
    22           <thead>
    23               <tr>
    24                   <th></th>
    25                   <g:sortableColumn property="title" title="${message(code: 'study.title.label', default: 'Title')}" />
    26                   <th>Subjects</th>
    27                   <th>Events</th>
    28                   <th>Assays</th>
    29               </tr>
    30           </thead>
    31           <tbody>
    32           <g:each in="${studyInstanceList}" var="studyInstance" status="i" >
    33               <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
     24      <g:each in="${studyInstanceList}" var="studyInstance">
     25        <br>
     26        <table>
     27          <tr>
     28            <td width="50"></td>
     29            <td colspan="3">
     30              <center><b>${studyInstance.title}</b></center>
     31            </td>
     32          </tr>
     33          <tr>
     34            <td>
    3435
    35                   <td><input type="checkbox" name="${studyInstance.title}" id="${studyInstance.title}"></td>
     36              <input type="checkbox" name="${studyInstance.title}" id="${studyInstance.title}"></td>
    3637
    37                   <td><g:link action="show" id="${studyInstance.id}">${fieldValue(bean: studyInstance, field: "title")}</g:link></td>
     38            <td width="150">
     39          <g:link action="show" id="${studyInstance.id}">
     40${message(code: 'study.id.label', default: 'Id')} :
     41${fieldValue(bean: studyInstance, field: "id")}</g:link></td>
    3842
    39                   <td>
    40                     <g:if test="${studyInstance.subjects.species.size()==0}">
    41                       -
    42                     </g:if>
    43                     <g:else>
    44                       <g:each in="${studyInstance.subjects.species.unique()}" var="currentSpecies" status="j">
    45                         <g:if test="${j > 0}">, </g:if>
    46                         <%= studyInstance.subjects.findAll { return it.species == currentSpecies; }.size() %>
    47                         ${currentSpecies}
    48                       </g:each>
    49                     </g:else>
    50                   </td>
     43        <td width="300">
     44<b>${message(code: 'study.template.label', default: 'Template')} </b>:
     45${fieldValue(bean: studyInstance, field: "template")}</td>
    5146
    52                   <td>
    53                     <g:if test="${studyInstance.giveEventTemplates().size()==0}">
    54                       -
    55                     </g:if>
    56                     <g:else>
    57                       ${studyInstance.giveEventTemplates().name.join( ', ' )}
    58                     </g:else>
    59                   </td>
     47<td >
     48<b>${message(code: 'study.subjects.label', default: 'Subjects')} </b>:
     49${studyInstance.subjects.size()} subjects</td>
    6050
    61                   <td>
    62                     <g:if test="${studyInstance.assays.size()==0}">
    63                       -
    64                     </g:if>
    65                     <g:else>
    66                       ${studyInstance.assays.module.platform.unique().join( ', ' )}
    67                     </g:else>
    68                   </td>
     51        </tr>
     52        <tr>
     53          <td></td>
     54          <td >
     55<b>${message(code: 'study.owner.label', default: 'Owner')} </b>:
     56${fieldValue(bean: studyInstance, field: "owner")}</td>
    6957
    70               </tr>
     58          <td >
     59<b>Assays </b>:
     60        <g:each in="${studyInstance.assays}" var="assay">
     61          ${assay.name}
     62        </g:each>
     63          </td>
     64
     65          <td><b> Samples </b>:
     66          <g:each in="${studyInstance.assays.samples}" var="samples">
     67          ${samples.name}
    7168          </g:each>
    72           </tbody>
    73       </table>
    74     </div>
    75     <div class="buttons">
    76         <span class="button"><g:link controller="wizard" class="create" action="index"><g:message code="default.new.label" args="[entityName]" /></g:link></span>
    77     </div>
     69          </td>
     70
     71
     72        </tr>
     73        <g:if test="${studyInstance.fieldExists( 'Description' )}">
     74        <tr>
     75          <td></td>
     76          <td colspan="3">
     77            <b>${message(code: 'study.description.label', default: 'Description')} </b>:
     78            ${studyInstance.getFieldValue( 'Description' )}
     79           
     80          </td>
     81        </tr>
     82        </g:if>
     83        </table>
     84      </g:each>
     85   
    7886    <div class="paginateButtons">
    79         <g:paginate total="${studyInstanceTotal}" prev="&laquo; Previous" next="&raquo; Next" />
    80         <br>
    81         <INPUT TYPE=submit name=submit Value="Compare selected studies">
     87      <g:paginate total="${studyInstanceTotal}" />
     88      <br>
     89      <INPUT TYPE=submit name=submit Value="Compare selected studies">
    8290    </div>
    8391  </div>
  • trunk/grails-app/views/study/show.gsp

    r386 r389  
    4949            </g:if>
    5050            <g:else>
    51               ${studyInstance.giveEventTemplates().name}
     51             ${studyInstance.giveEventTemplates().name}
    5252            </g:else>
    5353          <br>
  • trunk/grails-app/views/wizard/pages/_events.gsp

    r383 r389  
    1717<wizard:pageContent>
    1818        <span class="info">
    19                 <span class="title">Define all events and their duration that occur in your study</span>
    20                 In the previous screen you defined the unique event types, in this screen you need to define
    21                 all events of a specific event type that occur in time. Select the type of event, and the
    22                 start and stop time of an event. As it is frequently the case that <i>sets</i> of events act
    23                 upon (groups of) subjects, you can define event groups, and add events to a particular group.<br/>
    24                 <i>Note that you can edit multiple events at once by selecting multpiple rows by either
    25                 ctrl-clicking them or dragging a selection over them.</i>
     19                <span class="title">Define all events that occur in your study</span>
     20                Bla bla bla we need a good help text here ;)
    2621        </span>
    2722
    28         <wizard:templateElement name="template" description="Template" value="${values?.template}" entity="${dbnp.studycapturing.Event}" addDummy="true" >
     23        <wizard:templateElement name="template" description="Template" value="${event?.template}" entity="${dbnp.studycapturing.Event}" addDummy="true" ajaxOnChange="switchTemplate" url="[controller:'wizard',action:'pages']" update="[success:'wizardPage',failure:'wizardError']" afterSuccess="onWizardPage()" >
    2924                The template to use for this study
    3025        </wizard:templateElement>
    31         <wizard:timeElement name="startTime" description="Start Time" error="startTime" value="${values?.startTime}">
    32                 The start time of the study
    33         </wizard:timeElement>
    34         <wizard:timeElement name="endTime" description="End time" error="endTimee" value="${values?.endTime}">
    35                 The end time of the study
    36         </wizard:timeElement>   
    37         <wizard:buttonElement name="add" value="Add" url="[controller:'wizard',action:'pages']" update="[success:'wizardPage',failure:'wizardError']" afterSuccess="onWizardPage()"/>
     26        <g:if test="${event?.template}"><wizard:templateElements entity="${event}" /></g:if>
     27        <g:if test="${event?.template}"><wizard:buttonElement name="add" value="Add" url="[controller:'wizard',action:'pages']" update="[success:'wizardPage',failure:'wizardError']" afterSuccess="onWizardPage()"/></g:if>
     28<% /*
    3829<g:if test="${events}">
    3930        <g:each var="event" status="i" in="${events}">
     
    4233                        <div class="firstColumn">#</div>
    4334                        <div class="firstColumn"></div>
    44                         <div class="column">start</div>
    45                         <div class="column">end</div>
    46                         <div class="column">duration</div>
     35                        <div class="column">Template</div>
    4736                        <wizard:templateColumnHeaders template="${event.template}" class="column" />
    4837                        <g:if test="${eventGroups}"><g:each var="eventGroup" status="g" in="${eventGroups}">
     
    6150                                <wizard:ajaxButton name="delete" src="../images/icons/famfamfam/delete.png" alt="delete this event" class="famfamfam" value="-" url="[controller:'wizard',action:'pages']" update="[success:'wizardPage',failure:'wizardError']" before="\$(\'input[name=do]\').val(${i});" afterSuccess="onWizardPage()" />
    6251                        </div>
    63                         <div class="column"><g:formatDate format="dd/MM/yyyy hh:mm" date="${event.startTime}" /></div>
    64                         <div class="column"><g:formatDate format="dd/MM/yyyy hh:mm" date="${event.endTime}" /></div>
    65                         <div class="column">${event.getShortDuration()}</div>
     52                        <div class="column">${event.template}</div>
    6653                        <wizard:templateColumns id="${i}" entity="${event}" template="${event.template}" name="event${i}" class="column" />
    6754                        <g:if test="${eventGroups}"><g:each var="eventGroup" status="j" in="${eventGroups}">
     
    7865        </div>
    7966        </g:each>
     67*/ %>
    8068<% /*
    8169        <div class="table">
     
    123111                <div class="slider"></div>
    124112        </div>
     113</g:if>
    125114 */ %>
    126 </g:if>
    127115       
    128116</wizard:pageContent>
  • trunk/grails-app/views/wizard/pages/_study.gsp

    r359 r389  
    3131                The start date of the study
    3232        </wizard:dateElement>
    33         <wizard:templateElements entity="${study}" />
    34 
     33        <g:if test="${study}"><wizard:templateElements entity="${study}" /></g:if>
    3534</wizard:pageContent>
Note: See TracChangeset for help on using the changeset viewer.