Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show works in workflows to the admin. Fixes #855
- Loading branch information
Showing
8 changed files
with
50 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module Hyrax | ||
# Returns all works, either active or suppressed. | ||
# This should only be used by an admin user | ||
class WorksSearchBuilder < ActiveWorksSearchBuilder | ||
self.default_processor_chain -= [:only_active_works] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
<table class="table table-striped"> | ||
<table class="table table-striped works-list"> | ||
<caption class="sr-only"><%= t("hyrax.dashboard.my.sr.listing") %> <%= application_name %></caption> | ||
<thead> | ||
<tr> | ||
<th><%= t("hyrax.dashboard.my.heading.title") %></th> | ||
<th class="date"><%= t("hyrax.dashboard.my.heading.date_uploaded") %></th> | ||
<th><%= t("blacklight.search.fields.facet.suppressed_bsi") %></th> | ||
<th><%= t("hyrax.dashboard.my.heading.visibility") %></th> | ||
<th><%= t("hyrax.dashboard.my.heading.action") %></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<% docs.each_with_index do |document, counter| %> | ||
<%= render 'list_works', document: document, counter: counter, presenter: Hyrax::WorkShowPresenter.new(document, current_ability) %> | ||
<%= render 'list_works', document: document, | ||
counter: counter, | ||
presenter: Hyrax::WorkShowPresenter.new(document, current_ability) %> | ||
<% end %> | ||
</tbody> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
require 'spec_helper' | ||
|
||
RSpec.describe Hyrax::WorksSearchBuilder do | ||
describe "::default_processor_chain" do | ||
subject { described_class.default_processor_chain } | ||
let(:blacklight_filters) do | ||
# These filters are in Blacklight::Solr::SearchBuilderBehavior | ||
[ | ||
:default_solr_parameters, | ||
:add_query_to_solr, | ||
:add_facet_fq_to_solr, | ||
:add_facetting_to_solr, | ||
:add_solr_fields_to_query, | ||
:add_paging_to_solr, | ||
:add_sorting_to_solr, | ||
:add_group_config_to_solr, | ||
:add_facet_paging_to_solr, | ||
:add_access_controls_to_solr_params | ||
] | ||
end | ||
|
||
it { is_expected.to eq blacklight_filters + [:filter_models] } | ||
end | ||
end |