source: trunk/grails-app/views/wizard/pages/_events.gsp @ 213

Last change on this file since 213 was 213, checked in by duh, 10 years ago
  • restructured wizard
  • added information boxes
  • improved error feedback (highlighted error fields)
  • added confirmation page
  • several smaller bugfixes and improvements
File size: 3.0 KB
Line 
1<%
2/**
3 * Events page
4 *
5 * @author  Jeroen Wesbeek
6 * @since   20100212
7 * @package wizard
8 * @see     dbnp.studycapturing.WizardTagLib::previousNext
9 * @see     dbnp.studycapturing.WizardController
10 *
11 * Revision information:
12 * $Rev$
13 * $Author$
14 * $Date$
15 */
16%>
17<wizard:pageContent>
18        <span class="info">
19                <span class="title">Define all events and their duration that occur in your study</span>
20                In the previous screen you defined the unique event types, in this screen you need to define
21                all events of a specific event type that occur in time. Select the type of event, and the
22                start and stop time of an event. As it is frequently the case that <i>sets</i> of events act
23                upon (groups of) subjects, you can define event groups, and add events to a particular group.<br/>
24                <i>Note that you can edit multiple events at once by selecting multpiple rows by either
25                ctrl-clicking them or dragging a selection over them.</i>
26        </span>
27
28        <wizard:selectElement name="eventDescription" description="Event Description" error="eventDescription" from="${eventDescriptions}" value="${values?.eventDescription}">
29                The event description for this event
30        </wizard:selectElement>
31        <wizard:timeElement name="startTime" description="Start Time" error="startTime" value="${values?.startTime}">
32                The start time of the study
33        </wizard:timeElement>
34        <wizard:timeElement name="endTime" description="End time" error="endTimee" value="${values?.endTime}">
35                The end time of the study
36        </wizard:timeElement>
37        <wizard:buttonElement name="add" value="Add" url="[controller:'wizard',action:'pages']" update="[success:'wizardPage',failure:'wizardError']" afterSuccess="onWizardPage()"/>
38<g:if test="${events}"> 
39        <div class="table">
40                <div class="header">
41                        <div class="firstColumn">#</div>
42                        <div class="column">eventDescription</div>
43                        <div class="column">startTime</div>
44                        <div class="column">endTime</div>
45                        <div class="column">duration</div>
46                        <g:if test="${eventGroups}"><g:each var="eventGroup" status="i" in="${eventGroups}">
47                        <div class="column"><g:textField name="eventGroup_${i}_name" value="${eventGroup.name}" /></div>
48                        </g:each></g:if>
49                        <div class="column"><wizard:ajaxButton name="addEventGroup" value="+" url="[controller:'wizard',action:'pages']" update="[success:'wizardPage',failure:'wizardError']" afterSuccess="onWizardPage()" /></div>
50                </div>
51        <g:each var="event" status="i" in="${events}">
52                <div class="row">
53                        <div class="firstColumn">${i+1}</div>
54                        <div class="column">${event.eventDescription}</div>
55                        <div class="column"><g:formatDate format="dd/MM/yyyy hh:mm" date="${event.startTime}" /></div>
56                        <div class="column"><g:formatDate format="dd/MM/yyyy hh:mm" date="${event.endTime}" /></div>
57                        <div class="column">${event.getShortDuration()}</div>
58                        <g:if test="${eventGroups}"><g:each var="eventGroup" status="j" in="${eventGroups}">
59                        <div class="column"><input type="checkbox" name="event_${i}_group_${j}"/></div>
60                        </g:each></g:if>
61                        <div class="column"></div>
62                </div>
63        </g:each>
64        </div>
65</g:if>
66</wizard:pageContent>
Note: See TracBrowser for help on using the repository browser.