Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions app/assets/stylesheets/hyrax/_admin_features.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Modify the batch_upload feature flipper to be disabled
tr[data-feature="batch-upload"] {
background-color: #f8f9fa;

td.name {
color: #6c757d !important;
opacity: 0.65 !important;
}

td.status .badge {
background-color: #dc3545 !important;
}

td.toggle .btn-group {
pointer-events: none;
opacity: 0.5;
}
}
24 changes: 12 additions & 12 deletions app/assets/stylesheets/hyrax/_hyrax.scss
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
@import "hyrax/variables", "hyrax/file_sets", "hyrax/settings", "hyrax/html",
"hyrax/header", "hyrax/styles", "hyrax/file-listing",
"hyrax/browse_everything_overrides", "hyrax/nestable", "hyrax/collections",
"hyrax/collection_types", "hyrax/batch-edit", "hyrax/home-page",
"hyrax/featured", "hyrax/usage-stats", "hyrax/catalog", "hyrax/buttons",
"hyrax/tinymce", "hyrax/proxy-rights", "hyrax/file-show", "hyrax/work-show",
"hyrax/modal", "hyrax/forms", "hyrax/form", "hyrax/file_manager",
"hyrax/form-progress", "hyrax/positioning", "hyrax/fixedsticky",
"hyrax/file_upload", "hyrax/representative-media", "hyrax/footer",
"hyrax/select_work_type", "hyrax/users", "hyrax/dashboard", "hyrax/sidebar",
"hyrax/controlled_vocabulary", "hyrax/accessibility", "hyrax/recent",
"hyrax/viewer", "hyrax/breadcrumbs", "hyrax/facets", "hyrax/card",
"hyrax/badge";
"hyrax/header", "hyrax/styles", "hyrax/file-listing",
"hyrax/browse_everything_overrides", "hyrax/nestable", "hyrax/collections",
"hyrax/collection_types", "hyrax/batch-edit", "hyrax/home-page",
"hyrax/featured", "hyrax/usage-stats", "hyrax/catalog", "hyrax/buttons",
"hyrax/tinymce", "hyrax/proxy-rights", "hyrax/file-show", "hyrax/work-show",
"hyrax/modal", "hyrax/forms", "hyrax/form", "hyrax/file_manager",
"hyrax/form-progress", "hyrax/positioning", "hyrax/fixedsticky",
"hyrax/file_upload", "hyrax/representative-media", "hyrax/footer",
"hyrax/select_work_type", "hyrax/users", "hyrax/dashboard", "hyrax/sidebar",
"hyrax/controlled_vocabulary", "hyrax/accessibility", "hyrax/recent",
"hyrax/viewer", "hyrax/breadcrumbs", "hyrax/facets", "hyrax/card",
"hyrax/badge", "hyrax/admin_features";
@import "hydra-editor/multi_value_fields";
@import "typeahead";
@import "sharing_buttons";
Expand Down
11 changes: 11 additions & 0 deletions app/strategies/hyrax/strategies/disable_feature_strategy.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true
module Hyrax::Strategies
class DisableFeatureStrategy < Flipflop::Strategies::AbstractStrategy
def enabled?(feature)
# Set batch upload to disabled
return false if feature == :batch_upload
# Return nil to pass through to next strategy for other features
nil
end
end
end
6 changes: 5 additions & 1 deletion config/features.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
Flipflop.configure do
# Strategies will be used in the order listed here.
strategy :cookie
# Configuration to prevent features from being enabled
strategy Hyrax::Strategies::DisableFeatureStrategy
strategy :active_record, class: Hyrax::Feature
strategy Hyrax::Strategies::YamlStrategy, config: Hyrax.config.feature_config_path
strategy :default
Expand Down Expand Up @@ -39,9 +41,11 @@
default: true,
description: "Ability to assign uploaded items to an admin set"

# rubocop:disable Layout/LineLength
feature :batch_upload,
default: false,
description: "Enable uploading batches of works"
description: "<strong>NOTICE:</strong> This feature has been temporarily disabled. To add or upload works in bulk, please use the <a href='https://github.com/samvera/bulkrax/wiki' target='_blank'>Bulkrax importer</a>.".html_safe
# rubocop:enable Layout/LineLength

feature :proxy_deposit,
default: true,
Expand Down
4 changes: 4 additions & 0 deletions spec/features/batch_edit_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@

describe 'editing' do
it 'changes the value of each field for all selected works' do
skip 'due to temporarily disabling the batch_upload feature'
# Ref: https://github.com/samvera/hyrax/issues/7185
click_on 'batch-edit'
fill_in_batch_edit_fields_and_verify!
reloaded_work1 = wings_disabled ? Hyrax.query_service.find_by(id: work1.id) : work1.reload
Expand Down Expand Up @@ -97,6 +99,8 @@
end

it 'updates visibility' do
skip 'due to temporarily disabling the batch_upload feature'
# Ref: https://github.com/samvera/hyrax/issues/7185
click_on 'batch-edit'
find('#edit_permissions_link').click
batch_edit_expand('permissions_visibility')
Expand Down
Loading