source: trunk/grails-app/views/study/show.gsp @ 142

Last change on this file since 142 was 142, checked in by ademcan, 10 years ago

show selected study information in a tab view : reorganized events, subjects and protocol views into a list.

File size: 5.9 KB
Line 
1
2<%@ page import="dbnp.studycapturing.Study" %>
3<html>
4  <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6    <meta name="layout" content="main" />
7  <g:set var="entityName" value="${message(code: 'study.label', default: 'Study')}" />
8  <title><g:message code="default.show.label" args="[entityName]" /></title>
9      <script type="text/javascript">
10        $(function() {
11                $("#accordion").accordion();
12        });
13      </script>
14
15</head>
16<body>
17
18<div class="nav">
19  <span class="menuButton"><a class="home" href="${createLink(uri: '/')}">Home</a></span>
20  <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>
21  <span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span>
22</div>
23
24<div class="body">
25  <h1><g:message code="default.show.label" args="[entityName]" /></h1>
26  <g:if test="${flash.message}">
27    <div class="message">${flash.message}</div>
28  </g:if>
29  <div class="dialog">
30
31    <div id="accordion">
32      <a href="#"> Study Information </a>
33       
34       <div> Id : ${fieldValue(bean: studyInstance, field: "id")} <br>
35       Template :<g:link controller="template" action="show" id="${studyInstance?.template?.id}">${studyInstance?.template?.encodeAsHTML()}</g:link><br>
36       Start :<g:formatDate date="${studyInstance?.startDate}" /> <br>
37      Sampling Events :
38          <g:each in="${studyInstance.samplingEvents}" var="s">
39            <li><g:link controller="samplingEvent" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li>
40          </g:each>
41        </ul><br>
42       Last Updated :<g:formatDate date="${studyInstance?.lastUpdated}" /><br>
43             Readers :<ul>
44          <g:each in="${studyInstance.readers}" var="r">
45            <li><g:link controller="user" action="show" id="${r.id}">${r?.encodeAsHTML()}</g:link></li>
46          </g:each>
47        </ul> <br>
48      Code : ${fieldValue(bean: studyInstance, field: "code")} <br>
49      Editors : <ul>
50          <g:each in="${studyInstance.editors}" var="e">
51            <li><g:link controller="user" action="show" id="${e.id}">${e?.encodeAsHTML()}</g:link></li>
52          </g:each>
53        </ul> <br>
54     EC Code : ${fieldValue(bean: studyInstance, field: "ecCode")} <br>
55     Research Question : ${fieldValue(bean: studyInstance, field: "researchQuestion")} <br>
56     Title : ${fieldValue(bean: studyInstance, field: "title")} <br>
57     Description : ${fieldValue(bean: studyInstance, field: "description")} <br>
58     Owner :<g:link controller="user" action="show" id="${studyInstance?.owner?.id}">${studyInstance?.owner?.encodeAsHTML()}</g:link> <br>
59      Date Created :<g:formatDate date="${studyInstance?.dateCreated}" /> <br>
60       </div>
61
62      <a href="#"> Subjects </a><div>
63        <table>
64          <tr>
65            <td><b>Id </b></td>
66            <td><b>Template Integer Fields</b></td>
67            <td><b>Species</b></td>
68            <td><b>Template Term Fields</b></td>
69            <td><b>Name</b></td>
70            <td><b>Template Float Fields</b></td>
71            <td><b>Template String Fields</b></td>
72          </tr>
73          <g:each in="${studyInstance.subjects}" var="s">
74            <tr>
75              <td><g:link controller="subject" action="show" id="${s.id}">${s.id}</g:link></td>
76              <td>${s.templateIntegerFields}</td>
77              <td>${s.species}</td>
78              <td>${s.templateTermFields}</td>
79              <td>${s.name}</td>
80              <td>${s.templateFloatFields}</td>
81              <td>${s.templateStringFields}</td>
82          </tr>
83          </g:each>
84          </table>
85      </div>
86
87       <a href="#"> Groups </a> <div><ul>
88          <g:each in="${studyInstance.groups}" var="g">
89            <li><g:link controller="subjectGroup" action="show" id="${g.id}">${g?.encodeAsHTML()}</g:link></li>
90          </g:each>
91        </ul> </div>
92
93       <a href="#"> Protocols </a><div>
94             <table>
95          <tr>
96            <td><b>Id </b></td>
97            <td><b>Name</b></td>
98            <td><b>Parameters</b></td>
99            <td><b>Reference</b></td>
100          </tr>
101          <g:each in="${studyInstance.events.eventDescription.protocol}" var="s">
102            <tr>
103              <td><g:link controller="protocol" action="show" id="${s.id}">${s.id}</g:link></td>
104          <td>${s.name}</td>
105          <td>
106          <g:each in="${s.parameters}" var="p">
107            <g:link controller="protocolParameter" action="show" id="${p.id}">${p.name}</g:link>
108          </g:each>
109          </td>
110          <td>${s.reference}</td>
111          </tr>
112          </g:each>
113             </table>
114       </div>
115
116      <a href="#"> Events </a><div>
117          <table>
118          <tr>
119            <td><b>Event Description</b></td>
120            <td><b>Subject</b></td>
121            <td><b>Start Time</b></td>
122            <td><b>End Time</b></td>
123            <td><b>Duration</b></td>
124          </tr>
125          <g:each in="${studyInstance.events}" var="e">
126            <tr>
127              <td><g:link controller="event" action="show" id="${e.id}">  ${e.eventDescription.name}</g:link></td>
128          <td>${e.subject.id}</td>
129          <td>${e.startTime}</td>
130          <td>${e.endTime}</td>
131          <td>${e.getDurationString()}</td>
132          </tr>
133          </g:each>
134          </table>
135      </div>
136
137      <a href="#"> Assays </a><div>
138      </div>
139
140  </div>
141    </div>
142  <br>
143  <div class="buttons">
144    <g:form>
145      <g:hiddenField name="id" value="${studyInstance?.id}" />
146      <span class="button"><g:actionSubmit class="edit" action="edit" value="${message(code: 'default.button.edit.label', default: 'Edit')}" /></span>
147      <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
148    </g:form>
149  </div>
150</div>
151</div>
152</body>
153</html>
Note: See TracBrowser for help on using the repository browser.