blob: bb72ec3debcba49c25212fcd2b9828f08084d4e5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<% download_link = nil unless defined? download_link %>
<% kind = nil unless defined? kind %>
<% path = nil unless defined? path %>
<% if path.present? %>
<% if kind == 'video' %>
<%= content_tag :video, class: 'filecontent', src: path, controls: true do %>
<%= render partial: 'common/no_preview', locals: { download_link: download_link } %>
<% end %>
<% elsif kind == 'audio' %>
<%= content_tag :audio, class: 'filecontent', src: path, controls: true do %>
<%= render partial: 'common/no_preview', locals: { download_link: download_link } %>
<% end %>
<% else %>
<%= render partial: 'common/no_preview', locals: { download_link: download_link } %>
<% end %>
<% else %>
<%= render partial: 'common/no_preview', locals: { download_link: download_link } %>
<% end %>
|