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

Last change on this file since 238 was 238, checked in by duh, 14 years ago

Refectored version of the wizard

  • initial template page has been removed, now is a generic 'start' page where one (in the future) may create a new study, or load and modify an already stored study
  • study page incorporates study template select element, but does not yet incorporate the study template fields
  • subjects page now allows creation of subjects based on a template. This change also implied the study page altogether had to change into a seperate table entity. Now the the page lists as many tables as unique templates have been selected. These tables contain all subjects that were added using that particular template. NOTE: data is not stored yet, due to the fact that templateEntity does not work properly yey (key/value pairs need to be set correctly when calling the setTemplate method)
  • the JavaScript? now handles multiple tables in a page as well, and automatically initializes any underlying slider div if that is required
  • Property svn:keywords set to Rev Author Date
File size: 2.5 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: 238 $
13 * $Author: duh $
14 * $Date: 2010-03-05 14:21:52 +0000 (vr, 05 mrt 2010) $
15 */
16%>
17<wizard:pageContent>
18        <span class="info">
19                <span class="title">Add subjects to your study</span>
20                Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce laoreet leo nec leo vehicula quis scelerisque elit pulvinar. Vivamus arcu dui, adipiscing eu vestibulum id, consectetur et erat. Aenean risus mauris, placerat et lacinia vulputate, commodo eget ligula. Pellentesque ornare blandit metus ac dictum. Donec scelerisque feugiat quam, a congue ipsum malesuada nec. Donec vulputate, diam eget porta rhoncus, est mauris ullamcorper turpis, vitae dictum risus justo quis justo. Aenean blandit feugiat accumsan. Donec porttitor bibendum elementum.
21        </span>
22
23        <wizard:ajaxButton name="add" value="Add" url="[controller:'wizard',action:'pages']" update="[success:'wizardPage',failure:'wizardError']" afterSuccess="onWizardPage()" />
24        <input name="addNumber" size="4" maxlength="4" value="1">
25        subjects of species
26        <wizard:speciesSelect name="addSpecies" />
27        using the
28        <wizard:templateSelect name="template" description="Template" value="${study?.template}" entity="${dbnp.studycapturing.Subject}" />
29        template
30
31<g:if test="${subjects}">
32        <g:each var="subjectTemplate" in="${subjectTemplates}">
33                <h1>${subjectTemplate.getValue().name} template</h1>
34                <div class="table">
35                        <div class="header">
36                                <div class="firstColumn">#</div>
37                                <div class="column">name</div>
38                                <div class="column">species</div>
39                                <wizard:templateColumnHeaders template="${subjectTemplate.getValue().template}" class="column" />
40                        </div> 
41                <g:each var="subjectId" in="${subjectTemplate.getValue().subjects}">
42                        <div class="row">
43                                <div class="firstColumn">${subjectId}</div>
44                                <div class="column"><g:textField name="subject_${subjectId}_name" value="${subjects[ subjectId ].name}" size="12" maxlength="12" /></div>
45                                <div class="column">
46                                        <wizard:speciesSelect value="${subjects[ subjectId ].species}" name="subject_${subjectId}_species" />
47                                </div>
48                                <wizard:templateColumns id="${subjectId}" template="${subjects[ subjectId ].template}" name="subject_${subjectId}" class="column" subject="${subjects[ subjectId ]}" />                         
49                        </div>
50                </g:each>
51                </div>
52                <div class="sliderContainer">
53                        <div class="slider" ></div>
54                </div>
55        </g:each>
56</g:if>
57
58</wizard:pageContent>
Note: See TracBrowser for help on using the repository browser.