source: MILK/trunk/milk_server/milk_server/templates/browse/results.kid @ 5305

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

Improve structure of DiscoveryState? module by adding a new object,
PagerState? to hold the data connected to the results table paging.
Also tidy up code layout and simplify logic. Create new template
method, pagerControl, to represent the results table paging control

  • to allow reuse across the results and short_results templates.
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    </head>
6    <body>
7    <div id="entirepage">
8        <div py:replace="header()"/>
9        <div py:replace="PageTabs('Results')"/>
10        <div py:replace="searchOneLine()"/>
11        <div id="results">
12            <div id="context">
13                ${c.state.hits} results for "${c.state.searchString}" (${XML(c.state.constraints)})</div>
14            <div id="SemanticSearchBox"><div id="SemanticSearchResults">
15                <div py:if="c.state.searchString!=''">
16                Not found what you are looking for? Try ${XML(h.link_to_remote("alternative searches",dict(update="SemanticSearchBox",
17                        url='%s?%s'%(h.url_for(action='semantic'),c.querystring))))}.
18                </div></div>
19            </div>
20                <div py:replace="pageControl(c.state, c.discoveryUrl)"/>
21            <div py:if="c.state.hits != 0" id="resultsTab">
22                <table>
23                    <thead><tr><th rowspan="2">Dataset description</th><th colspan="2">Temporal&nbsp;coverage</th>
24                        <th rowspan="2">Spatial coverage</th>
25                        <th rowspan="2" width="60px"/>
26                        </tr>
27                    <tr><th> Start date </th>
28                    <th> End date </th>
29                    </tr>
30                    </thead>
31                    <tbody>
32                        <span py:for="i,d in enumerate(c.difs)" py:replace="result(i,d)"/>
33                    </tbody>
34                </table>
35                        <div py:replace="pageControl(c.state, None)"/>
36            </div>
37        </div>
38        <div py:replace="footer()"/>
39    </div>
40    </body>
41</html>
Note: See TracBrowser for help on using the repository browser.