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

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