-
Notifications
You must be signed in to change notification settings - Fork 2k
/
read.html
46 lines (43 loc) · 1.89 KB
/
read.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
{% extends "organization/read_base.html" %}
{% block page_primary_action %}
{% if h.check_access('package_create', {'owner_org': c.group_dict.id}) %}
{% link_for _('Add Dataset'), controller='package', action='new', group=c.group_dict.id, class_='btn btn-primary', icon='plus-sign-alt' %}
{% endif %}
{% endblock %}
{% block primary_content_inner %}
{% block groups_search_form %}
{% set facets = {
'fields': c.fields_grouped,
'search': c.search_facets,
'titles': c.facet_titles,
'translated_fields': c.translated_fields,
'remove_field': c.remove_field }
%}
{% set sorting = [
(_('Relevance'), 'score desc, metadata_modified desc'),
(_('Name Ascending'), 'title_string asc'),
(_('Name Descending'), 'title_string desc'),
(_('Last Modified'), 'metadata_modified desc'),
(_('Popular'), 'views_recent desc') if g.tracking_enabled else (false, false) ]
%}
{% snippet 'snippets/search_form.html', form_id='organization-datasets-search-form', type='dataset', query=c.q, sorting=sorting, sorting_selected=c.sort_by_selected, count=c.page.item_count, facets=facets, placeholder=_('Search datasets...'), show_empty=request.params, fields=c.fields %}
{% endblock %}
{% block packages_list %}
{% if c.page.items %}
{{ h.snippet('snippets/package_list.html', packages=c.page.items) }}
{% endif %}
{% endblock %}
{% block page_pagination %}
{{ c.page.pager(q=c.q) }}
{% endblock %}
{% endblock %}
{% block organization_facets %}
<div class="filters">
<div>
{% for facet in c.facet_titles %}
{{ h.snippet('snippets/facet_list.html', title=c.facet_titles[facet], name=facet, extras={'id':c.group_dict.id}) }}
{% endfor %}
</div>
<a class="close no-text hide-filters"><i class="icon-remove-sign"></i><span class="text">close</span></a>
</div>
{% endblock %}