source: trunk/grails-app/views/wizard/pages/_subjects.gsp @ 342

Last change on this file since 342 was 342, checked in by duh, 14 years ago
  • restyled wizard tabs
  • made info and todo boxes only appear in development, not in production and test
  • Property svn:keywords set to Date Rev Author
File size: 3.3 KB
Line 
1<%
2/**
3 * Subjects page
4 *
5 * @author  Jeroen Wesbeek
6 * @since   20100113
7 * @package wizard
8 * @see     dbnp.studycapturing.WizardTagLib::previousNext
9 * @see     dbnp.studycapturing.WizardController
10 *
11 * Revision information:
12 * $Rev: 342 $
13 * $Author: duh $
14 * $Date: 2010-04-14 13:38:39 +0000 (wo, 14 apr 2010) $
15 */
16%>
17<wizard:pageContent>
18        <span class="info">
19                <span class="title">Add subjects to your study</span>
20                In this screen you can add subjects to your study based on a given template. Note that the 'species' select will probably
21                move to the template as an ontology reference and will not be asked anymore.<br/>
22                <i>Note that you can edit multiple subjects at once by selecting multpiple rows by either ctrl-clicking them or dragging a selection over them.</i>
23        </span>
24
25        <wizard:ajaxButton name="add" value="Add" url="[controller:'wizard',action:'pages']" update="[success:'wizardPage',failure:'wizardError']" afterSuccess="onWizardPage()" />
26        <input name="addNumber" size="4" maxlength="4" value="1">
27        subjects of species
28        <wizard:speciesSelect name="addSpecies" />
29        using the
30        <wizard:templateSelect name="template" description="Template" value="${study?.template}" entity="${dbnp.studycapturing.Subject}" />
31        template
32
33<g:if test="${subjects}">
34        <g:each var="subjectTemplate" in="${subjectTemplates}">
35                <h1>${subjectTemplate.getValue().name} template</h1>
36                <div class="table">
37                        <div class="header">
38                                <div class="firstColumn">#</div>
39                                <div class="firstColumn"></div>
40                                <div class="column">name</div>
41                                <div class="column">species</div>
42                                <wizard:templateColumnHeaders template="${subjectTemplate.getValue().template}" class="column" />
43                        </div> 
44                <g:each var="subjectId" in="${subjectTemplate.getValue().subjects}">
45                        <div class="row">
46                                <div class="firstColumn">${subjectId + 1}</div>
47                                <div class="firstColumn">
48                                        <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()" />
49                                </div>
50                                <div class="column"><g:textField name="subject_${subjectId}_name" value="${subjects[ subjectId ].name}" size="12" maxlength="12" /></div>
51                                <div class="column">
52                                        <wizard:speciesSelect value="${subjects[ subjectId ].species}" name="subject_${subjectId}_species" />
53                                </div>
54                                <wizard:templateColumns id="${subjectId}" template="${subjects[ subjectId ].template}" name="subject_${subjectId}" class="column" subject="${subjects[ subjectId ]}" />                         
55                        </div>
56                </g:each>
57                </div>
58                <div class="sliderContainer">
59                        <div class="slider" ></div>
60                </div>
61        </g:each>
62</g:if>
63
64        <g:if env="development">
65        <span class="info">
66                <span class="known">Known issues</span>
67                <ul>
68                        <li>autocomplete fields (like ontologies) deselect the selected rows and hence don't replicate</li>
69                        <li>ontology fields should replicate value <i>and</i> hidden fields</li>
70                        <li>ontology hidden fields should be processed by the back-end as well (not yet implemented)</li>
71                        <li>ontology fields now show suggestions for <i>all</i> available ontologies. This has to be narrowed down in the future.</li>
72                        <li>ontology hidden fields should be handled by the taglibrary / controller as well</li>
73                </ul>
74        </span>
75        </g:if>
76
77</wizard:pageContent>
Note: See TracBrowser for help on using the repository browser.