Skip to content

Commit

Permalink
Add in message and notification on Article (#2541)
Browse files Browse the repository at this point in the history
* Add in message and notification on Article

* Add notify to deposited
  • Loading branch information
lamtu1 authored Nov 3, 2023
1 parent 2cd54dc commit 5f0f308
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 107 deletions.

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.

0 comments on commit 5f0f308

Please sign in to comment.