Permalink
Browse files

only show voting drop down when the user is authenticated

  • Loading branch information...
1 parent de1856a commit 0a021b488c1bf1ce0187b2e7f44a29e866c055c5 @kargig committed Nov 13, 2011
Showing with 6 additions and 0 deletions.
  1. +4 −0 templates/grrbl/emaildetail.html
  2. +2 −0 templates/grrbl/ipdetail.html
@@ -17,6 +17,7 @@
<p><strong>{{ error_message }}</strong></p>
{% endif %}
+{% if user.is_authenticated %}
<p>
<form action="{% url grrbl.views.vote object|class_name|lower object.id %}" method="post">
{% csrf_token %}
@@ -29,7 +30,10 @@
<input type="submit" value="vote" />
</form>
</p>
+{% endif %}
+
{% if perms.grrbl.is_superuser %}
<p>Administrative: {% trans "Edit this entry" %}? <a href={% url admin:grrbl_email_change object.id %}>{% trans "Edit it" %}</a>!</p>
{% endif %}
+
{% endblock %}
@@ -17,6 +17,7 @@
<p><strong>{{ error_message }}</strong></p>
{% endif %}
+{% if user.is_authenticated %}
<p>
<form action="{% url grrbl.views.vote object|class_name|lower object.id %}" method="post">
{% csrf_token %}
@@ -29,6 +30,7 @@
<input type="submit" value="vote" />
</form>
</p>
+{% endif %}
{% if perms.grrbl.is_superuser %}
<p>Administrative: {% trans "Edit this entry" %}? <a href={% url admin:grrbl_ip_change object.id %}>{% trans "Edit it" %}</a>!</p>

0 comments on commit 0a021b4

Please sign in to comment.