Ignore:
Timestamp:
Feb 10, 2011, 1:04:32 PM (10 years ago)
Author:
robert@…
Message:

Improved query views

Location:
trunk/grails-app/views
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/advancedQuery/_criteria.gsp

    r1501 r1512  
    33        <g:each in="${criteria}" var="criterion" status="j">
    44                <li>
    5                         <span class="entityfield">${criterion.entityField()}</span>
     5                        <span class="entityfield">${criterion.entityField().toLowerCase()}</span>
    66                        <span class="operator">${criterion.operator}</span>
    77                        <span class="value">
  • trunk/grails-app/views/advancedQuery/_resultbuttons.gsp

    r1501 r1512  
    1 <p class="options">
    2         <g:link class="searchIn" action="searchIn" id="${queryId}">Search within results</g:link><br />
     1<p class="options multiple">
     2        <g:if test="${search.getNumResults() == 0}">
     3                <a href="#" onClick="return false;" class="searchIn disabled">Search within results</a>
     4        </g:if>
     5        <g:else>
     6                <g:link class="searchIn" action="searchIn" id="${queryId}">Search within results</g:link>
     7        </g:else>
     8        <br />
     9       
    310        <g:link class="search" action="index">Search again</g:link><br />
    411        <g:link class="discard" action="discard" id="${queryId}">Discard results</g:link><br />
    512        <g:link class="listPrevious" action="list">Previous searches</g:link>
    613</p>
    7 <p class="options">
     14<p class="options multiple">
    815        <g:each in="${actions}" var="action">
    9                 <a class="performAction ${action.name}" href="${action.url}" onClick="performAction( $('form#results'), '${action.name}', '${action.module}' ); return false;">${action.description}</a><br />
     16                <g:if test="${search.getNumResults() == 0}">
     17                        <a href="#" onClick="return false;" class="performAction ${action.name} disabled">${action.description}</a>
     18                </g:if>
     19                <g:else>
     20                        <a class="performAction ${action.name}" href="${action.url}" onClick="performAction( $('form#results'), '${action.name}', '${action.module}' ); return false;">${action.description}</a>
     21                </g:else>
     22                <br />
    1023        </g:each>
    1124</p>
  • trunk/grails-app/views/advancedQuery/index.gsp

    r1501 r1512  
    5050</g:if>
    5151
    52 <form id="input_criteria">
     52<div id="searchForm">
     53        <form id="input_criteria">
    5354        <h2>Add criterium</h2>
    5455        <p class="explanation">
     
    7879                        <option value="&lt;">Lower than</option>
    7980                        <option value="&lt;=">Lower than or equals</option>
    80                 </select> 
    81 
     81                </select>
     82       
    8283        <label for="value">Value</label>
    8384                <input class='text' type="text" name="value" />
    8485       
    8586        <input class="button" type="button" onClick="addCriterium();" value="Add" />
    86 </form>
    87 
    88 <div id="searchForm">
     87        </form>
    8988        <g:form action="search" method="get">
    9089                <label for="entity">Search for</label><g:select from="${entitiesToSearchFor}" optionKey="key" optionValue="value" name="entity" /><br />
     
    9796                <input type="submit" value="Run query" class="submitcriteria" disabled="disabled" />
    9897        </g:form>
     98       
     99        <br clear="all" />
    99100</div>
    100101<p class="options">
  • trunk/grails-app/views/advancedQuery/list.gsp

    r1501 r1512  
    7272                                <td>${search.getNumResults()}</td>
    7373                                <td><g:formatDate date="${search.executionDate}" format="HH:mm" /></td>
    74                                 <td><g:link action="show" id="${search.id}">Show</g:link>
    75                                 <td><g:link action="discard" id="${search.id}">Discard</g:link>
     74                                <td><g:link action="show" id="${search.id}"><img border="0" src="${fam.icon(name: 'application_form_magnify')}" alt="Show" /></g:link>
     75                                <td><g:link action="discard" id="${search.id}"><img border="0" src="${fam.icon(name: 'basket_remove')}" alt="Discard" /></g:link>
    7676                        </tr>
    7777                </g:each>
     
    8181
    8282<p class="options">
    83         <a href="#" class="combine" onClick="combineResults( $( '#searchform' ) ); return false;">Combine results</a><br />
    84         <a href="#" class="searchIn" onClick="searchWithinResults( $( '#searchform' ) ); return false;">Search within results</a><br />
    85         <g:link class="search" action="index">Search again</g:link><br />
    86         <a href="#" class="discard" onClick="discardResults( $( '#searchform' ) ); return false;">Discard results</a><br />
     83        <a href="#" class="combine" onClick="combineResults( $( '#searchform' ) ); return false;">Combine results</a>
     84        <a href="#" class="searchIn" onClick="searchWithinResults( $( '#searchform' ) ); return false;">Search within results</a>
     85        <g:link class="search" action="index">Search again</g:link>
     86        <a href="#" class="discard" onClick="discardResults( $( '#searchform' ) ); return false;">Discard results</a>
    8787</p>
    88 
     88<br clear="all" />
    8989</body>
    9090</html>
  • trunk/grails-app/views/advancedQuery/results.gsp

    r1501 r1512  
    1111<h1>Query results</h1>
    1212
    13 <p>
    14         Your search for:
    15 </p>
    16 <g:render template="criteria" model="[criteria: search.getCriteria()]" />
    17 <p>
    18         resulted in ${search.getNumResults()} results.
    19 </p>
    20 
     13<div class="searchoptions">
     14        ${search.getNumResults()} <g:if test="${search.getNumResults() == 1}">result</g:if><g:else>results</g:else> found with
     15        <g:render template="criteria" model="[criteria: search.getCriteria()]" />
     16</div>
    2117<g:if test="${search.getNumResults() > 0}">
    2218        <%
  • trunk/grails-app/views/advancedQuery/sampleresults.gsp

    r1501 r1512  
    1111<h1>Query results</h1>
    1212
    13 <p>
    14         Your search for samples with:
    15 </p>
    16 <g:render template="criteria" model="[criteria: search.getCriteria()]" />
    17 <p>
    18         resulted in ${search.getNumResults()} <g:if test="${search.getNumResults() == 1}">sample</g:if><g:else>samples</g:else>.
    19 </p>
    20 
     13<div class="searchoptions">
     14        ${search.getNumResults()} <g:if test="${search.getNumResults() == 1}">sample</g:if><g:else>samples</g:else> found with
     15        <g:render template="criteria" model="[criteria: search.getCriteria()]" />
     16</div>
    2117<g:if test="${search.getNumResults() > 0}">
    2218        <%
  • trunk/grails-app/views/advancedQuery/studyresults.gsp

    r1501 r1512  
    1111<h1>Query results</h1>
    1212
    13 <p>
    14         Your search for studies with:
    15 </p>
    16 <g:render template="criteria" model="[criteria: search.getCriteria()]" />
    17 <p>
    18         resulted in ${search.getNumResults()} <g:if test="${search.getNumResults() == 1}">study</g:if><g:else>studies</g:else>.
    19 </p>
     13<div class="searchoptions">
     14        ${search.getNumResults()} <g:if test="${search.getNumResults() == 1}">study</g:if><g:else>studies</g:else> found with
     15        <g:render template="criteria" model="[criteria: search.getCriteria()]" />
     16</div>
    2017<g:if test="${search.getNumResults() > 0}">
    2118        <%
  • trunk/grails-app/views/common/_topnav.gsp

    r1439 r1512  
    4848                </ul>
    4949        </li>
     50        <li><g:link controller="advancedQuery">Query</g:link></li>
    5051        <sec:ifAllGranted roles="ROLE_ADMIN">
    5152                <li>
Note: See TracChangeset for help on using the changeset viewer.