Fixed issues with inaccessible recording (#2755)

This commit is contained in:
Ahmad Farhat
2021-06-03 17:25:26 -04:00
committed by GitHub
parent 0f90c4e873
commit 506a26ac86
2 changed files with 5 additions and 5 deletions

View File

@ -42,7 +42,7 @@
<div class="dropdown">
<% if recording[:metadata][:"gl-listed"] == "true" %>
<button class="btn btn-sm btn-secondary dropdown-toggle" data-toggle="dropdown"><i class="dropdown-icon fas fa-globe px-2"></i> <%= t("recording.visibility.public") %></button>
<% elsif recording[:state] == "unpublished" %>
<% elsif !recording[:published] %>
<button class="btn btn-sm btn-secondary dropdown-toggle" data-toggle="dropdown"><i class="dropdown-icon fas fa-lock px-2"></i> <%= t("recording.visibility.inaccessible") %></button>
<% else %>
<button class="btn btn-sm btn-secondary dropdown-toggle" data-toggle="dropdown"><i class="dropdown-icon fas fa-link px-2"></i> <%= t("recording.visibility.unlisted") %></button>
@ -61,7 +61,7 @@
</div>
</td>
<td>
<% unless recording[:state] == "unpublished" %>
<% if recording[:published] %>
<% sorted_formats = recording[:playbacks].sort_by! { |p| p[:type] } %>
<% sorted_formats.each do |p| %>
<%= link_to t("recording.format.#{p[:type]}"), p[:url], class: "btn btn-sm btn-primary", target: "_blank" %>