Videos: Fix 0 views and empty license field (#3557)

This commit is contained in:
Samantaz Fox
2023-03-20 19:15:12 +01:00
6 changed files with 45 additions and 158 deletions

View File

@@ -181,7 +181,11 @@ we're going to need to do it here in order to allow for translations.
<% end %>
</p>
<% if video.license %>
<p id="license"><%= translate(locale, "License: ") %><%= video.license %></p>
<% if video.license.empty? %>
<p id="license"><%= translate(locale, "License: ") %><%= translate(locale, "Standard YouTube license") %></p>
<% else %>
<p id="license"><%= translate(locale, "License: ") %><%= video.license %></p>
<% end %>
<% end %>
<p id="family_friendly"><%= translate(locale, "Family friendly? ") %><%= translate_bool(locale, video.is_family_friendly) %></p>
<p id="wilson" style="display: none; visibility: hidden;"></p>