diff --git a/ckanext/nhm/theme/fanstatic/css/nhm.css b/ckanext/nhm/theme/fanstatic/css/nhm.css index 378a1679..618b087d 100644 --- a/ckanext/nhm/theme/fanstatic/css/nhm.css +++ b/ckanext/nhm/theme/fanstatic/css/nhm.css @@ -1468,6 +1468,9 @@ a.toggle-view-filters:after { top: 0; margin-right: 4px; } +.resource-view-filter-options label:after { + content: ""; +} div.resource-view-filter-pills { padding-bottom: 10px; } diff --git a/ckanext/nhm/theme/fanstatic/scripts/modules/resource-view-filter-options.js b/ckanext/nhm/theme/fanstatic/scripts/modules/resource-view-filter-options.js index 2e144499..7e69d908 100644 --- a/ckanext/nhm/theme/fanstatic/scripts/modules/resource-view-filter-options.js +++ b/ckanext/nhm/theme/fanstatic/scripts/modules/resource-view-filter-options.js @@ -28,7 +28,7 @@ this.ckan.module('resource-view-filter-options', function ($, _) { $input.prependTo($label); $label.appendTo($filterOptions); - + $filterOptions.append($('
')) } self.el.append($filterOptions); diff --git a/ckanext/nhm/views/specimen.py b/ckanext/nhm/views/specimen.py index d0a374d4..07b04b59 100755 --- a/ckanext/nhm/views/specimen.py +++ b/ckanext/nhm/views/specimen.py @@ -36,6 +36,10 @@ class SpecimenView(DefaultView): 'gbifIssue' ] + type_status_filters = ['Type', 'Paratype', 'Holotype', 'Syntype', 'Isotype', 'Lectotype', 'Syntypes', 'Paratypes', + 'Paralectotype', 'Isolectotype', 'Types', 'Cotype', 'Isosyntype', 'Cotypes', 'Paralectotypes', + 'Allotype', 'Neotype', 'Topotype', 'Neohapantotype', 'Hapantotype', 'Parahapantotype', + 'Schizoholotype', 'Topotypes', 'Isoneotype', 'Hypotype'] # Additional search filter options filter_options = { '_has_image': { @@ -55,6 +59,10 @@ class SpecimenView(DefaultView): # # 'sql': ('NOT (LOWER("{}"."centroid"::text) = ANY(\'{{true,yes,1}}\'))'.format(resource_id),), # 'solr': 'centroid:false' # }, + '_has_type': { + 'label': 'Is type', + 'solr': 'typeStatus:({})'.format(' OR '.join(type_status_filters)) + }, '_exclude_mineralogy': { 'label': 'Exclude Mineralogy', 'hide': True,