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

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

Retrieve the 'orderByFieldList' data from the discovery ws + add new
drop down to set the order by direction and implement the logic
for using this.

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            <?python
21            n,p=c.state.getNext()
22            if p:
23                purl=c.state.geturl(offset=p[0],stride=p[1])
24            if n:
25                nurl=c.state.geturl(offset=n[0],stride=n[1])
26            upper=c.state.offset+c.state.stride-1
27            ?>
28            <div class="resultsBar">
29                <div>
30                    <form action="$c.discoveryUrl" name="orderByForm">
31                                <input type="hidden" name="constraints" value="${c.state.urlformattedconstraints}"/>
32                    <a href="${c.state.constrainedurl}"> Refine search</a><span py:replace="helpIcon('refser_help')"/>
33                    <span py:if="c.state.hits != 0" py:strip="">
34                                | Order By ${XML(h.select('orderBy',option_tags = c.orderByList, onchange="orderByForm.submit()"))}
35                                ${XML(h.select('orderDirection',option_tags = c.orderDirection, onchange="orderByForm.submit()"))}
36                        | Found ${c.state.hits}
37                            <span py:if="p!=[]"> | <a href="$purl"> Previous ${p[1]}</a> </span>
38                                                | Showing ${c.state.offset}-$upper
39                        <span py:if="n!=[]"> | <a href="$nurl"> Next ${n[1]}</a></span>
40                     </span>
41                            </form>
42                </div><div id="refser_help" class="hidden">
43                    <div class="helptxt"><p>
44                    The refined search option allows you to constrain your search by returning you to the advanced search page, but retaining your current search parameters
45                    </p></div>
46                </div>
47            </div>
48            <div py:if="c.state.hits != 0" id="resultsTab">
49                <table>
50                    <thead><tr><th rowspan="2">Dataset description</th><th colspan="2">Temporal&nbsp;coverage</th>
51                        <th rowspan="2">Spatial coverage</th>
52                        <th rowspan="2" width="60px"/>
53                        </tr>
54                    <tr><th> Start date </th>
55                    <th> End date </th>
56                    </tr>
57                    </thead>
58                    <tbody>
59                        <span py:for="i,d in enumerate(c.difs)" py:replace="result(i,d)"/>
60                    </tbody>
61                </table>
62            </div>
63            <div py:if="c.state.hits != 0" class="resultsBar">
64                <a href="${c.state.constrainedurl}"> Refine search</a>
65                | Order By |
66                | Found ${c.state.hits} | Showing ${c.state.offset}-$upper
67                  <span py:if="p!=[]"> | <a href="$purl"> Previous ${p[1]}</a> </span>
68                  <span py:if="n!=[]"> | <a href="$nurl"> Next ${n[1]}</a></span> |
69            </div>
70        </div>
71        <div py:replace="footer()"/>
72    </div>
73    </body>
74</html>
Note: See TracBrowser for help on using the repository browser.