views: factor out FontAwesome icons.
Factor out FontAwesome icons into a set of helpers. This is so that it's easier to keep track of which icons we're using and easier to change icons globally.
This commit is contained in:
@@ -5,10 +5,10 @@
|
||||
|
||||
<li class="vote-score-<%= vote.vote_type %>">
|
||||
<% if policy(forum_post).votable? && vote.creator_id == CurrentUser.id %>
|
||||
<%= link_to content_tag(:i, nil, class: "far #{vote.fa_class}"), forum_post_vote_path(vote, format: "js"), remote: true, method: :delete %>
|
||||
<%= link_to forum_post_vote_icon(vote), forum_post_vote_path(vote, format: "js"), remote: true, method: :delete %>
|
||||
<%= link_to_user vote.creator %>
|
||||
<% else %>
|
||||
<%= content_tag(:i, nil, class: "far #{vote.fa_class}") %>
|
||||
<%= forum_post_vote_icon(vote) %>
|
||||
<%= link_to_user vote.creator %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user