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: 959 $ |
---|
13 | * $Author: j.a.m.wesbeek@umail.leidenuniv.nl $ |
---|
14 | * $Date: 2010-10-20 19:13:14 +0000 (wo, 20 okt 2010) $ |
---|
15 | */ |
---|
16 | %> |
---|
17 | <wizard:pageContent> |
---|
18 | <span class="info"> |
---|
19 | <span class="title">Add subjects to your study</span> |
---|
20 | Describe the subjects studied with all details available. Use the template that contains the necessary fields. New templates can be defined (based on existing templates). |
---|
21 | To add subjects to the study, select the correct species and template, input the number of subjects you want to add, and click 'Add'. They will appear below the 'Add' button. |
---|
22 | As multiple species may be studied within one study, there is no hard link between the template and the species. |
---|
23 | <br/><i>Note that you can edit multiple subjects at once by selecting multiple rows by either ctrl-clicking them or dragging a selection over them in the space between the fields.</i> |
---|
24 | <br/><i>Note that depending on the size of your browser window and the template, additional fields can be reached by the slider at the bottom of the page.</i> |
---|
25 | </span> |
---|
26 | |
---|
27 | <wizard:textFieldElement name="addNumber" description="Number of subjects to add" error="addNumber" value="${values?.addNumber}" size="4" maxlength="4"> |
---|
28 | The number of subjects to add to your study |
---|
29 | </wizard:textFieldElement> |
---|
30 | <wizard:termElement name="species" description="of species" value="${values?.species}" ontologies="1132" addDummy="true"> |
---|
31 | The species of the subjects you would like to add to your study |
---|
32 | </wizard:termElement> |
---|
33 | <wizard:templateElement name="template" description="with template" value="${values?.template}" error="template" entity="${dbnp.studycapturing.Subject}" ontologies="1132" addDummy="true"> |
---|
34 | The template to use for these subjects |
---|
35 | </wizard:templateElement> |
---|
36 | <wizard:ajaxButtonElement name="add" value="Add" url="[controller:'wizard',action:'pages']" update="[success:'wizardPage',failure:'wizardError']" afterSuccess="onWizardPage()"> |
---|
37 | </wizard:ajaxButtonElement> |
---|
38 | |
---|
39 | <g:if test="${study.subjects}"> |
---|
40 | <g:each var="template" in="${study.giveSubjectTemplates()}"> |
---|
41 | <g:set var="showHeader" value="${true}" /> |
---|
42 | <h1>${template} template</h1> |
---|
43 | <div class="sliderContainer"> |
---|
44 | <div class="slider" ></div> |
---|
45 | </div> |
---|
46 | <div class="table"> |
---|
47 | <g:each var="subject" status="s" in="${study.giveSubjectsForTemplate(template)}"> |
---|
48 | <g:if test="${showHeader}"> |
---|
49 | <g:set var="showHeader" value="${false}" /> |
---|
50 | <div class="header"> |
---|
51 | <div class="firstColumn">#</div> |
---|
52 | <div class="firstColumn"></div> |
---|
53 | <wizard:templateColumnHeaders class="column" entity="${subject}" /> |
---|
54 | </div> |
---|
55 | </g:if> |
---|
56 | <div class="row"> |
---|
57 | <div class="firstColumn">${subject.getIdentifier()}</div> |
---|
58 | <div class="firstColumn"> |
---|
59 | <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(${subject.getIdentifier()});" afterSuccess="onWizardPage()" /> |
---|
60 | </div> |
---|
61 | <wizard:templateColumns class="column" entity="${subject}" name="subject_${subject.getIdentifier()}" /> |
---|
62 | </div> |
---|
63 | </g:each> |
---|
64 | </div> |
---|
65 | <div class="sliderContainer"> |
---|
66 | <div class="slider" ></div> |
---|
67 | </div> |
---|
68 | </g:each> |
---|
69 | </g:if> |
---|
70 | |
---|
71 | </wizard:pageContent> |
---|