summaryrefslogtreecommitdiffstats
path: root/hyperkitty/templates/messages/like_form.html
blob: 867a8a479b4906a20255fd16df9636cf6fa4e274 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
	<form method="post" class="likeform"
	      action="{% url message_vote mlist_fqdn=mlist.name, message_id_hash=message_id_hash %}">
	{% csrf_token %}
	<span class="likestatus {{ object.likestatus }}">+{{ object.likes }}/-{{ object.dislikes }}</span>
	{% if object.myvote == 1 %}
	<span class="youlike">You like it
		(<a href="#cancelvote" onclick="vote(this, 0)">cancel</a>)</span>
	{% elif object.myvote == -1 %}
	<span class="youdislike">You dislike it
		(<a href="#cancelvote" onclick="vote(this, 0)">cancel</a>)</span>
	{% else %}
	<a class="youlike{% if not user.is_authenticated %} disabled" title="You must be logged-in to vote.{% endif %}"
	   href="#like" onclick="vote(this, 1)">Like</a>
	<a class="youdislike{% if not user.is_authenticated %} disabled" title="You must be logged-in to vote.{% endif %}"
	   href="#dislike" onclick="vote(this, -1)">Dislike</a>
	{% endif %}
	</form>

{# vim: set noet: #}