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: 418 $ |
---|
13 | * $Author: duh $ |
---|
14 | * $Date: 2010-05-17 09:56:00 +0000 (ma, 17 mei 2010) $ |
---|
15 | */ |
---|
16 | %> |
---|
17 | <wizard:pageContent> |
---|
18 | <span class="info"> |
---|
19 | <span class="title">Define all events that occur in your study</span> |
---|
20 | Bla bla bla we need a good help text here ;) |
---|
21 | </span> |
---|
22 | |
---|
23 | <wizard:templateElement name="template" description="Template" value="${event?.template}" entity="${dbnp.studycapturing.Event}" addDummy="true" ajaxOnChange="switchTemplate" url="[controller:'wizard',action:'pages']" update="[success:'wizardPage',failure:'wizardError']" afterSuccess="onWizardPage()" > |
---|
24 | The template to use for this study |
---|
25 | </wizard:templateElement> |
---|
26 | <g:if test="${event?.template}"><wizard:templateElements entity="${event}" /></g:if> |
---|
27 | <g:if test="${event?.template}"><wizard:buttonElement name="add" value="Add" url="[controller:'wizard',action:'pages']" update="[success:'wizardPage',failure:'wizardError']" afterSuccess="onWizardPage()"/></g:if> |
---|
28 | |
---|
29 | <g:if test="${events}"> |
---|
30 | <g:each var="eventTemplate" in="${eventTemplates}"> |
---|
31 | <g:set var="showHeader" value="${true}" /> |
---|
32 | <h1>${eventTemplate.getValue().name} template</h1> |
---|
33 | <div class="table"> |
---|
34 | <g:each var="eventId" in="${eventTemplate.getValue().events}"> |
---|
35 | <g:if test="${showHeader}"> |
---|
36 | <g:set var="showHeader" value="${false}" /> |
---|
37 | <div class="header"> |
---|
38 | <div class="firstColumn">#</div> |
---|
39 | <div class="firstColumn"></div> |
---|
40 | <wizard:templateColumnHeaders entity="${events[ eventId ]}" class="column"/> |
---|
41 | <g:if test="${eventGroups}"><g:each var="eventGroup" status="g" in="${eventGroups}"> |
---|
42 | <div class="column"> |
---|
43 | <g:textField name="eventGroup_${g}_name" value="${eventGroup.name}" /> |
---|
44 | <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(${g});" afterSuccess="onWizardPage()" /> |
---|
45 | </div> |
---|
46 | </g:each></g:if> |
---|
47 | <div class="column"> |
---|
48 | <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()" /> |
---|
49 | </div> |
---|
50 | </div> |
---|
51 | </g:if> |
---|
52 | <div class="row"> |
---|
53 | <div class="firstColumn">${eventId + 1}</div> |
---|
54 | <div class="firstColumn"> |
---|
55 | <wizard:ajaxButton name="deleteEvent" 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(${eventId});" afterSuccess="onWizardPage()"/> |
---|
56 | </div> |
---|
57 | <wizard:templateColumns id="${eventId}" entity="${events[ eventId ]}" template="${events[ eventId ].template}" name="event_${eventId}" class="column" /> |
---|
58 | <g:if test="${eventGroups}"><g:each var="eventGroup" status="j" in="${eventGroups}"> |
---|
59 | <div class="column"> |
---|
60 | <g:if test="${eventGroup.events.find{ it == events[ eventId ] } }"> |
---|
61 | <input type="checkbox" name="event_${eventId}_group_${j}" checked="checked" /> |
---|
62 | </g:if><g:else> |
---|
63 | <input type="checkbox" name="event_${eventId}_group_${j}"/> |
---|
64 | </g:else> |
---|
65 | </div> |
---|
66 | </g:each></g:if> |
---|
67 | <div class="column"></div> |
---|
68 | </div> |
---|
69 | </g:each> |
---|
70 | </div> |
---|
71 | <div class="sliderContainer"> |
---|
72 | <div class="slider"></div> |
---|
73 | </div> |
---|
74 | </g:each> |
---|
75 | </g:if> |
---|
76 | |
---|
77 | </wizard:pageContent> |
---|