Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add in message and notification on Article #2541

Merged
merged 2 commits into from
Nov 3, 2023
Merged
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

This file was deleted.

1 change: 0 additions & 1 deletion app/controllers/hyrax/articles_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ module Hyrax
class ArticlesController < ApplicationController
# Adds Hyrax behaviors to the controller.
include ScholarsArchive::WorksControllerBehavior
include ScholarsArchive::ArticlesControllerBehavior
include ScholarsArchive::RedirectIfRestrictedBehavior
include Hyrax::BreadcrumbsForWorks
self.curation_concern_type = Article
Expand Down
16 changes: 0 additions & 16 deletions app/mailers/scholars_archive/articles_notification_mailer.rb

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,17 @@ def subject
# rubocop:disable Metrics/MethodLength
# rubocop:disable Lint/Void
def message
if !SolrDocument.find(work_id)['resource_type_tesim']&.include?('Dataset')
if SolrDocument.find(work_id)['resource_type_tesim']&.include?('Article')
"ScholarsArchive@OSU has received your deposit: #{title}
<br />
The citable URL for your article is: #{link_to citeable_url, citeable_url}
<br /><br/>
If you have questions, please respond to this email.
<br/>
Thank you,
<br />
ScholarsArchive@OSU Admin"
elsif !SolrDocument.find(work_id)['resource_type_tesim']&.include?('Dataset')
"ScholarsArchive@OSU has received your deposit: #{title} (#{link_to work_id, citeable_url}). Your item is under review by repository administrators. You will be notified if your deposit requires additional changes and/or when your deposit is live in the repository. \n\n #{comment}"
else
"ScholarsArchive@OSU has received your deposit: #{title} (#{link_to work_id, citeable_url}). Your item is under review by repository administrators. You will be notified if your deposit requires additional changes and/or when your deposit is live in the repository.<br />
Expand Down

This file was deleted.

5 changes: 5 additions & 0 deletions config/workflows/self_deposit.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
"name": "Deposit",
"from_states": [],
"transition_to": "Deposited",
"notifications": [{
"notification_type": "email",
"name": "ScholarsArchive::Workflow::DepositReceivedNotification",
"to": ["depositing"]
}],
"methods": [
"Hyrax::Workflow::GrantEditToDepositor",
"Hyrax::Workflow::ActivateObject"
Expand Down
23 changes: 0 additions & 23 deletions spec/mailers/scholars_archive/articles_notification_mailer_spec.rb

This file was deleted.