@@ -89,18 +89,18 @@ class CatalogController < ApplicationController
89
89
config . add_facet_field 'unit_ssim' , label : 'Unit' , limit : 5
90
90
config . add_facet_field 'language_ssim' , label : 'Language' , limit : 5
91
91
# Hide these facets if not a Collection Manager
92
- config . add_facet_field 'workflow_published_sim' , label : 'Published' , limit : 5 , if : Proc . new { |context , config , opts | Ability . new ( context . current_user , context . user_session ) . can? :create , MediaObject } , group : "workflow"
93
- config . add_facet_field 'avalon_uploader_ssi' , label : 'Created by' , limit : 5 , if : Proc . new { |context , config , opts | Ability . new ( context . current_user , context . user_session ) . can? :create , MediaObject } , group : "workflow"
94
- config . add_facet_field 'read_access_group_ssim' , label : 'Item access' , if : Proc . new { |context , config , opts | Ability . new ( context . current_user , context . user_session ) . can? :create , MediaObject } , group : "workflow" , query : {
92
+ config . add_facet_field 'workflow_published_sim' , label : 'Published' , limit : 5 , if : Proc . new { |context , config , opts | context . current_ability . can? :create , MediaObject } , group : "workflow"
93
+ config . add_facet_field 'avalon_uploader_ssi' , label : 'Created by' , limit : 5 , if : Proc . new { |context , config , opts | context . current_ability . can? :create , MediaObject } , group : "workflow"
94
+ config . add_facet_field 'read_access_group_ssim' , label : 'Item access' , if : Proc . new { |context , config , opts | context . current_ability . can? :create , MediaObject } , group : "workflow" , query : {
95
95
public : { label : "Public" , fq : "has_model_ssim:MediaObject AND read_access_group_ssim:#{ Hydra ::AccessControls ::AccessRight ::PERMISSION_TEXT_VALUE_PUBLIC } " } ,
96
96
restricted : { label : "Authenticated" , fq : "has_model_ssim:MediaObject AND read_access_group_ssim:#{ Hydra ::AccessControls ::AccessRight ::PERMISSION_TEXT_VALUE_AUTHENTICATED } " } ,
97
97
private : { label : "Private" , fq : "has_model_ssim:MediaObject AND NOT read_access_group_ssim:#{ Hydra ::AccessControls ::AccessRight ::PERMISSION_TEXT_VALUE_PUBLIC } AND NOT read_access_group_ssim:#{ Hydra ::AccessControls ::AccessRight ::PERMISSION_TEXT_VALUE_AUTHENTICATED } " }
98
98
}
99
- config . add_facet_field 'read_access_virtual_group_ssim' , label : 'External Group' , limit : 5 , if : Proc . new { |context , config , opts | Ability . new ( context . current_user , context . user_session ) . can? :create , MediaObject } , group : "workflow" , helper_method : :vgroup_display
100
- config . add_facet_field 'date_digitized_ssim' , label : 'Date Digitized' , limit : 5 , if : Proc . new { |context , config , opts | Ability . new ( context . current_user , context . user_session ) . can? :create , MediaObject } , group : "workflow" #, partial: 'blacklight/hierarchy/facet_hierarchy'
101
- config . add_facet_field 'date_ingested_ssim' , label : 'Date Ingested' , limit : 5 , if : Proc . new { |context , config , opts | Ability . new ( context . current_user , context . user_session ) . can? :create , MediaObject } , group : "workflow"
102
- config . add_facet_field 'has_captions_bsi' , label : 'Has Captions' , if : Proc . new { |context , config , opts | Ability . new ( context . current_user , context . user_session ) . can? :create , MediaObject } , group : "workflow" , helper_method : :display_has_caption_or_transcript
103
- config . add_facet_field 'has_transcripts_bsi' , label : 'Has Transcripts' , if : Proc . new { |context , config , opts | Ability . new ( context . current_user , context . user_session ) . can? :create , MediaObject } , group : "workflow" , helper_method : :display_has_caption_or_transcript
99
+ config . add_facet_field 'read_access_virtual_group_ssim' , label : 'External Group' , limit : 5 , if : Proc . new { |context , config , opts | context . current_ability . can? :create , MediaObject } , group : "workflow" , helper_method : :vgroup_display
100
+ config . add_facet_field 'date_digitized_ssim' , label : 'Date Digitized' , limit : 5 , if : Proc . new { |context , config , opts | context . current_ability . can? :create , MediaObject } , group : "workflow" #, partial: 'blacklight/hierarchy/facet_hierarchy'
101
+ config . add_facet_field 'date_ingested_ssim' , label : 'Date Ingested' , limit : 5 , if : Proc . new { |context , config , opts | context . current_ability . can? :create , MediaObject } , group : "workflow"
102
+ config . add_facet_field 'has_captions_bsi' , label : 'Has Captions' , if : Proc . new { |context , config , opts | context . current_ability . can? :create , MediaObject } , group : "workflow" , helper_method : :display_has_caption_or_transcript
103
+ config . add_facet_field 'has_transcripts_bsi' , label : 'Has Transcripts' , if : Proc . new { |context , config , opts | context . current_ability . can? :create , MediaObject } , group : "workflow" , helper_method : :display_has_caption_or_transcript
104
104
105
105
# Have BL send all facet field names to Solr, which has been the default
106
106
# previously. Simply remove these lines if you'd rather use Solr request
0 commit comments