From 92473297f590595cf47408bc90de20d4906b3a4d Mon Sep 17 00:00:00 2001 From: Gustavo Date: Tue, 18 Apr 2017 23:59:39 -0300 Subject: [PATCH] Modified list news template to non-staff members --- news/templates/news/list.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/news/templates/news/list.html b/news/templates/news/list.html index 6fafd92..6c46f6d 100644 --- a/news/templates/news/list.html +++ b/news/templates/news/list.html @@ -3,11 +3,17 @@ {% load static i18n django_bootstrap_breadcrumbs permission_tags pagination %} {% block breadcrumbs %} - {{ block.super }} + {{ block.super }} + {% if user.is_staff %} {% trans 'Manage News' as manage_news %} {% breadcrumb manage_news 'news:manage_news' %} + {% else %} + {% trans 'News' as news %} + {% breadcrumb news 'news:manage_news' %} + {% endif %} {% endblock %} + {% block render_breadcrumbs %} {% render_breadcrumbs %} {% endblock %} @@ -41,9 +47,11 @@ + {% if user.is_staff %}
{% trans 'Create News' %}
+ {% endif %} {% if news %} @@ -54,12 +62,14 @@

{{ new }}

{{ new.creator}}, em {{ new.create_date }}

+ {% if user.is_staff %}
{% trans 'Edit' %} {% trans 'Delete' %}
+ {% endif %} -- libgit2 0.21.2