posts: add back option to undelete posts in sidebar.

This was removed in 1a990d5ab, but that left no way to undelete posts
that haven't been appealed since the quickmod bar isn't shown in that
case.
This commit is contained in:
evazion
2022-04-18 02:06:14 -05:00
parent 089adc085b
commit dff0b0e48b

View File

@@ -147,7 +147,9 @@
<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? && policy(@post).delete? %>
<% 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>
<% elsif !@post.is_deleted? && policy(@post).delete? %>
<li id="post-option-delete"><%= link_to "Delete", @post, method: :delete, remote: true %></li>
<% end %>