posts/show: fix 'Flag' option in sidebar.

* Don't show 'Flag' option on already flagged posts.
* Drop flag/appeal link show/hide Javascript (did nothing, links were already shown/hidden in html).
This commit is contained in:
evazion
2018-08-13 01:50:52 -05:00
parent d7ec28b804
commit 7028417bfb
3 changed files with 2 additions and 22 deletions

View File

@@ -21,11 +21,9 @@
<% if post.is_status_locked? %>
<li><span id="status-locked-notice">Status locked</span></li>
<% else %>
<% if !post.is_deleted? && !post.is_pending? %>
<% if !post.is_deleted? && !post.is_pending? && !post.is_flagged? %>
<li><%= link_to "Flag", new_post_flag_path(:post_id => post.id), :id => "flag" %></li>
<% end %>
<% if post.is_flagged? || post.is_deleted? %>
<% elsif post.is_flagged? || post.is_deleted? %>
<li><%= link_to "Appeal", new_post_appeal_path(:post_id => post.id), :id => "appeal" %></li>
<% end %>