source: trunk/grails-app/views/simpleQuery/common/_query.gsp @ 650

Last change on this file since 650 was 650, checked in by vinlud, 8 years ago

Multiple changes in structure/view/logic

  • Property svn:keywords set to Date Author Rev
File size: 4.7 KB
Line 
1<%@ page import="dbnp.studycapturing.Study" %>
2<%--
3  Created by IntelliJ IDEA.
4  User: luddenv
5  Date: 26-mei-2010
6  Time: 13:17:50
7  To change this template use File | Settings | File Templates.
8--%>
9<div id="simpleQuery" class="simplequery">
10        <h1>Simple Query</h1>
11
12    <g:form action="pages" name="simpleQueryForm" id="simpleQueryForm">
13    <g:if test="${search_term}"><g:set var="preterm" value="${search_term}" /></g:if>
14
15    <div id="accordion">
16      <h3><a href="#">Search term</a></h3>
17      <div>
18        <div class="element">
19          <div class="description">Search term (e.g. 'paracetamol')</div>
20          <div class="input"><g:textField name="search_term" value="${preterm}" /></div>
21        </div>
22        <div class="element">
23          <div class="description">Species (e.g. 'rattus norvegicus')</div>
24          <div class="input"><g:select name="species" from="${species}" value="" noSelection="['':'--- select a species ---']"/></div>
25        </div>
26        <div class="element">
27          <div class="description">Organ (e.g. 'liver')</div>
28          <div class="input"><g:select name="organ" from="" value="${organ}" noSelection="['':'--- select organ/tissue ---']"/></div>
29        </div>
30      </div>
31
32      <h3><a href="#">Simple Assays (optional)</a></h3>
33      <div class="element">
34        <div id="compoundGroup">
35
36          <g:if test="${showFirstRowCompounds}">
37          <div id="compoundRow1">
38            <div class="descriptionSA">Compound</div><div class="input"><g:textField name="sa_compound" value=""/></div><div class="descriptionSA">Operator</div><div class="input" id="operatorInput"><g:select name="operator" from="${operators}" value="="/></div><div class="descriptionSA">Value</div><div class="input"><g:textField name="sa_value" value=""/></div>
39          </div>
40          </g:if>
41
42          <g:else>
43            <g:each status="i" in="${search_sa_compounds}" var="compound">
44            <div id="compoundRow${i}">
45              <div class="descriptionSA">Compound (e.g. 'glucose')</div><div class="input"><g:textField name="sa_compound" value="${search_sa_compounds.get(i)}"/></div><div class="descriptionSA">Type of regulations</div><div class="input"><g:select name="operator" from="${operators}" value="="/></div><div class="descriptionSA">Value</div><div class="input"><g:textField name="sa_value" value="${search_sa_values.get(i)}"/></div>
46            </div>
47            </g:each>
48          </g:else>
49        </div>
50        <div id="addCompound" class="submit">Add compound</div>
51      </div>
52
53      <h3><a href="#">Transcriptomics (optional)</a></h3>
54
55      <div class="element">
56        <div id="transcriptomeGroup">
57          <div id="transcriptomeRow1">
58            <div class="description">List of Gene IDs or pathway IDs</div><div class="input"><g:textField name="genepath" value="" /></div><div class="description">Type of regulations</div><div class="input" id="regulationInput"><g:select name="regulation" from="" value="${regulation}" noSelection="['':'--- select regulation ---']"/></div>
59          </div>
60        </div>
61        <div id="addTranscriptome" class="submit">Add transciptome</div>
62      </div>
63    </div>
64
65    <g:submitButton name="search" value="Search"  /> <g:if test="${search_term}"><g:submitButton name="reset" value="Reset" /></g:if>
66
67    </g:form>
68
69    <g:if test="${search_term}">
70        <h1><g:message code="Search results for term '${search_term}'"/></h1>
71
72        <g:if test="${listStudies}">
73          <div class="list">
74            <table>
75                <thead>
76                    <tr>
77                        <g:sortableColumn property="id" title="${message(code: 'study.id', default: 'ID')}" />
78                        <g:sortableColumn property="title" title="${message(code: 'study.title.label', default: 'Study')}" />
79                        <g:sortableColumn property="samples" title="${message(code: 'study.sample', default: 'Samples')}" />
80                    </tr>
81                </thead>
82                <tbody>
83                <g:each in="${listStudies}" var="Study" status="i" >
84                  <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
85                    <td><g:link url="[action:'show',controller:'study']" id="${Study.id}">${fieldValue(bean: Study, field: "id")}</g:link></td>
86                    <td><g:link url="[action:'show',controller:'study']" id="${Study.id}">${fieldValue(bean: Study, field: "title")}</g:link></td>
87                    <td><g:link url="[action:'show',controller:'study']" id="${Study.id}">${fieldValue(bean: Study, field: "samples")}</g:link></td>
88                  </tr>
89                </g:each>
90                </tbody>
91            </table>
92          </div>
93
94        </g:if>
95    </g:if>
96
97</div>
Note: See TracBrowser for help on using the repository browser.