source: MILK/trunk/milk_server/milk_server/templates/browse/short_results.kid @ 5306

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/MILK/trunk/milk_server/milk_server/templates/browse/short_results.kid@5306
Revision 5306, 1.7 KB checked in by cbyrom, 11 years ago (diff)

Add new template method, 'semanticSearch' to do the asynchronous
loading of alternative search options - and replace the previous
template code with this in both results pages. Fix a couple of issues
with the PagerState? object to ensure start/last page stride is set
correctly.

Line 
1<html py:extends="'../ndgPage.kid','../meta.kid'" xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#">
2
3    <head>
4    <replace py:replace="pagehead()"/>
5    <script type="text/javascript">
6                var placeholderNames = ['altSearchPlaceholder'];
7                var dataTypes = ['alternative searches'];
8                var urls = ['$c.altSearchURL'];
9        </script>
10        <script type="text/javascript" src="$g.server/js/yui/build/yui/yui-min.js" />
11        <script type="text/javascript" src="$g.server/js/queueDeployments.js"/>
12    </head>
13    <body>
14    <tr py:def="resultsrow(item)" class="shortResult">
15        <td><a href="${item.link}">${item.name}</a></td><td>${item.type}</td>
16    </tr>
17   
18    <div id="entirepage">
19        <div py:replace="header()"/>
20        <div py:replace="PageTabs('Results')"/>
21        <div py:replace="searchOneLine(targets=c.searchTarget)"/>
22        <div id="results">
23            <div id="context">
24                ${c.state.hits} results for ${c.state.searchString} (${XML(c.state.constraints)})</div>
25                <div py:replace="semanticSearch()"/>
26            <div class="resultsBar">
27                        <div py:replace="pageControl(c.state, c.discoveryUrl)"/>
28            </div>
29            <div id="resultsTab">
30                <table width="100%">
31                    <thead><tr><th rowspan="2">Name</th><th colspan="1">Type</th></tr>
32                    </thead>
33                    <tbody>
34                        <tr py:for="item in c.results" py:replace="resultsrow(item)"/>
35                    </tbody>
36                </table>
37            </div>
38                <div py:replace="pageControl(c.state, None)"/>
39        </div>
40        <div py:replace="footer()"/>
41    </div>
42    </body>
43</html>
Note: See TracBrowser for help on using the repository browser.