root/trunk/grails-app/views/study/list_extended.gsp @ 137

Revision 137, 1.9 KB (checked in by ademcan, 4 years ago)

"compare selected studies" option with tabs view

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.list.label" args="[entityName]" /></title>
9
10  <my:jqueryui/>
11  <script type="text/javascript">
12    $(function() {
13            $("#tabs").tabs();
14    });
15  </script>
16
17</head>
18<body>
19
20  <% studyList = dbnp.studycapturing.Study.list() %>
21  <% def att_list = ['id','template','startDate','code','title'] %>
22  <% def selectedStudies = [] %>
23  <% def tmpList = [] %>
24
25  <div class="nav">
26    <span class="menuButton"><a class="home" href="${createLink(uri: '/')}">Home</a></span>
27    <span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span>
28  </div>
29
30  <div class="body">
31    <h1><g:message code="default.list.label" args="[entityName]" /></h1>
32    <g:if test="${flash.message}">
33      <div class="message">${flash.message}</div>
34    </g:if>
35
36    <% params.each{key,values-> %>
37    <% if (values=="on"){ %>
38      <% tmpList.add(key) %>
39    <%  } }%>
40
41    <% for (i in studyList) {%>
42    <% if (tmpList.contains(i.getTitle())) { %>
43      <% selectedStudies.add(i) %>
44     <% }} %>
45
46
47    <div id="tabs">
48      <ul>
49      <g:each in="${selectedStudies}" status="i" var="studyInstance">
50        <li><a href="#${studyInstance}"> ${studyInstance} </a></li>
51      </g:each>
52      </ul>
53
54      <g:each in="${selectedStudies}" status="i" var="studyIns">
55
56       
57      <div id="${studyIns}">
58        <g:each in="${att_list}" status="s" var="attribute">
59              ${message(code: 'study.id.'+attribute , default: attribute)} :
60              ${fieldValue(bean: studyIns, field: attribute)}
61                            <br>
62        </g:each>
63      </div>
64
65        </g:each>
66    </div>
67
68    </div>
69
70
71</body>
72</html>
Note: See TracBrowser for help on using the browser.