-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into collections-sprint
# Conflicts: # spec/lib/hyrax/configuration_spec.rb # spec/views/catalog/_index_list_default.html.erb_spec.rb
- Loading branch information
Showing
80 changed files
with
552 additions
and
247 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
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,23 @@ | ||
module Hyrax | ||
module Actors | ||
# Notify the provided owner that their proxy wants to make a | ||
# deposit on their behalf | ||
class TransferRequestActor < AbstractActor | ||
# @param [Hyrax::Actors::Environment] env | ||
# @return [Boolean] true if create was successful | ||
def create(env) | ||
next_actor.create(env) && create_proxy_deposit_request(env) | ||
end | ||
|
||
private | ||
|
||
def create_proxy_deposit_request(env) | ||
proxy = env.curation_concern.on_behalf_of | ||
return true if proxy.blank? | ||
ContentDepositorChangeEventJob.perform_later(env.curation_concern, | ||
::User.find_by_user_key(proxy)) | ||
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
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
25 changes: 25 additions & 0 deletions
25
app/renderers/hyrax/renderers/rights_statement_attribute_renderer.rb
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,25 @@ | ||
module Hyrax | ||
module Renderers | ||
# This is used by PresentsAttributes to show licenses | ||
# e.g.: presenter.attribute_to_html(:rights_statement, render_as: :rights_statement) | ||
class RightsStatementAttributeRenderer < AttributeRenderer | ||
private | ||
|
||
## | ||
# Special treatment for license/rights. A URL from the Hyrax gem's config/hyrax.rb is stored in the descMetadata of the | ||
# curation_concern. If that URL is valid in form, then it is used as a link. If it is not valid, it is used as plain text. | ||
def attribute_value_to_html(value) | ||
begin | ||
parsed_uri = URI.parse(value) | ||
rescue | ||
nil | ||
end | ||
if parsed_uri.nil? | ||
ERB::Util.h(value) | ||
else | ||
%(<a href=#{ERB::Util.h(value)} target="_blank">#{Hyrax.config.rights_statement_service_class.new.label(value)}</a>) | ||
end | ||
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
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
app/services/hyrax/rights_statements.rb → ...ervices/hyrax/rights_statement_service.rb
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
Oops, something went wrong.