diff --git a/ckanext/qdes_schema/plugin.py b/ckanext/qdes_schema/plugin.py index 97d09c3d..4930ff50 100644 --- a/ckanext/qdes_schema/plugin.py +++ b/ckanext/qdes_schema/plugin.py @@ -416,6 +416,12 @@ def dataset_facets(self, facets_dict, package_type): return ordered_facets + def group_facets(self, facets_dict, group_type, package_type): + return self.dataset_facets(facets_dict, 'dataset') + + def organization_facets(self, facets_dict, organization_type, package_type): + return self.dataset_facets(facets_dict, 'dataset') + # IAuthFunctions def get_auth_functions(self): return { diff --git a/ckanext/qdes_schema/templates/group/read.html b/ckanext/qdes_schema/templates/group/read.html new file mode 100644 index 00000000..d7d56450 --- /dev/null +++ b/ckanext/qdes_schema/templates/group/read.html @@ -0,0 +1,21 @@ +{% ckan_extends %} + +{% block secondary_content %} + {% snippet "group/snippets/info.html", group=group_dict, show_nums=true %} + + {% set default_extent = h.get_qld_bounding_box_config() %} + {% snippet "snippets/spatial_query.html", default_extent=default_extent, extras={'id':group_dict.id} %} + +
+
+ {% for facet in facet_titles %} + {% if facet == 'temporal_start' or facet == 'temporal_end' %} + {{ h.snippet('snippets/facet_list_temporal.html', title=facet_titles[facet], name=facet, search_facets=search_facets, extras={'id':group_dict.id}) }} + {% elif not facet in ['collection_package_id', 'temporal_coverage_from', 'temporal_coverage_to'] %} + {{ h.snippet('snippets/facet_list.html', title=facet_titles[facet], name=facet, extras={'id':group_dict.id}) }} + {% endif %} + {% endfor %} +
+ close +
+{% endblock %} diff --git a/ckanext/qdes_schema/templates/organization/read.html b/ckanext/qdes_schema/templates/organization/read.html new file mode 100644 index 00000000..178aaba8 --- /dev/null +++ b/ckanext/qdes_schema/templates/organization/read.html @@ -0,0 +1,19 @@ +{% ckan_extends %} + +{% block organization_facets %} + {% set default_extent = h.get_qld_bounding_box_config() %} + {% snippet "snippets/spatial_query.html", default_extent=default_extent, extras={'id':group_dict.id} %} + +
+
+ {% for facet in facet_titles %} + {% if facet == 'temporal_start' or facet == 'temporal_end' %} + {{ h.snippet('snippets/facet_list_temporal.html', title=facet_titles[facet], name=facet, search_facets=search_facets, extras={'id':group_dict.id}) }} + {% elif not facet in ['collection_package_id', 'temporal_coverage_from', 'temporal_coverage_to'] %} + {{ h.snippet('snippets/facet_list.html', title=facet_titles[facet], name=facet, extras={'id':group_dict.id}) }} + {% endif %} + {% endfor %} +
+ close +
+{% endblock %} diff --git a/ckanext/qdes_schema/templates/snippets/facet_list_temporal.html b/ckanext/qdes_schema/templates/snippets/facet_list_temporal.html index aaa9effc..242939d0 100644 --- a/ckanext/qdes_schema/templates/snippets/facet_list_temporal.html +++ b/ckanext/qdes_schema/templates/snippets/facet_list_temporal.html @@ -13,7 +13,7 @@

{{ _('Temporal coverage') }}

-
+
diff --git a/ckanext/qdes_schema/templates/snippets/spatial_query.html b/ckanext/qdes_schema/templates/snippets/spatial_query.html index 153171e8..b44b26bf 100644 --- a/ckanext/qdes_schema/templates/snippets/spatial_query.html +++ b/ckanext/qdes_schema/templates/snippets/spatial_query.html @@ -15,7 +15,7 @@

{{ _('Location') }} - {{ _('Clear map') }} + {{ _('Clear map') }}