Sha256: 8fda00250eab3c82ccc391087179594a96a9d9becb6fc893915c95982643c386

Contents?: true

Size: 1.6 KB

Versions: 2

Compression:

Stored size: 1.6 KB

Contents

<% if @generic_file.image? %>
  <a href="<%= sufia.download_path(@generic_file) %>" target="_new" title="Download the full-sized image"><img src="<%= sufia.download_path(@generic_file, {:datastream_id => 'thumbnail'}) %>" width="338" alt="Download the full-sized image of <%= @generic_file.title.first %>"/>Download the full-sized image</a>
<% elsif @generic_file.video? %>
  <video controls="controls" class="video-js vjs-default-skin" data-setup="{}" preload="auto">
    <source src="<%= sufia.download_path(@generic_file, datastream_id: 'webm') %>" type="video/webm" />
    <source src="<%= sufia.download_path(@generic_file, datastream_id: 'mp4') %>" type="video/mp4" />
    Your browser does not support the video tag.
  </video>
<% elsif @generic_file.audio? %>
  <audio controls="controls" class="video-js vjs-default-skin" data-setup="{}" preload="auto">
    <source src="<%= sufia.download_path(@generic_file, datastream_id: 'ogg') %>" type="audio/ogg" />
    <source src="<%= sufia.download_path(@generic_file, datastream_id: 'mp3') %>" type="audio/mpeg" />
    Your browser does not support the audio tag.
  </audio>
<% elsif @generic_file.pdf?%>
  <a href="<%= sufia.download_path(@generic_file) %>" target="_new" title="Download the full-sized PDF"><img src="<%= sufia.download_path(@generic_file, datastream_id: 'thumbnail') %>" width="338" alt="Download the full-sized PDF of <%= @generic_file.title.first %>"/>Download the full-sized PDF</a>
<% else %>
  <a href="<%= sufia.download_path(@generic_file) %>" target="_new"><img src="/assets/default.png" alt="No preview available" width="338" height="493" /></a>
<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sufia-3.6.1 app/views/generic_files/_media_display.html.erb
sufia-3.6.0 app/views/generic_files/_media_display.html.erb