Skip to content

Commit

Permalink
tweaks to comment options (#5700)
Browse files Browse the repository at this point in the history
  • Loading branch information
jywarren authored May 9, 2019
1 parent 6ce0e4f commit f044a99
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions app/views/notes/_comment.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,14 @@
-->
<% end %>

<% if comment.comment_via == 1 %>
<i data-toggle="tooltip" title="This comment was posted by email." class="fa fa-envelope"></i>
<% end %>
<% if current_user && comment.uid == current_user.uid %>
<a class="btn btn-outline-secondary btn-sm" href="javascript:void(0)" onClick="$('#c<%= comment.cid %>edit').toggle();$('#c<%= comment.cid %>show').toggle();setInit(<%= comment.cid %>);">
<i class="fa fa-pencil"></i>
</a>
<% end %>
<% if comment.comment_via == 1 %>
<a href="#" onclick="return false;" class="btn btn-outline-secondary btn-sm"><i class="fa fa-envelope"></i></a>
<% end %>
<% if params[:controller] == "questions" && logged_in_as(['admin', 'moderator']) || (current_user && (comment.uid == current_user.uid)) %>
<a class="btn btn-outline-secondary btn-sm" id="comment-<%= comment.id %>-reorder-btn" data-remote="true" data-confirm="Are you sure? <% if current_user && comment.uid != current_user.uid %>Please exercise caution in promoting others' comments; this cannot be undone.<% end %>" rel="tooltip" title="<%= t('questions._comment.promotion') %>" data-placement="left" href="/comment/make_answer/<%= comment.id %>"><i class="fa fa-plus"></i></a>
<% end %>
<% if current_user &. can_moderate? %>
<a rel="tooltip" title="Mark as spam" class="btn btn-sm btn-outline-secondary btn-flag-spam-<%= comment.id %>" data-confirm="Are you sure? The user will no longer be able to log in or publish, and their content will be hidden except comments." href="/admin/mark_comment_spam/<%= comment.id %>">
<i class="fa fa-ban"></i>
Expand Down

0 comments on commit f044a99

Please sign in to comment.