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

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

Changes accordion simpleQuery

  • Property svn:keywords set to Date Author Rev
File size: 4.4 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</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>
39            <div class="input"><g:textField name="sa_compound" value="${search_sa_compounds}"/></div>
40            <div class="descriptionSA">Operator</div>
41            <div class="input" id="operatorInput"><g:select name="operator" from="${operators}" value="="/></div>
42            <div class="descriptionSA">Value</div>
43            <div class="input"><g:textField name="sa_value" value="${search_sa_values}"/></div>
44          </div>
45          </g:if>
46
47          <g:else>
48            <g:each status="i" in="${search_sa_compounds}" var="compound">
49            <div id="compoundRow${i}">
50              <div class="descriptionSA">Compound (e.g. 'glucose')</div>
51              <div class="input"><g:textField name="sa_compound" value="${compound}"/></div>
52              <div class="descriptionSA">Type of regulations</div>
53              <div class="input"><g:select name="operator" from="${operators}" value="="/></div>
54              <div class="descriptionSA">Value</div>
55              <div class="input"><g:textField name="sa_value" value="${search_sa_values[i]}"/></div>
56            </div>
57            </g:each>
58          </g:else>
59        </div>
60        <div id="addCompound" class="submit">Add compound</div>
61      </div>
62
63      <h3><a href="#">Transcriptomics</a></h3>
64
65      <div class="element">
66        <div id="transcriptomeGroup">
67          <div id="transcriptomeRow1">
68            <div class="description">List of Gene IDs or pathway IDs</div>
69            <div class="input"><g:textField name="genepath" value="" /></div>
70            <div class="description">Type of regulations</div>
71            <div class="input" id="regulationInput"><g:select name="regulation" from="" value="${regulation}" noSelection="['':'--- select regulation ---']"/></div>
72          </div>
73        </div>
74        <div id="addTranscriptome">Add transciptome</div>
75      </div>
76    </div>
77
78    <g:submitButton name="search" value="Search"  /> <g:if test="${search_term}"><g:submitButton name="reset" value="Reset" /></g:if>
79
80    </g:form>
81
82    <g:if test="${search_term}">
83        <h1><g:message code="Search results for term ${search_term}"/></h1>
84
85        <g:if test="${listStudies}">
86          <div class="list">
87            <table>
88                <thead>
89                    <tr>
90                        <g:sortableColumn property="title" title="${message(code: 'study.title.label', default: 'Study')}" />
91                    </tr>
92                </thead>
93                <tbody>
94                <g:each in="${listStudies}" var="Study" status="i" >
95                  <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
96                    <td><g:link url="[action:'show',controller:'study']" id="${Study.id}">${fieldValue(bean: Study, field: "title")}</g:link></td>
97                  </tr>
98                </g:each>
99                </tbody>
100            </table>
101          </div>
102
103        </g:if>
104    </g:if>
105
106</div>
Note: See TracBrowser for help on using the repository browser.