Add user permissions for flagging and for giving user feedback
This commit is contained in:
@@ -20,6 +20,16 @@
|
||||
<%= select(:user, :can_approve_posts, [["Yes", true], ["No", false]]) %>
|
||||
</div>
|
||||
|
||||
<div class="input">
|
||||
<label for="user_no_flagging" class="optional">Banned From Flagging</label>
|
||||
<%= select(:user, :no_flagging, [["Yes", true], ["No", false]]) %>
|
||||
</div>
|
||||
|
||||
<div class="input">
|
||||
<label for="user_no_feedback" class="optional">Banned From Giving Feedback</label>
|
||||
<%= select(:user, :no_feedback, [["Yes", true], ["No", false]]) %>
|
||||
</div>
|
||||
|
||||
<%= submit_tag "Update" %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -21,10 +21,12 @@
|
||||
<% if post.is_status_locked? %>
|
||||
<li><span id="status-locked-notice">Status locked</span></li>
|
||||
<% else %>
|
||||
<% if !post.is_deleted? && !post.is_pending? && !post.is_flagged? %>
|
||||
<li><%= link_to "Flag", new_post_flag_path(post_flag: { post_id: post.id }), id: "flag", remote: true %></li>
|
||||
<% elsif post.is_flagged? || post.is_deleted? %>
|
||||
<li><%= link_to "Appeal", new_post_appeal_path(post_appeal: { post_id: post.id }), id: "appeal", remote: true %></li>
|
||||
<% unless CurrentUser.no_flagging? %>
|
||||
<% if !post.is_deleted? && !post.is_pending? && !post.is_flagged? %>
|
||||
<li><%= link_to "Flag", new_post_flag_path(post_flag: { post_id: post.id }), id: "flag", remote: true %></li>
|
||||
<% elsif post.is_flagged? || post.is_deleted? %>
|
||||
<li><%= link_to "Appeal", new_post_appeal_path(post_appeal: { post_id: post.id }), id: "appeal", remote: true %></li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if CurrentUser.can_approve_posts? %>
|
||||
|
||||
Reference in New Issue
Block a user