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

Last change on this file since 216 was 216, checked in by duh, 12 years ago
  • event grouping data is now handled properly
  • added image support to ajaxButton which now renders to an "input type='image'" instead of the default "input type='button'"
  • changed some in grouping to famfamfam icons
  • evenGroup deletions
  • eventGroup names are now uniquely generated
  • improved CSS
  • improved javascript
File size: 3.6 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">
48                                <g:textField name="eventGroup_${i}_name" value="${eventGroup.name}" />
49                                <wizard:ajaxButton name="deleteEventGroup" src="../images/icons/famfamfam/delete.png" alt="delete this eventgroup" class="famfamfam" value="-" url="[controller:'wizard',action:'pages']" update="[success:'wizardPage',failure:'wizardError']" before="\$(\'input[name=do]\').val(${i});" afterSuccess="onWizardPage()" />
50                        </div>
51                        </g:each></g:if>
52                        <div class="column">
53                                <wizard:ajaxButton name="addEventGroup" src="../images/icons/famfamfam/add.png" alt="add a new eventgroup" class="famfamfam" value="+" url="[controller:'wizard',action:'pages']" update="[success:'wizardPage',failure:'wizardError']" afterSuccess="onWizardPage()" />
54                        </div>
55                </div>
56        <g:each var="event" status="i" in="${events}">
57                <div class="row">
58                        <div class="firstColumn">${i+1}</div>
59                        <div class="column">${event.eventDescription}</div>
60                        <div class="column"><g:formatDate format="dd/MM/yyyy hh:mm" date="${event.startTime}" /></div>
61                        <div class="column"><g:formatDate format="dd/MM/yyyy hh:mm" date="${event.endTime}" /></div>
62                        <div class="column">${event.getShortDuration()}</div>
63                        <g:if test="${eventGroups}"><g:each var="eventGroup" status="j" in="${eventGroups}">
64                        <div class="column">
65                                <g:if test="${eventGroup.events.find{ it == event} }">
66                                        <input type="checkbox" name="event_${i}_group_${j}" checked="checked" />
67                                </g:if><g:else>
68                                        <input type="checkbox" name="event_${i}_group_${j}"/>
69                                </g:else>
70                        </div>
71                        </g:each></g:if>
72                        <div class="column"></div>
73                </div>
74        </g:each>
75        </div>
76        <div class="sliderContainer">
77                <div class="slider"/>
78        </div>
79</g:if>
80</wizard:pageContent>
Note: See TracBrowser for help on using the repository browser.