1 | <%@ page import="org.dbnp.gdt.GdtService" %> |
---|
2 | <html> |
---|
3 | <head> |
---|
4 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
---|
5 | <meta name="layout" content="main"/> |
---|
6 | <title>Simple study wizard</title> |
---|
7 | |
---|
8 | <g:render template="javascripts" /> |
---|
9 | |
---|
10 | </head> |
---|
11 | <body> |
---|
12 | <div class="simpleWizard"> |
---|
13 | <h1>Existing samples</h1> |
---|
14 | |
---|
15 | <span class="info"> |
---|
16 | <span class="title">Update sample properties</span> |
---|
17 | Enter all the information about your samples. If you want to update the samples using excel, click |
---|
18 | the 'Update using excel' button below. |
---|
19 | </span> |
---|
20 | |
---|
21 | <g:if test="${error}"> |
---|
22 | <div class="errormessage"> |
---|
23 | ${error.toString().encodeAsHTML()} |
---|
24 | </div> |
---|
25 | </g:if> |
---|
26 | <g:if test="${message}"> |
---|
27 | <div class="message"> |
---|
28 | ${message.toString().encodeAsHTML()} |
---|
29 | </div> |
---|
30 | </g:if> |
---|
31 | |
---|
32 | <g:if test="${flash.validationErrors}"> |
---|
33 | <% def uniqueMessages = flash.validationErrors.value.unique(); %> |
---|
34 | <div class="errormessage"> |
---|
35 | <g:each var="error" in="${uniqueMessages}"> |
---|
36 | ${error.value}<br /> |
---|
37 | </g:each> |
---|
38 | </div> |
---|
39 | </g:if> |
---|
40 | |
---|
41 | <g:form class="simpleWizard" name="existingSamples" action="simpleWizard"> |
---|
42 | <input type="hidden" name="_eventId" value="refresh" /> |
---|
43 | |
---|
44 | <g:if test="${study.samples?.size()}"> |
---|
45 | <g:each var="templateCombination" in="${templateCombinations}"> |
---|
46 | <h2>${templateCombination}</h2> |
---|
47 | <g:set var="showHeader" value="${true}" /> |
---|
48 | <g:set var="previousTemplate" value=""/> |
---|
49 | <div class="tableEditor"> |
---|
50 | <% def combinationRecords = records.findAll { it.templateCombination == templateCombination } %> |
---|
51 | <g:each var="record" in="${combinationRecords}"> |
---|
52 | <g:if test="${showHeader}"> |
---|
53 | <g:set var="showHeader" value="${false}" /> |
---|
54 | <div class="header"> |
---|
55 | <div class="firstColumn"></div> |
---|
56 | <g:each var="entity" in="${record.objects}"> |
---|
57 | <g:if test="${entity.value}"> |
---|
58 | <div class="column">${entity.key}<br />template</div> |
---|
59 | <af:templateColumnHeaders includeEntities="${true}" entity="${entity.value}" class="column" columnWidths="[Name:100]"/> |
---|
60 | </g:if> |
---|
61 | </g:each> |
---|
62 | </div> |
---|
63 | </g:if> |
---|
64 | <div class="row"> |
---|
65 | <div class="firstColumn"></div> |
---|
66 | <g:each var="entity" in="${record.objects}"> |
---|
67 | <g:if test="${entity.value}"> |
---|
68 | <div class="column"> |
---|
69 | <af:templateSelect name="${entity.key.toLowerCase()}_${entity.value.getIdentifier()}_template" entity="${entity.value.class}" value="${entity.value?.template}" addDummy="true" tableEditorChangeEvent="switchTemplate(element);" /> |
---|
70 | </div> |
---|
71 | <af:templateColumns name="${entity.key.toLowerCase()}_${entity.value.getIdentifier()}" class="column" id="1" entity="${entity.value}"/> |
---|
72 | </g:if> |
---|
73 | </g:each> |
---|
74 | </div> |
---|
75 | </g:each> |
---|
76 | </div> |
---|
77 | <div class="sliderContainer"> |
---|
78 | <div class="slider" ></div> |
---|
79 | </div> |
---|
80 | </g:each> |
---|
81 | |
---|
82 | </g:if> |
---|
83 | |
---|
84 | </g:form> |
---|
85 | |
---|
86 | <p class="options"> |
---|
87 | <a href="#" onClick="submitForm( 'existingSamples', 'previous' ); return false;" class="previous">Previous</a> |
---|
88 | <a href="#" onClick="submitForm( 'existingSamples', 'next' ); return false;" class="next">Next</a> |
---|
89 | |
---|
90 | <a href="#" onClick="submitForm( 'existingSamples', 'save' ); return false;" class="save separator">Save</a> |
---|
91 | <a href="#" onClick="submitForm( 'existingSamples', 'update' ); return false;" class="excel">Update using excel</a> |
---|
92 | <a href="#" onClick="submitForm( 'existingSamples', 'skip' ); return false;" class="skip">Skip</a> |
---|
93 | </p> |
---|
94 | </div> |
---|
95 | </body> |
---|
96 | </html> |
---|