<% if user_signed_in? %>
<%= t("comments.comment.votes", count: comment.total_votes) %>
|
<% if can?(:vote, comment) %>
<%= link_to vote_comment_path(comment, value: "yes"),
method: "post", remote: true, title: t("votes.agree") do %>
<%= t("votes.agree") %>
<% end %>
<% else %>
<%= link_to new_user_session_path do %>
<%= t("votes.agree") %>
<% end %>
<% end %>
<%= comment.total_likes %>
<% if can?(:vote, comment) %>
<%= link_to vote_comment_path(comment, value: "no"),
method: "post", remote: true, title: t("votes.disagree") do %>
<%= t("votes.disagree") %>
<% end %>
<% else %>
<%= t("votes.disagree") %>
<% end %>
<%= comment.total_dislikes %>
<% elsif !user_signed_in? %>
<%= t("comments.comment.votes", count: comment.total_votes) %>
|
<% if can?(:vote, comment) %>
<%= link_to vote_comment_path(comment, value: "yes"),
method: "post", remote: true, title: t("votes.agree") do %>
<%= t("votes.agree") %>
<% end %>
<% else %>
<%= link_to new_user_session_path do %>
<%= t("votes.agree") %>
<% end %>
<% end %>
<%= comment.total_likes %>
<% if can?(:vote, comment) %>
<%= link_to vote_comment_path(comment, value: "no"),
method: "post", remote: true, title: t("votes.disagree") do %>
<%= t("votes.disagree") %>
<% end %>
<% else %>
<%= link_to new_user_session_path do %>
<%= t("votes.disagree") %>
<% end %>
<% end %>
<%= comment.total_dislikes %>
<%= sanitize(t("votes.comment_unauthenticated", signin: link_to_signin, signup: link_to_signup)) %>
<% end %>