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

Last change on this file since 349 was 349, checked in by duh, 9 years ago
  • added more templates to bootstrap
  • added a 300ms delay to ontology-chooser
  • refactored wizard subject page's "add subjects" dialogue (not working yet!) to incorporate an ontology field instead of a term select... this has to change though...
  • added template elements to tag library (ajaxButtonField and ontologyField)
  • minified ontology-chooser javascript
  • minified wizard.css
  • Property svn:keywords set to Date Rev Author
File size: 3.6 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: 349 $
13 * $Author: duh $
14 * $Date: 2010-04-19 11:05:48 +0000 (ma, 19 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: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                <h1>${subjectTemplate.getValue().name} template</h1>
41                <div class="table">
42                        <div class="header">
43                                <div class="firstColumn">#</div>
44                                <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" />
48                        </div> 
49                <g:each var="subjectId" in="${subjectTemplate.getValue().subjects}">
50                        <div class="row">
51                                <div class="firstColumn">${subjectId + 1}</div>
52                                <div class="firstColumn">
53                                        <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()" />
54                                </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:speciesSelect value="${subjects[ subjectId ].species}" name="subject_${subjectId}_species" />
58                                </div>
59                                <wizard:templateColumns id="${subjectId}" template="${subjects[ subjectId ].template}" name="subject_${subjectId}" class="column" subject="${subjects[ subjectId ]}" />                         
60                        </div>
61                </g:each>
62                </div>
63                <div class="sliderContainer">
64                        <div class="slider" ></div>
65                </div>
66        </g:each>
67</g:if>
68
69        <g:if env="development">
70        <span class="info">
71                <span class="known">Known issues</span>
72                <ul>
73                        <li>autocomplete fields (like ontologies) deselect the selected rows and hence don't replicate</li>
74                        <li>ontology fields should replicate value <i>and</i> hidden fields</li>
75                        <li>ontology hidden fields should be processed by the back-end as well (not yet implemented)</li>
76                        <li>ontology fields now show suggestions for <i>all</i> available ontologies. This has to be narrowed down in the future.</li>
77                        <li>ontology hidden fields should be handled by the taglibrary / controller as well</li>
78                </ul>
79        </span>
80        </g:if>
81
82</wizard:pageContent>
Note: See TracBrowser for help on using the repository browser.