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
8 changes: 2 additions & 6 deletions app/helpers/hyrax/embargo_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def about_to_expire_embargo_email( asset:, expiration_days:, email_owner: true,
visibility = visibility_on_embargo_deactivation( curation_concern: curation_concern )
url = ::Deepblue::EmailHelper.curation_concern_url( curation_concern: curation_concern )
email = curation_concern.authoremail
::Deepblue::LoggingHelper.debug "about_to_expire_embargo_email: curation concern id: #{id} email: #{email} exipration_days: #{expiration_days}" if verbose
::Deepblue::LoggingHelper.debug "about_to_expire_embargo_email: curation concern id: #{id} email: #{email} expiration_days: #{expiration_days}" if verbose
body = []
body << ::Deepblue::EmailHelper.t( "hyrax.email.about_to_expire_embargo.for",
expiration_days: expiration_days,
Expand Down Expand Up @@ -84,7 +84,7 @@ def about_to_expire_embargo_email( asset:, expiration_days:, email_owner: true,
::Deepblue::EmailHelper.send_email( to: email, from: email, subject: subject, body: body ) unless test_mode
end

def days_to_embargo_release_date( now: DateTime.now, embargo_release_date: )
def days_to_embargo_release_date( embargo_release_date: )
embargo_release_date = DateTime.parse "#{embargo_release_date} #{Time.zone}" if embargo_release_date.is_a? String
((embargo_release_date - @start_of_day).to_f + 0.5).to_i
end
Expand Down Expand Up @@ -202,10 +202,6 @@ def my_assets_with_deactivated_embargoes( current_user_key )
@my_assets_with_deactivated_embargoes ||= EmbargoService.my_assets_with_deactivated_embargoes( current_user_key )
end

def warn_deactivate_embargo_email( curation_concern:, days: )
# TODO
end

def visibility_on_embargo_deactivation( curation_concern: )
curation_concern.to_solr["visibility_after_embargo_ssim"]
end
Expand Down
Loading