Ignore:
Timestamp:
Jun 21, 2010, 8:42:50 AM (11 years ago)
Author:
vinlud
Message:

Dynamic simple Assays tab

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/simpleQuery/common/_query.gsp

    r570 r594  
    1010
    1111    <g:form action="pages" name="simpleQueryForm" id="simpleQueryForm">
    12     <g:if test="${term}"><g:set var="preterm" value="${term}" /></g:if>
     12    <g:if test="${search_term}"><g:set var="preterm" value="${search_term}" /></g:if>
    1313    <div class="content">
    1414      <div class="element">
    1515        <div class="description">Search term (e.g. 'paracetamol')</div>
    16         <div class="input"><g:textField name="term" value="${preterm}" /></div>
     16        <div class="input"><g:textField name="search_term" value="${preterm}" /></div>
    1717      </div>
    1818      <div class="element">
     
    2525      </div>
    2626    </div>
    27     <g:submitButton name="search" value="Search" /> <g:if test="${term}"><g:submitButton name="reset" value="Clear" /></g:if>
     27    <g:submitButton name="search" value="Search" /> <g:if test="${search_term}"><g:submitButton name="reset" value="Clear" /></g:if>
    2828
    2929    <br><br>
     
    3333      <div class="element">
    3434        <div id="compoundGroup">
     35          <g:if test="${resultString}">
    3536          <div id="compoundRow1">
    3637            <div class="description">Compound (e.g. 'glucose')</div>
    37             <div class="input"><g:textField name="compound" value="" id="compound1" /></div>
     38            <div class="input"><g:textField name="sa_compound" value="${search_sa_compounds}"/></div>
    3839            <div class="description">Value</div>
    39             <div class="input"><g:textField name="compound_value" value="" id="compoundValue1" /></div>
     40            <div class="input"><g:textField name="sa_value" value="${search_sa_values}"/></div>
    4041          </div>
     42          </g:if>
     43          <g:else>
     44            <g:each status="i" in="${search_sa_compounds}" var="compound">
     45            <div id="compoundRow${i}">
     46              <div class="description">Compound (e.g. 'glucose')</div>
     47              <div class="input"><g:textField name="sa_compound" value="${compound}"/></div>
     48              <div class="description">Value</div>
     49              <div class="input"><g:textField name="sa_value" value="${search_sa_values[i]}"/></div>
     50            </div>
     51            </g:each>
     52          </g:else>
    4153        </div>
    4254        <div id="addCompound">Add compound</div>
     
    5163            <div class="input"><g:textField name="genepath" value="" /></div>
    5264            <div class="description">Type of regulations</div>
    53             <div class="input"><g:select name="regulation" from="" value="${regulation}" noSelection="['':'--- select regulation ---']"/></div>
     65            <div class="input" id="regulationInput"><g:select name="regulation" from="" value="${regulation}" noSelection="['':'--- select regulation ---']"/></div>
    5466          </div>
    5567        </div>
     
    6173    <br><br>
    6274
    63     <g:if test="${term}">
    64         <h1><g:message code="Search results for term ${term}"/></h1>
     75    <g:if test="${search_term}">
     76        <h1><g:message code="Search results for term ${search_term}"/></h1>
    6577
    6678        <g:if test="${listStudies}">
Note: See TracChangeset for help on using the changeset viewer.