|
|
@ -102,11 +102,13 @@
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
<% if user %>
|
|
|
|
<% if user %>
|
|
|
|
|
|
|
|
<% playlists = PG_DB.query_all("SELECT id,title FROM playlists WHERE author = $1", user.email, as: {String, String}) %>
|
|
|
|
|
|
|
|
<% if !playlists.empty? %>
|
|
|
|
<form data-onsubmit="return_false" class="pure-form pure-form-stacked" action="/playlist_ajax" method="post">
|
|
|
|
<form data-onsubmit="return_false" class="pure-form pure-form-stacked" action="/playlist_ajax" method="post">
|
|
|
|
<div class="pure-control-group">
|
|
|
|
<div class="pure-control-group">
|
|
|
|
<label for="playlist_id"><%= translate(locale, "Add to playlist: ") %></label>
|
|
|
|
<label for="playlist_id"><%= translate(locale, "Add to playlist: ") %></label>
|
|
|
|
<select style="width:100%" name="playlist_id" id="playlist_id">
|
|
|
|
<select style="width:100%" name="playlist_id" id="playlist_id">
|
|
|
|
<% PG_DB.query_all("SELECT id,title FROM playlists WHERE author = $1", user.email, as: {String, String}).each do |plid, title| %>
|
|
|
|
<% playlists.each do |plid, title| %>
|
|
|
|
<option data-plid="<%= plid %>" value="<%= plid %>"><%= title %></option>
|
|
|
|
<option data-plid="<%= plid %>" value="<%= plid %>"><%= title %></option>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
@ -125,6 +127,7 @@
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
<script src="/js/playlist_widget.js?v=<%= Time.utc.to_unix_ms %>"></script>
|
|
|
|
<script src="/js/playlist_widget.js?v=<%= Time.utc.to_unix_ms %>"></script>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
<% if CONFIG.dmca_content.includes?(video.id) || CONFIG.disabled?("downloads") %>
|
|
|
|
<% if CONFIG.dmca_content.includes?(video.id) || CONFIG.disabled?("downloads") %>
|
|
|
|
<p><%= translate(locale, "Download is disabled.") %></p>
|
|
|
|
<p><%= translate(locale, "Download is disabled.") %></p>
|
|
|
|