Change post votes to work the same way as comment votes: * Make the upvote arrow blue if you've upvoted the post, or grey if you haven't. Likewise for the downvote arrow. * Make it so you can click the upvote or downvote arrows to undo the vote. * Don't show any notices when you vote on a post. Also fix it so that votes work the same way on the posts page, the comments page, and in the modqueue. Before it wasn't possible to undo votes on the comments page or in the modqueue.
26 lines
620 B
Plaintext
26 lines
620 B
Plaintext
<div class="header">
|
|
<div class="row">
|
|
<span class="info">
|
|
<strong>Date</strong>
|
|
<%= compact_time(post.created_at) %>
|
|
</span>
|
|
<span class="info">
|
|
<strong>Uploader</strong>
|
|
<%= link_to_user(post.uploader) %>
|
|
</span>
|
|
<span class="info">
|
|
<strong>Rating</strong>
|
|
<%= post.pretty_rating %>
|
|
</span>
|
|
<span class="info">
|
|
<strong>Score</strong>
|
|
<%= render_post_votes post, current_user: CurrentUser.user %>
|
|
</span>
|
|
</div>
|
|
<div class="row list-of-tags">
|
|
<strong>Tags</strong>
|
|
<%= post.presenter.inline_tag_list_html %>
|
|
</div>
|
|
</div>
|
|
|