1 | <%@ page import="dbnp.studycapturing.Study" %> |
---|
2 | <html> |
---|
3 | <head> |
---|
4 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
---|
5 | <meta name="layout" content="main"/> |
---|
6 | <g:set var="entityName" value="${message(code: 'study.label', default: 'Study')}"/> |
---|
7 | <title><g:message code="default.list.label" args="[entityName]"/></title> |
---|
8 | </head> |
---|
9 | <body> |
---|
10 | |
---|
11 | <g:form action="list_extended" name="list_extended"> |
---|
12 | <div class="body"> |
---|
13 | <h1><g:message code="default.list.label" args="[entityName]"/></h1> |
---|
14 | <g:if test="${flash.message}"> |
---|
15 | <div class="message">${flash.message}</div> |
---|
16 | </g:if> |
---|
17 | |
---|
18 | <div class="list"> |
---|
19 | <table> |
---|
20 | <thead> |
---|
21 | <tr> |
---|
22 | <th colspan="4"></th> |
---|
23 | <g:sortableColumn property="code" title="${message(code: 'study.code.label', default: 'Code')}"/> |
---|
24 | <th>Title</th> |
---|
25 | <th>Subjects</th> |
---|
26 | <th>Events</th> |
---|
27 | <th>Assays</th> |
---|
28 | </tr> |
---|
29 | </thead> |
---|
30 | <tbody> |
---|
31 | <g:each in="${studyInstanceList}" var="studyInstance" status="i"> |
---|
32 | <tr class="${(i % 2) == 0 ? 'odd' : 'even'}"> |
---|
33 | |
---|
34 | <td><input type="checkbox" name="id" value="${studyInstance.id}" id="${studyInstance.title}"></td> |
---|
35 | <td><g:link action="show" title="View study" id="${studyInstance?.id}"><img src='${fam.icon(name: 'application_form_magnify')}' border="0" alt="view study" /></g:link></td> |
---|
36 | <td><g:if test="${studyInstance.canWrite(loggedInUser)}"> |
---|
37 | <g:link class="edit" title="Edit study using simple wizard" controller="simpleWizard" action="index" id="${studyInstance?.id}"> |
---|
38 | <img src='${fam.icon(name: 'pencil')}' border="0" alt="Edit study using simple wizard" /></g:link> |
---|
39 | </g:if><g:else><img src='${fam.icon(name: 'lock')}' border="0" alt="you have no write access to shis study" /></g:else> |
---|
40 | </td> |
---|
41 | <td><g:if test="${studyInstance.canWrite(loggedInUser)}"> |
---|
42 | <g:link class="edit" title="Edit study" controller="studyWizard" params="[jump:'edit']" id="${studyInstance?.id}"> |
---|
43 | <img src='${fam.icon(name: 'application_form_edit')}' border="0" alt="Edit study" /></g:link> |
---|
44 | </g:if><g:else><img src='${fam.icon(name: 'lock')}' border="0" alt="you have no write access to shis study" /></g:else> |
---|
45 | </td> |
---|
46 | <td>${fieldValue(bean: studyInstance, field: "code")}</td> |
---|
47 | <td> |
---|
48 | ${fieldValue(bean: studyInstance, field: "title")} |
---|
49 | </td> |
---|
50 | <td> |
---|
51 | <g:if test="${studyInstance.subjects.species.size()==0}"> |
---|
52 | - |
---|
53 | </g:if> |
---|
54 | <g:else> |
---|
55 | <g:each in="${studyInstance.subjects.species.unique()}" var="currentSpecies" status="j"> |
---|
56 | <g:if test="${j > 0}">,</g:if> |
---|
57 | <%=studyInstance.subjects.findAll { return it.species == currentSpecies; }.size()%> |
---|
58 | ${currentSpecies} |
---|
59 | </g:each> |
---|
60 | </g:else> |
---|
61 | </td> |
---|
62 | |
---|
63 | <td> |
---|
64 | <g:if test="${studyInstance.giveEventTemplates().size()==0}"> |
---|
65 | - |
---|
66 | </g:if> |
---|
67 | <g:else> |
---|
68 | ${studyInstance.giveEventTemplates().name.join(', ')} |
---|
69 | </g:else> |
---|
70 | </td> |
---|
71 | |
---|
72 | <td> |
---|
73 | <g:if test="${studyInstance.assays.size()==0}"> |
---|
74 | - |
---|
75 | </g:if> |
---|
76 | <g:else> |
---|
77 | ${studyInstance.assays.module.name.unique().join(', ')} |
---|
78 | </g:else> |
---|
79 | </td> |
---|
80 | |
---|
81 | </tr> |
---|
82 | </g:each> |
---|
83 | </tbody> |
---|
84 | </table> |
---|
85 | </div> |
---|
86 | <div class="buttons"> |
---|
87 | <sec:ifLoggedIn> |
---|
88 | <span class="button"><g:link class="create" controller="studyWizard" params="[jump:'create']"><g:message code="default.new.label" args="[entityName]"/></g:link></span> |
---|
89 | <span class="button"><g:link class="create" controller="simpleWizard">Simple wizard</g:link></span> |
---|
90 | <span class="button"><a class="compare" href="#" onClick="$( 'form#list_extended' ).first().submit(); return false;">Compare selected studies</a></span> |
---|
91 | </sec:ifLoggedIn> |
---|
92 | |
---|
93 | </div> |
---|
94 | <div class="paginateButtons"> |
---|
95 | <g:paginate max="10" total="${studyInstanceTotal}" prev="« Previous" next="» Next"/> |
---|
96 | </div> |
---|
97 | </div> |
---|
98 | </g:form> |
---|
99 | </body> |
---|
100 | </html> |
---|