source: trunk/grails-app/views/wizard/pages/_samples.gsp @ 635

Last change on this file since 635 was 635, checked in by duh, 13 years ago
  • development version of samples page

-- improved handeling of samples
-- added warning page after clicking 'previous' in samples page

  • fixed exceptions in deleting events
  • added debug button to events page to reset revents
  • changed events page to check for at least 1 sampling event instead of just 1 event (you need sampling events in order to have samples and groups later on)
  • Property svn:keywords set to Date Author Rev
File size: 3.6 KB
Line 
1<%
2/**
3 * Samples 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: 635 $
13 * $Author: duh $
14 * $Date: 2010-07-01 14:03:40 +0000 (do, 01 jul 2010) $
15 */
16%>
17<wizard:pageContent>
18
19<g:if env="production">
20
21        <span class="info">
22                <span class="title">Samples</span>
23                The sample input page is still under development and is not yet
24                production ready... We appologize for the inconvenience.
25        </span>
26
27</g:if><g:else>
28
29
30        <g:if env="development">
31                <wizard:ajaxButtonElement description="Development feature (regenerate samples)" name="regenerate" value="regenerate new samples" url="[controller:'wizard',action:'pages']" update="[success:'wizardPage',failure:'wizardError']" afterSuccess="onWizardPage()">
32                        This functionality is only available in development mode for debugging purposes and will not show in test and production environments
33                </wizard:ajaxButtonElement>
34        </g:if>
35       
36        <span class="info">
37                <span class="title">Samples</span>
38                Below you see all samples generated based on the subject / sampling event relations
39                you have specified in the previous screens.<br/>
40        </span>
41
42        <g:if test="${samples}">
43                <g:if test="${samples.size() > samplesWithTemplate}">
44                        <g:set var="showHeader" value="${true}" />
45                        <h1>Samples that still need to have a template assigned</h1>
46                        <div class="table">
47                        <g:each status="s" var="sampleData" in="${samples}">
48                                <g:if test="${!sampleData.sample.template}">
49                                        <g:if test="${showHeader}">
50                                        <g:set var="showHeader" value="${false}" />
51                                        <div class="header">
52                                                <div class="firstColumn">#</div>
53                                                <div class="column">Template</div>
54                                        </div>
55                                        </g:if>
56                                        <div class="row">
57                                                <div class="firstColumn">${s+1}</div>
58                                                <div class="column">
59                                                        <wizard:templateSelect name="template_${s}" entity="${dbnp.studycapturing.Sample}" value="${sampleData['sample'].template}" addDummy="true" ajaxOnChange="switchTemplate" url="[controller:'wizard',action:'pages']" update="[success:'wizardPage',failure:'wizardError']" afterSuccess="onWizardPage()" />
60                                                </div>
61                                                <wizard:templateColumns name="sample_${s}" class="column" id="1" entity="${sampleData.sample}"/>
62                                        </div>
63                                </g:if>
64                        </g:each>
65                        </div>
66                        <div class="sliderContainer">
67                                <div class="slider" ></div>
68                        </div>
69                </g:if>
70
71                <g:each status="n" var="sampleTemplateName" in="${sampleTemplates}">
72                        <h1>${sampleTemplateName.value.name}</h1>
73                        <g:set var="showHeader" value="${true}" />
74                        <div class="table">
75                        <g:each status="s" var="sampleData" in="${samples}">
76                                <g:if test="${sampleData.sample.template.toString() == sampleTemplateName.value.name}">
77                                        <g:if test="${showHeader}">
78                                                <g:set var="showHeader" value="${false}" />
79                                                <div class="header">
80                                                        <div class="firstColumn">#</div>
81                                                        <div class="column">Template</div>
82                                                        <wizard:templateColumnHeaders entity="${sampleData.sample}" class="column" />
83                                                </div>
84                                        </g:if>
85                                        <div class="row">
86                                                <div class="firstColumn">${s+1}</div>
87                                                <div class="column">
88                                                        <wizard:templateSelect name="template_${s}" entity="${dbnp.studycapturing.Sample}" value="${sampleData['sample'].template}" addDummy="true" ajaxOnChange="switchTemplate" url="[controller:'wizard',action:'pages']" update="[success:'wizardPage',failure:'wizardError']" afterSuccess="onWizardPage()" />
89                                                </div>
90                                                <wizard:templateColumns name="sample_${s}" class="column" id="1" entity="${sampleData.sample}"/>
91                                        </div>
92                                </g:if>
93                        </g:each>
94                        </div>
95                        <div class="sliderContainer">
96                                <div class="slider" ></div>
97                        </div>
98                </g:each>
99        </g:if>
100
101</g:else>
102       
103</wizard:pageContent>
Note: See TracBrowser for help on using the repository browser.