changeset 189:683d41e124b7

Changed snippet template so that now anonymous user cannot see revision history. To see revision history you must login.
author ahsanalishahid <ahsan.ali.shahid@gmail.com>
date Tue, 18 Jun 2013 19:59:40 +0500
parents 1eb652aa501a
children a4f88ac85837
files templates/snippet/snippet_details.djhtml
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/templates/snippet/snippet_details.djhtml	Sat Oct 27 16:26:54 2012 -0400
+++ b/templates/snippet/snippet_details.djhtml	Tue Jun 18 19:59:40 2013 +0500
@@ -87,6 +87,7 @@
     {% include "snippet/snippet_form.djhtml" %}
 </div><div id="sidebar">
     <h2>{% trans "History" %}</h2>
+{% if user.is_authenticated %}
     {% if no_descendants %}
         <p>{% trans "This snippet has no children!" %}</p>
         <p>
@@ -144,6 +145,11 @@
     <a href="{% url snippet_details_raw snippet.secret_id %}">
        {% trans "View raw" %}
      </a>
+{% else %}
+     <h4>{% trans "Login to see revision history" %}</h4>
+{% endif %}
+
+
 </div><!-- closes the .sidebar div -->
 {% endblock %}