Readd approval button to the sidebar

The quick mod buttons are also used in the modqueue so it's not
possible to bind the shift-o shortcut to them, hence the need
for this button.
This commit is contained in:
nonamethanks
2022-04-18 19:47:53 +02:00
parent a45b18ed36
commit 7486836b0f

View File

@@ -147,8 +147,12 @@
<li id="post-option-move-favorites"><%= link_to "Move favorites", confirm_move_favorites_moderator_post_post_path(post_id: @post.id) %></li>
<% end %>
<% if @post.is_deleted? && @post.is_approvable? %>
<li id="post-option-undelete"><%= link_to "Undelete", post_approvals_path(post_id: @post.id), remote: true, method: :post, "data-shortcut": "shift+o", "data-confirm": "Are you sure you want to undelete this post?" %></li>
<% if @post.is_approvable? %>
<% if @post.is_deleted? %>
<li id="post-option-undelete"><%= link_to "Undelete", post_approvals_path(post_id: @post.id), remote: true, method: :post, "data-shortcut": "shift+o", "data-confirm": "Are you sure you want to undelete this post?" %></li>
<% else %>
<li id="post-option-approve"><%= link_to "Approve", post_approvals_path(post_id: @post.id), remote: true, method: :post, "data-shortcut": "shift+o", "data-confirm": "Are you sure you want to approve this post?" %></li>
<% end %>
<% elsif !@post.is_deleted? && policy(@post).delete? %>
<li id="post-option-delete"><%= link_to "Delete", @post, method: :delete, remote: true %></li>
<% end %>