-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #302 from curationexperts/dark_state
Dark state
- Loading branch information
Showing
10 changed files
with
143 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module Hyrax | ||
module Workflow | ||
class HiddenNotification < AbstractNotification | ||
private | ||
|
||
def subject | ||
'Deposit has been hidden' | ||
end | ||
|
||
def message | ||
"#{title} (#{link_to work_id, document_path}) was hidden by #{user.user_key} #{comment}" | ||
end | ||
|
||
def users_to_notify | ||
super << user | ||
end | ||
end | ||
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module Hyrax | ||
module Workflow | ||
## | ||
# Mark an object hidden. It will never be displayed to the public, only | ||
# visible to superusers and school approvers. | ||
# | ||
# @param target [#state] an instance of a model | ||
module HideObject | ||
def self.call(target:, **) | ||
target.hidden = true | ||
end | ||
end | ||
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module Hyrax | ||
module Workflow | ||
class UnhiddenNotification < AbstractNotification | ||
private | ||
|
||
def subject | ||
'Deposit has been unhidden' | ||
end | ||
|
||
def message | ||
"#{title} (#{link_to work_id, document_path}) was unhidden by #{user.user_key} #{comment}" | ||
end | ||
|
||
def users_to_notify | ||
super << user | ||
end | ||
end | ||
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module Hyrax | ||
module Workflow | ||
## | ||
# Remove the hidden flag for an object | ||
# | ||
# @param target [#state] an instance of a model | ||
module UnhideObject | ||
def self.call(target:, **) | ||
target.hidden = false | ||
end | ||
end | ||
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,5 +1,5 @@ | ||
#config/solr_wrapper_test.yml | ||
version: 6.5.1 | ||
version: 6.6.0 | ||
port: 8985 | ||
instance_dir: tmp/solr-test | ||
collection: | ||
|
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