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

Last change on this file since 399 was 399, checked in by duh, 9 years ago
  • changed term / ontology fields to select elements instead
  • todo: bootrstrap needs improvement as genotype and strain do not yet contain ontologies
  • Property svn:keywords set to Date Author Rev
File size: 3.4 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: 399 $
13 * $Author: duh $
14 * $Date: 2010-05-10 14:32:45 +0000 (ma, 10 mei 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:textFieldElement name="addNumber" description="Number of subjects to add" error="addNumber" value="1" size="4" maxlength="4">
26                The number of subjects to add to your study
27        </wizard:textFieldElement>
28        <wizard:termElement name="species" description="of species" value="" ontologies="1132">
29                The species of the subjects you would like to add to your study
30        </wizard:termElement>
31        <wizard:templateElement name="template" description="with template" value="" error="template" entity="${dbnp.studycapturing.Subject}" >
32                The template to use for this study
33        </wizard:templateElement>
34        <wizard:ajaxButtonElement name="add" value="Add" url="[controller:'wizard',action:'pages']" update="[success:'wizardPage',failure:'wizardError']" afterSuccess="onWizardPage()">
35        </wizard:ajaxButtonElement>
36
37
38<g:if test="${subjects}">
39        <g:each var="subjectTemplate" in="${subjectTemplates}">
40                <g:set var="showHeader" value="${true}" />
41                <h1>${subjectTemplate.getValue().name} template</h1>
42                <div class="table">
43                <g:each var="subjectId" in="${subjectTemplate.getValue().subjects}">
44                        <g:if test="${showHeader}">
45                        <g:set var="showHeader" value="${false}" />
46                        <div class="header">
47                                <div class="firstColumn">#</div>
48                                <div class="firstColumn"></div>
49                                <wizard:templateColumnHeaders entity="${subjects[ subjectId ]}" class="column" />                               
50                        </div>
51                        </g:if>
52                        <div class="row">
53                                <div class="firstColumn">${subjectId + 1}</div>
54                                <div class="firstColumn">
55                                        <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()" />
56                                </div>
57                                <wizard:templateColumns id="${subjectId}" entity="${subjects[ subjectId ]}" template="${subjects[ subjectId ].template}" name="subject_${subjectId}" class="column" subject="${subjects[ subjectId ]}" />
58                        </div>
59                </g:each>
60                </div>
61                <div class="sliderContainer">
62                        <div class="slider" ></div>
63                </div>
64        </g:each>
65</g:if>
66
67        <g:if env="development">
68        <span class="info">
69                <span class="known">Known issues</span>
70                <ul>
71                        <li>autocomplete fields (like ontologies) deselect the selected rows and hence don't replicate</li>
72                        <li>ontology fields should replicate value <i>and</i> hidden fields</li>
73                        <li>ontology hidden fields should be processed by the back-end as well (not yet implemented)</li>
74                        <li>ontology fields now show suggestions for <i>all</i> available ontologies. This has to be narrowed down in the future.</li>
75                        <li>ontology hidden fields should be handled by the taglibrary / controller as well</li>
76                </ul>
77        </span>
78        </g:if>
79
80</wizard:pageContent>
Note: See TracBrowser for help on using the repository browser.