Files
old-holivud2/app/views/broadcasts/_broadcast_recordings.html.erb
Senad Uka 8214ba9e67 Changes
2020-08-03 21:52:04 +00:00

19 lines
972 B
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 %>
</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 %>