diff --git a/app/views/collection_mailer/item_added_notification.html.erb b/app/views/collection_mailer/item_added_notification.html.erb index 749e9e73b2f..463e94afbb3 100644 --- a/app/views/collection_mailer/item_added_notification.html.erb +++ b/app/views/collection_mailer/item_added_notification.html.erb @@ -10,7 +10,11 @@ <% if @creation.is_a?(Work) %> <%= style_link(@creation.title.html_safe, work_url(@creation)) %> <% else %> + <% if @creation.bookmarkable == nil %> + Bookmark of deleted item + <% else %> <%= style_link("A bookmark of: " + @creation.bookmarkable.title.html_safe, bookmark_url(@creation)) %> + <% end %> <% end %> diff --git a/app/views/collection_mailer/item_added_notification.text.erb b/app/views/collection_mailer/item_added_notification.text.erb index cc8b5fb53c0..3339b634709 100644 --- a/app/views/collection_mailer/item_added_notification.text.erb +++ b/app/views/collection_mailer/item_added_notification.text.erb @@ -2,16 +2,20 @@ <% pseuds = @creation.is_a?(Work) ? @creation.pseuds.map{|p| text_pseud(p)}.to_sentence.html_safe : @creation.pseud.name %> -<%= @creation.is_a?(Work) ? @creation.pseuds.length > 0 ? pseuds : @creation.authors_to_sort_on : pseuds %> posted a <%= @creation.is_a?(Work) ? @creation.backdate ? "backdated " : "new " : "new " %> <%= @creation.is_a?(Work) ? "work" : "bookmark" %> to your collection, "<%= @collection.name %>" (<%= collection_url(@collection) %>: +<%= @creation.is_a?(Work) ? @creation.pseuds.length > 0 ? pseuds : @creation.authors_to_sort_on : pseuds %> posted a <%= @creation.is_a?(Work) ? @creation.backdate ? "backdated " : "new " : "new " %> <%= @creation.is_a?(Work) ? "work" : "bookmark" %> to your collection, "<%= @collection.name %>" (<%= collection_url(@collection) %>): <% if @creation.is_a?(Work) %> "<%= @creation.title.html_safe %>" <%= work_url(@creation) %> <% else %> +<% if @creation.bookmarkable == nil %> +Bookmark of deleted item +<% else %> <%= "A bookmark of: " + @creation.bookmarkable.title.html_safe %> <%= bookmark_url(@creation) %> <% end %> <% end %> +<% end %> <% content_for :footer_note do %> You're receiving this email because you've chosen to be notified when new items are added to your collection "<%= @collection.name %>" (<%= collection_url(@collection) %>). Follow the link to change settings if you no longer wish to receive updates.