Changeset 396 for trunk/grails-app/views


Ignore:
Timestamp:
May 7, 2010, 2:24:27 PM (12 years ago)
Author:
duh
Message:
  • fixed incomplete implementation of domain fields (getters, setters and constrains logic were all not implemented correctly)
  • refactored wizards pages
  • TODO: constraints on (templated) domain fields are not working anymore, this needs to be implemented properly in TemplateEntity?
Location:
trunk/grails-app/views/wizard/pages
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/wizard/pages/_study.gsp

    r389 r396  
    2525                The template to use for this study
    2626        </wizard:templateElement>
    27         <wizard:textFieldElement name="title" description="Title" error="title" value="${study?.title}">
    28                 The title of the study you are creating
    29         </wizard:textFieldElement>
    30         <wizard:dateElement name="startDate" description="Start date" error="startDate" value="${study?.startDate}">
    31                 The start date of the study
    32         </wizard:dateElement>
    3327        <g:if test="${study}"><wizard:templateElements entity="${study}" /></g:if>
    3428</wizard:pageContent>
  • trunk/grails-app/views/wizard/pages/_subjects.gsp

    r383 r396  
    3838<g:if test="${subjects}">
    3939        <g:each var="subjectTemplate" in="${subjectTemplates}">
     40                <g:set var="showHeader" value="${true}" />
    4041                <h1>${subjectTemplate.getValue().name} template</h1>
    4142                <div class="table">
     43                <g:each var="subjectId" in="${subjectTemplate.getValue().subjects}">
     44                        <g:if test="${showHeader}">
     45                        <g:set var="showHeader" value="${false}" />
    4246                        <div class="header">
    4347                                <div class="firstColumn">#</div>
    4448                                <div class="firstColumn"></div>
    45                                 <div class="column">name</div>
    46                                 <div class="column">species</div>
    47                                 <wizard:templateColumnHeaders template="${subjectTemplate.getValue().template}" class="column" />
     49                                <wizard:templateColumnHeaders entity="${subjects[ subjectId ]}" class="column" />                               
    4850                        </div>
    49                 <g:each var="subjectId" in="${subjectTemplate.getValue().subjects}">
     51                        </g:if>
    5052                        <div class="row">
    5153                                <div class="firstColumn">${subjectId + 1}</div>
     
    5355                                        <wizard:ajaxButton name="delete" src="../images/icons/famfamfam/delete.png" alt="delete this subject" class="famfamfam" value="-" url="[controller:'wizard',action:'pages']" update="[success:'wizardPage',failure:'wizardError']" before="\$(\'input[name=do]\').val(${subjectId});" afterSuccess="onWizardPage()" />
    5456                                </div>
    55                                 <div class="column"><g:textField name="subject_${subjectId}_name" value="${subjects[ subjectId ].name}" size="12" maxlength="12" /></div>
    56                                 <div class="column">
    57                                         <wizard:termSelect value="${subjects[ subjectId ].species}" name="subject_${subjectId}_species" ontology="1132" />
    58                                 </div>
    59                                 <wizard:templateColumns id="${subjectId}" entity="${subjects[ subjectId ]}" template="${subjects[ subjectId ].template}" name="subject_${subjectId}" class="column" subject="${subjects[ subjectId ]}" />                               
     57                                <wizard:templateColumns id="${subjectId}" entity="${subjects[ subjectId ]}" template="${subjects[ subjectId ].template}" name="subject_${subjectId}" class="column" subject="${subjects[ subjectId ]}" />
    6058                        </div>
    6159                </g:each>
Note: See TracChangeset for help on using the changeset viewer.