Merge pull request #5130 from nonamethanks/readd-approve-button
Readd approval button to the sidebar
This commit is contained in:
@@ -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 %>
|
||||
|
||||
Reference in New Issue
Block a user