add favorite action underneath image

This commit is contained in:
r888888888
2017-09-05 14:41:33 -07:00
parent 93ce433c0c
commit bb228d5735
6 changed files with 18 additions and 5 deletions

View File

@@ -1,8 +1,10 @@
<% if @error_msg %>
Danbooru.error("<%= @error_msg %>");
<% else %>
$("a#add-to-favorites").hide();
$("a#remove-from-favorites").show();
$("#add-to-favorites").hide();
$("#add-fav-button").hide();
$("#remove-from-favorites").show();
$("#remove-fav-button").show();
$("#score-for-post-<%= @post.id %>").html(<%= @post.score %>);
$("#favcount-for-post-<%= @post.id %>").html(<%= @post.fav_count %>);
<% if CurrentUser.is_gold? %>

View File

@@ -1,5 +1,7 @@
$("a#add-to-favorites").show();
$("a#remove-from-favorites").hide();
$("#add-to-favorites").show();
$("#add-fav-button").show();
$("#remove-from-favorites").hide();
$("#remove-fav-button").hide();
$("#score-for-post-<%= @post.id %>").html(<%= @post.score %>);
$("#favcount-for-post-<%= @post.id %>").html(<%= @post.fav_count %>);
<% if CurrentUser.is_gold? %>