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:
@@ -20,4 +20,14 @@ module ForumTopicsHelper
|
||||
:rejected
|
||||
end
|
||||
end
|
||||
|
||||
def forum_post_vote_icon(vote)
|
||||
if vote.score == 1
|
||||
upvote_icon
|
||||
elsif vote.score == -1
|
||||
downvote_icon
|
||||
else
|
||||
meh_icon
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user