source: trunk/grails-app/views/advancedQuery/_resultbuttons.gsp

Last change on this file was 1908, checked in by robert@…, 7 years ago

Improvements in querying in order to be able to refine searches in a module.

  • Property svn:keywords set to Rev Author Date
File size: 1.7 KB
Line 
1<%
2        def refineActions = actions.findAll { it.type == "refine" };
3        def otherActions = actions.findAll { it.type != "refine" };
4%>
5<p class="options multiple">
6        <g:if test="${search.getNumResults() == 0}">
7                <a href="#" onClick="return false;" class="searchIn disabled">Search within results</a>
8        </g:if>
9        <g:else>
10                <g:link class="searchIn" action="searchIn" id="${queryId}">Search within results</g:link>
11        </g:else>
12        <br />
13       
14        <g:each in="${refineActions}" var="action">
15                <g:if test="${search.getNumResults() == 0}">
16                        <a href="#" onClick="return false;" class="refineSearch ${action.name} disabled">${action.description}</a>
17                </g:if>
18                <g:else>
19                        <a class="refineSearch ${action.name}" href="${action.url}" onClick="performAction( $('form#results'), '${action.name.encodeAsJavaScript()}', '${action.module.encodeAsJavaScript()}', '${action.submitUrl.encodeAsJavaScript()}', true ); return false;">${action.description}</a>
20                </g:else>
21                <br />
22        </g:each>
23       
24        <g:link class="search" action="index">Search again</g:link><br />
25        <g:link class="discard" action="discard" id="${queryId}">Discard results</g:link><br />
26        <g:link class="listPrevious" action="list">Previous searches</g:link>
27</p>
28<p class="options multiple">
29        <g:each in="${otherActions}" var="action">
30                <g:if test="${search.getNumResults() == 0}">
31                        <a href="#" onClick="return false;" class="performAction ${action.name} disabled">${action.description}</a>
32                </g:if>
33                <g:else>
34                        <a class="performAction ${action.name}" href="${action.url}" onClick="performAction( $('form#results'), '${action.name.encodeAsJavaScript()}', '${action.module.encodeAsJavaScript()}', '${action.submitUrl.encodeAsJavaScript()}' ); return false;">${action.description}</a>
35                </g:else>
36                <br />
37        </g:each>
38</p>
39<br clear="all">
Note: See TracBrowser for help on using the repository browser.