-
Notifications
You must be signed in to change notification settings - Fork 2k
/
search.html
74 lines (61 loc) · 2.69 KB
/
search.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:i18n="http://genshi.edgewall.org/i18n"
xmlns:py="http://genshi.edgewall.org/"
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="">
<xi:include href="../facets.html" />
<py:def function="page_title">Search - ${g.site_title}</py:def>
<py:def function="page_heading">Search - ${g.site_title}</py:def>
<py:match path="primarysidebar">
<li class="widget-container boxed widget_text" py:if="h.check_access('package_create')">
<h3>Add a dataset</h3>
<p>
Do you know of a dataset that should be added to ${g.site_title}?
<br/>
<a href="${h.url_for(controller='package', action='new', id=None)}">Register it now</a>.
</p>
</li>
${facet_div('tags', 'Tags')}
${facet_div('res_format', 'Resource Formats')}
${facet_div('groups', 'Groups')}
<li class="widget-container widget_text">
<h2>Other access</h2>
<?python
from pylons import config
dumps_url = config.get('ckan.dumps_url')
dumps_format = config.get('ckan.dumps_format', '')
?>
<p>
You can also access this registry using the
${h.link_to(_('API'), h.url_for(controller='api', action='get_api', id=None, ver=1))}
(see ${h.link_to(_('API Docs'), 'http://docs.ckan.org/en/latest/api.html')})<py:if test="dumps_url">
or download a <a href="${dumps_url}">full ${dumps_format}
dump</a></py:if>.
</p>
</li>
</py:match>
<div py:match="content">
<xi:include href="search_form.html" />
${field_list()}
<py:if test="c.query_error">
<p i18n:msg="item_count"><strong>There was an error while searching.</strong>
Please try again.</p>
</py:if>
<py:if test="request.params">
<h4 i18n:msg="item_count"><strong>${c.page.item_count}</strong> datasets found</h4>
</py:if>
<py:if test="c.page.item_count == 0 and request.params">
<p i18n:msg="">Would you like to <a href="${h.url_for(action='new', id=None)}">create a new dataset?</a></p>
</py:if>
${package_list_from_dict(c.page.items)}
${c.page.pager(q=c.q)}
</div>
<py:def function="optional_feed">
<link rel="alternate" type="application/atom+xml" title="${g.site_title} - Datasets found with custom search: '${c.search_url_params}'"
href="${h.url(controller='feed', action='custom')}?${c.search_url_params}" />
<link rel="alternate" type="application/atom+xml" title="${g.site_title} - Recent Revision History"
href="${h.url_for(controller='revision', action='list', format='atom', days=1)}" />
</py:def>
<xi:include href="layout.html" />
</html>