Files
old-holivud2/app/views/broadcasts/_broadcast_recordings.html.erb
2020-08-25 11:24:55 +03:00

20 lines
1.1 KiB
Plaintext

<% if recordings.present? %>
<p>Click below to download the recordings of the live stream.</p>
<ul class="mt-2">
<% recordings.each do |recording| %>
<li>
<%= link_to(recording.download_file_name, recording.download_url, target: "_blank") %>
<% if (controller.class.module_parent.to_s != "Public" && policy(BroadcastRecording).destroy?) %>
<%= link_to "Hide", [broadcast.project, broadcast, recording], class: "btn-sm btn-primary ml-1 text-decoration-none", remote: true, method: :delete, data: { confirm: t('.confirm_hide') } %>
<% end %>
<img class="img-thumbnail img-fluid mt-2 mb-2" src="<%= "https://image.mux.com/#{recording.asset_playback_uid}/thumbnail.jpg?width=300" %>" alt="Recording preview">
</li>
<% end %>
</ul>
<div id="recordings_pagination" class="row mt-5 justify-content-center">
<%= will_paginate(recordings, params: {controller: "broadcasts", action: "show", project_id: broadcast.project_id, id: broadcast.id, page: params[:page], active_tab: 'recordings'}) %>
</div>
<% else %>
<p>Recording of the live stream will appear here.</p>
<% end %>