disables voting on comments for not allowed users
This commit is contained in:
@@ -3,17 +3,25 @@
|
|||||||
</span>
|
</span>
|
||||||
|
|
|
|
||||||
<span class="in_favor">
|
<span class="in_favor">
|
||||||
<%= link_to vote_comment_path(comment, value: 'yes'),
|
<% if can?(:vote, comment) %>
|
||||||
method: "post", remote: true do %>
|
<%= link_to vote_comment_path(comment, value: 'yes'),
|
||||||
<i class="icon-angle-up"></i>
|
method: "post", remote: true do %>
|
||||||
|
<i class="icon-angle-up"></i>
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
<i class="icon-angle-up"></i>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= comment.total_likes %>
|
<%= comment.total_likes %>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span class="against">
|
<span class="against">
|
||||||
<%= link_to vote_comment_path(comment, value: 'no'),
|
<% if can?(:vote, comment) %>
|
||||||
method: "post", remote: true do %>
|
<%= link_to vote_comment_path(comment, value: 'no'),
|
||||||
<i class="icon-angle-down"></i>
|
method: "post", remote: true do %>
|
||||||
|
<i class="icon-angle-down"></i>
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
<i class="icon-angle-down"></i>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= comment.total_dislikes %>
|
<%= comment.total_dislikes %>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user