diff --git a/app/views/downloads/_download_preface.html.erb b/app/views/downloads/_download_preface.html.erb index ce2eafcf803..9925adab894 100644 --- a/app/views/downloads/_download_preface.html.erb +++ b/app/views/downloads/_download_preface.html.erb @@ -66,14 +66,20 @@ diff --git a/app/views/works/_work_header_notes.html.erb b/app/views/works/_work_header_notes.html.erb index bc35b1a2f84..cea96f6faa9 100644 --- a/app/views/works/_work_header_notes.html.erb +++ b/app/views/works/_work_header_notes.html.erb @@ -38,6 +38,8 @@ <% if related_work.parent.is_a?(ExternalWork) %> <%= link_to related_work.parent.title.html_safe, related_work.parent %> by <%= byline(related_work.parent) %>. + <% elsif related_work.parent.unrevealed? %> + <%= ts("a work in an unrevealed collection.") %> <% elsif related_work.parent.restricted? && !logged_in? %> <%= ts("[Restricted Work] by") %> <%= byline(related_work.parent) %>. <%= ts("Log in to view.") %> <% else %> diff --git a/features/works/work_related.feature b/features/works/work_related.feature index 3ac546142f1..41601eeabde 100644 --- a/features/works/work_related.feature +++ b/features/works/work_related.feature @@ -583,3 +583,18 @@ Scenario: When a user is notified that a co-authored work has been inspired by a And I should not see "A work in an unrevealed collection" And I should not see "Worldbuilding Translated by translator" And I should not see "From English to Deutsch" + + Scenario: A work that is inspired by a work in an unrevealed collection does not list the title or creator of the unrevealed work in its notes + Given a hidden collection "Hidden" + And I have related works setup + When I am logged in as "inspiration" + And I add the work "Worldbuilding" to the collection "Hidden" + And I post a related work as remixer + When I view the work "Followup" + Then I should not see "Worldbuilding" + And I should not see "inspiration" + And I should see "Inspired by a work in an unrevealed collection." + And I follow "HTML" + Then I should not see "Worldbuilding" + And I should not see "inspiration" + And I should see "Inspired by a work in an unrevealed collection."