root/trunk/grails-app/views/wizard/pages/_events.gsp @ 262

Revision 262, 4.2 KB (checked in by duh, 4 years ago)

- some bug fixes, improvements and comments

  • Property svn:keywords set to Author Rev Date
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="firstColumn"></div>
43                        <div class="column">eventDescription</div>
44                        <div class="column">startTime</div>
45                        <div class="column">endTime</div>
46                        <div class="column">duration</div>
47                        <g:if test="${eventGroups}"><g:each var="eventGroup" status="i" in="${eventGroups}">
48                        <div class="column">
49                                <g:textField name="eventGroup_${i}_name" value="${eventGroup.name}" />
50                                <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()" />
51                        </div>
52                        </g:each></g:if>
53                        <div class="column">
54                                <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()" />
55                        </div>
56                </div>
57        <g:each var="event" status="i" in="${events}">
58                <div class="row">
59                        <div class="firstColumn">${i+1}</div>
60                        <div class="firstColumn">
61                                <wizard:ajaxButton name="deleteEvent" src="../images/icons/famfamfam/delete.png" alt="delete this event" class="famfamfam" value="-" url="[controller:'wizard',action:'pages']" update="[success:'wizardPage',failure:'wizardError']" before="\$(\'input[name=do]\').val(${i});" afterSuccess="onWizardPage()" />                               
62                        </div>
63                        <div class="column">${event.eventDescription}</div>
64                        <div class="column"><g:formatDate format="dd/MM/yyyy hh:mm" date="${event.startTime}" /></div>
65                        <div class="column"><g:formatDate format="dd/MM/yyyy hh:mm" date="${event.endTime}" /></div>
66                        <div class="column">${event.getShortDuration()}</div>
67                        <g:if test="${eventGroups}"><g:each var="eventGroup" status="j" in="${eventGroups}">
68                        <div class="column">
69                                <g:if test="${eventGroup.events.find{ it == event} }">
70                                        <input type="checkbox" name="event_${i}_group_${j}" checked="checked" />
71                                </g:if><g:else>
72                                        <input type="checkbox" name="event_${i}_group_${j}"/>
73                                </g:else>
74                        </div>
75                        </g:each></g:if>
76                        <div class="column"></div>
77                </div>
78        </g:each>
79        </div>
80        <div class="sliderContainer">
81                <div class="slider"/>
82        </div>
83</g:if>
84
85        <span class="info">
86                <span class="todo">TODO</span>
87                <ul>
88                        <li>parameter values should still be asked and implemented</li>
89                </ul>
90        </span>
91</wizard:pageContent>
Note: See TracBrowser for help on using the browser.