Skip to content

Commit

Permalink
Merge pull request #1718 from sul-dlss/downloadable_files
Browse files Browse the repository at this point in the history
  • Loading branch information
mjgiarlo authored Nov 10, 2023
2 parents 4cc6695 + 9a66a86 commit 4388120
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,18 @@
</header>

<section class='sul-embed-downloads'>
<h3 class='sul-embed-options-label modal-subheader'>
Files
</h3>
<div class='sul-embed-section'>
<ul>
<%= render Embed::Download::FileListItemComponent.with_collection(viewer.purl_object.downloadable_files) %>
</ul>
</div>
<% if downloadable_files.present? %>
<h3 class='sul-embed-options-label modal-subheader'>
Files
</h3>
<div class='sul-embed-section'>
<ul>
<%= render Embed::Download::FileListItemComponent.with_collection(downloadable_files) %>
</ul>
</div>
<% else %>
<p>No downloads available</p>
<% end %>
</section>

<form method="dialog">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def initialize(viewer:)
attr_reader :viewer

delegate :purl_object, to: :viewer
delegate :druid, :citation_only?, :manifest_json_url, to: :purl_object
delegate :druid, :citation_only?, :manifest_json_url, :downloadable_files, to: :purl_object

def include_transcripts
Settings.enabled_features.transcripts || params[:transcripts] == 'true'
Expand Down

0 comments on commit 4388120

Please sign in to comment.