|
|
|
@ -52,15 +52,12 @@
|
|
|
|
|
<% if !env.get("preferences").as(Preferences).thin_mode %>
|
|
|
|
|
<div class="thumbnail">
|
|
|
|
|
<img loading="lazy" tabindex="-1" class="thumbnail" src="/vi/<%= item.id %>/mqdefault.jpg"/>
|
|
|
|
|
|
|
|
|
|
<% if plid_form = env.get?("remove_playlist_items") %>
|
|
|
|
|
<form data-onsubmit="return_false" action="/playlist_ajax?action_remove_video=1&set_video_id=<%= item.index %>&playlist_id=<%= plid_form %>&referer=<%= env.get("current_page") %>" method="post">
|
|
|
|
|
<input type="hidden" name="csrf_token" value="<%= HTML.escape(env.get?("csrf_token").try &.as(String) || "") %>">
|
|
|
|
|
<p class="watched">
|
|
|
|
|
<a data-onclick="remove_playlist_item" data-index="<%= item.index %>" data-plid="<%= plid_form %>" href="javascript:void(0)">
|
|
|
|
|
<button type="submit" style="all:unset">
|
|
|
|
|
<i class="icon ion-md-trash"></i>
|
|
|
|
|
</button>
|
|
|
|
|
</a>
|
|
|
|
|
<button type="submit" style="all:unset" data-onclick="remove_playlist_item" data-index="<%= item.index %>" data-plid="<%= plid_form %>"><i class="icon ion-md-trash"></i></button>
|
|
|
|
|
</p>
|
|
|
|
|
</form>
|
|
|
|
|
<% end %>
|
|
|
|
@ -108,24 +105,16 @@
|
|
|
|
|
<form data-onsubmit="return_false" action="/watch_ajax?action_mark_watched=1&id=<%= item.id %>&referer=<%= env.get("current_page") %>" method="post">
|
|
|
|
|
<input type="hidden" name="csrf_token" value="<%= HTML.escape(env.get?("csrf_token").try &.as(String) || "") %>">
|
|
|
|
|
<p class="watched">
|
|
|
|
|
<a data-onclick="mark_watched" data-id="<%= item.id %>" href="javascript:void(0)">
|
|
|
|
|
<button type="submit" style="all:unset">
|
|
|
|
|
<i data-mouse="switch_classes" data-switch-classes="ion-ios-eye-off,ion-ios-eye"
|
|
|
|
|
class="icon ion-ios-eye">
|
|
|
|
|
</i>
|
|
|
|
|
<button type="submit" style="all:unset" data-onclick="mark_watched" data-id="<%= item.id %>">
|
|
|
|
|
<i data-mouse="switch_classes" data-switch-classes="ion-ios-eye-off,ion-ios-eye" class="icon ion-ios-eye"></i>
|
|
|
|
|
</button>
|
|
|
|
|
</a>
|
|
|
|
|
</p>
|
|
|
|
|
</form>
|
|
|
|
|
<% elsif plid_form = env.get? "add_playlist_items" %>
|
|
|
|
|
<form data-onsubmit="return_false" action="/playlist_ajax?action_add_video=1&video_id=<%= item.id %>&playlist_id=<%= plid_form %>&referer=<%= env.get("current_page") %>" method="post">
|
|
|
|
|
<input type="hidden" name="csrf_token" value="<%= HTML.escape(env.get?("csrf_token").try &.as(String) || "") %>">
|
|
|
|
|
<p class="watched">
|
|
|
|
|
<a data-onclick="add_playlist_item" data-id="<%= item.id %>" data-plid="<%= plid_form %>" href="javascript:void(0)">
|
|
|
|
|
<button type="submit" style="all:unset">
|
|
|
|
|
<i class="icon ion-md-add"></i>
|
|
|
|
|
</button>
|
|
|
|
|
</a>
|
|
|
|
|
<button type="submit" style="all:unset" data-onclick="add_playlist_item" data-id="<%= item.id %>" data-plid="<%= plid_form %>"><i class="icon ion-md-add"></i></button>
|
|
|
|
|
</p>
|
|
|
|
|
</form>
|
|
|
|
|
<% end %>
|
|
|
|
|