1 | <html> |
---|
2 | <head> |
---|
3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
---|
4 | <meta name="layout" content="main"/> |
---|
5 | <title>Query results</title> |
---|
6 | <link rel="stylesheet" href="<g:resource dir="css" file="advancedQuery.css" />" type="text/css"/> |
---|
7 | <g:javascript src="advancedQuery.js" /> |
---|
8 | </head> |
---|
9 | <body> |
---|
10 | |
---|
11 | <h1>Query results</h1> |
---|
12 | |
---|
13 | <p> |
---|
14 | Your search for studies with: |
---|
15 | </p> |
---|
16 | <ul id="criteria"> |
---|
17 | <g:each in="${search.getCriteria()}" var="criterion"> |
---|
18 | <li> |
---|
19 | <span class="entityfield">${criterion.entity}.${criterion.field}</span> |
---|
20 | <span class="operator">${criterion.operator}</span> |
---|
21 | <span class="value">${criterion.value}</span> |
---|
22 | </li> |
---|
23 | </g:each> |
---|
24 | </ul> |
---|
25 | <p> |
---|
26 | resulted in ${search.getNumResults()} <g:if test="${search.getNumResults() == 1}">study</g:if><g:else>studies</g:else>. |
---|
27 | </p> |
---|
28 | |
---|
29 | <g:if test="${search.getNumResults() > 0}"> |
---|
30 | |
---|
31 | <table id="searchresults" class="paginate"> |
---|
32 | <thead> |
---|
33 | <tr> |
---|
34 | <th colspan="2"></th> |
---|
35 | <th>Code</th> |
---|
36 | <th>Title</th> |
---|
37 | <th>Subjects</th> |
---|
38 | <th>Events</th> |
---|
39 | <th>Assays</th> |
---|
40 | </tr> |
---|
41 | </thead> |
---|
42 | <tbody> |
---|
43 | <g:each in="${search.getResults()}" var="studyInstance" status="i"> |
---|
44 | <tr class="${(i % 2) == 0 ? 'odd' : 'even'}"> |
---|
45 | |
---|
46 | <td><g:link controller="study" action="show" id="${studyInstance?.id}"><img src='${fam.icon(name: 'application_form_magnify')}' border="0" alt="view study" /></g:link></td> |
---|
47 | <td><g:if test="${studyInstance.canWrite(loggedInUser)}"><g:link class="edit" controller="studyWizard" params="[jump:'edit']" id="${studyInstance?.id}"><img src='${fam.icon(name: 'application_form_edit')}' border="0" alt="edit study" /></g:link></g:if><g:else><img src='${fam.icon(name: 'lock')}' border="0" alt="you have no write access to shis study" /></g:else> </td> |
---|
48 | <td>${fieldValue(bean: studyInstance, field: "code")}</td> |
---|
49 | <td> |
---|
50 | ${fieldValue(bean: studyInstance, field: "title")} |
---|
51 | </td> |
---|
52 | <td> |
---|
53 | <g:if test="${studyInstance.subjects.species.size()==0}"> |
---|
54 | - |
---|
55 | </g:if> |
---|
56 | <g:else> |
---|
57 | <g:each in="${studyInstance.subjects.species.unique()}" var="currentSpecies" status="j"> |
---|
58 | <g:if test="${j > 0}">,</g:if> |
---|
59 | <%=studyInstance.subjects.findAll { return it.species == currentSpecies; }.size()%> |
---|
60 | ${currentSpecies} |
---|
61 | </g:each> |
---|
62 | </g:else> |
---|
63 | </td> |
---|
64 | |
---|
65 | <td> |
---|
66 | <g:if test="${studyInstance.giveEventTemplates().size()==0}"> |
---|
67 | - |
---|
68 | </g:if> |
---|
69 | <g:else> |
---|
70 | ${studyInstance.giveEventTemplates().name.join(', ')} |
---|
71 | </g:else> |
---|
72 | </td> |
---|
73 | |
---|
74 | <td> |
---|
75 | <g:if test="${studyInstance.assays.size()==0}"> |
---|
76 | - |
---|
77 | </g:if> |
---|
78 | <g:else> |
---|
79 | ${studyInstance.assays.module.platform.unique().join(', ')} |
---|
80 | </g:else> |
---|
81 | </td> |
---|
82 | |
---|
83 | </tr> |
---|
84 | </g:each> |
---|
85 | </tbody> |
---|
86 | </table> |
---|
87 | |
---|
88 | </g:if> |
---|
89 | <p> |
---|
90 | <g:link action="index">Search again</g:link> |
---|
91 | </p> |
---|
92 | </body> |
---|
93 | </html> |
---|