Changeset 1029 for trunk


Ignore:
Timestamp:
Nov 1, 2010, 1:17:38 PM (10 years ago)
Author:
robert@…
Message:

Compare templates view updated.

Location:
trunk/grails-app
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/dbnp/studycapturing/TemplateEditorController.groovy

    r1027 r1029  
    3434     */
    3535    def afterInterceptor = { model, modelAndView ->
    36       if ( params['standalone'] ) {
     36      if ( params['standalone'] && params['standalone'] == 'true') {
    3737        model.layout = 'main';
    3838        model.extraparams = [ 'standalone': 'true' ] ;
  • trunk/grails-app/views/common/_topnav.gsp

    r1000 r1029  
    1414        <li><g:link controller="simpleQuery" action="index">Search study data</g:link></li>
    1515      <li><g:link controller="exporter" action="index">Export as SimpleTox</g:link></li>
     16      </ul>
     17     </li>
     18        <li>
     19      <a href="#">Templates</a>
     20      <ul class="subnav">
     21        <li><g:link controller="templateEditor" action="study" params="${[standalone: true]}">Study templates</g:link></li>
     22        <li><g:link controller="templateEditor" action="subject" params="${[standalone: true]}">Subject templates</g:link></li>
     23        <li><g:link controller="templateEditor" action="event" params="${[standalone: true]}">Event templates</g:link></li>
     24        <li><g:link controller="templateEditor" action="samplingEvent" params="${[standalone: true]}">Sampling event templates</g:link></li>
     25        <li><g:link controller="templateEditor" action="sample" params="${[standalone: true]}">Sample templates</g:link></li>
     26        <li><g:link controller="templateEditor" action="assay" params="${[standalone: true]}">Assay templates</g:link></li>
    1627      </ul>
    1728     </li>
  • trunk/grails-app/views/templateEditor/compare.gsp

    r1027 r1029  
    4343        <body>
    4444          <h1>Template fields for templates of entity
    45 
    4645          <select onChange="location.href = '<g:createLink action="compare" params="${extraparams + [ extra: 'true' ]}" />&entity=' + $(this).val();">
    47                   <g:each in="${templateEntities}" var="entity">
    48                         <option <g:if test="${entity.name == humanReadableEntity}">selected</g:if> value="${entity.encoded}">${entity.name}</option>
     46                  <g:each in="${templateEntities}" var="ent">
     47                        <option <g:if test="${ent.entity == entity.toString().replaceAll(/^class /, '')}">selected</g:if> value="${ent.encoded}">${ent.name}</option>
    4948                  </g:each>
    5049          </select>
     
    7675                  <td>${field.required}</td>
    7776                  <g:each in="${templates}" var="currentTemplate">
    78                         <td><input type="checkbox" <g:if test="${currentTemplate.fields.contains(field)}">checked="checked"</g:if> readonly="readonly" disabled="disabled" /> </td>
     77                        <td style="text-align: center;" align="center">
     78                          <g:if test="${currentTemplate.fields.contains(field)}">
     79                                <img align="center" src="${createLinkTo( dir: 'images/icons', file: 'accept.png', plugin: 'famfamfam' )}" alt="X" />
     80                          </g:if>
     81                        </td>
    7982                  </g:each>
    8083                </tr>
  • trunk/grails-app/views/templateEditor/index.gsp

    r1027 r1029  
    3232                <div class="templateEditorStep" id="step1_template">
    3333                        <h3>Select template</h3>
    34                         <p>Showing templates for <b>${humanReadableEntity}</b>.</p>
     34                        <p>Showing templates for <b>${humanReadableEntity}</b> (<g:link controller="templateEditor" action="compare" params="${[entity: encryptedEntity] + extraparams}">compare</g:link>).</p>
    3535                        <p>Please select a template to edit or create a new template</p>
    3636
  • trunk/grails-app/views/templateEditor/template.gsp

    r1027 r1029  
    8484                <g:if test="${template}">
    8585                        <div class="templateEditorStep" id="step2_selectedFields">
    86                                 <h3 class="templateName">${template.name} (<a class="switch" href="${createLink(action:'index',params: extraparams + [ 'entity': encryptedEntity ])}">switch</a>)</h3>
     86                                <h3 class="templateName">${template.name} (<a class="switch" href="${createLink(action:'index',params: [ 'entity': encryptedEntity ] + extraparams )}">switch</a>)</h3>
    8787
    8888                                <p>Currently, this template contains the following fields. Drag fields to reorder. Drag fields to the list of available fields to remove the field from the template.</p>
Note: See TracChangeset for help on using the changeset viewer.