view templates/snippet/snippet_list.djhtml @ 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 b7c1c22fdfe8
children
line wrap: on
line source

{% extends "snippet/base.djhtml" %}
{% load i18n %}

{% block title %}{% trans "Snippet" %} #{{ snippet.pk }}{% endblock %}
{% block headline %}
<h1>
  {% blocktrans %}Your latest {{ snippets_max }} snippets{% endblocktrans %}
</h1>
{% endblock %}

{% block content %}
    {% if snippet_list %}
    {% for snippet in snippet_list %}
    <h2>
        <a href="{{ snippet.get_absolute_url }}">
          {% trans "Snippet" %} #{{ snippet.pk }}
        </a>
        ~ {{ snippet.published|date:_("DATETIME_FORMAT") }}
    </h2>
    <p style="color: #555; margin: 8px 0 20px 0;">
      {{ snippet.content|truncatewords:40 }}
    </p>
    {% endfor %}
    {% else %}
    <p>
      {% trans "No snippets available." %}
    </p>
    {% endif %}


    <div class="hint">
        {% trans "DATA_STORED_IN_A_COOKIE_HINT" %}
    </div>
{% endblock %}