Commit 64de7ec689b2d80fffbf0c7011abf462da73785f
1 parent
eb210a1c
Exists in
master
and in
2 other branches
List news updating
Showing
1 changed file
with
25 additions
and
3 deletions
Show diff stats
news/templates/news/list.html
1 | {% extends 'base.html' %} | 1 | {% extends 'base.html' %} |
2 | 2 | ||
3 | -{% load static i18n django_bootstrap_breadcrumbs permission_tags %} | 3 | +{% load static i18n django_bootstrap_breadcrumbs permission_tags pagination %} |
4 | 4 | ||
5 | {% block breadcrumbs %} | 5 | {% block breadcrumbs %} |
6 | {{ block.super }} | 6 | {{ block.super }} |
7 | - {% breadcrumb "Manage News" 'news:manage_news' %} | 7 | + {% trans 'Manage News' as manage_news %} |
8 | + {% breadcrumb manage_news 'news:manage_news' %} | ||
8 | {% endblock %} | 9 | {% endblock %} |
9 | 10 | ||
10 | {% block render_breadcrumbs %} | 11 | {% block render_breadcrumbs %} |
11 | {% render_breadcrumbs %} | 12 | {% render_breadcrumbs %} |
12 | {% endblock %} | 13 | {% endblock %} |
13 | 14 | ||
14 | -{% block content %}{% endblock %} | 15 | +{% block content %} |
16 | + | ||
17 | +{% if messages %} | ||
18 | + {% for message in messages %} | ||
19 | + <script type="text/javascript"> | ||
20 | + {% if message.tags == "danger" %} | ||
21 | + alertify.error('{{message}}'); | ||
22 | + {% else %} | ||
23 | + alertify.success('{{message}}'); | ||
24 | + {% endif %} | ||
25 | + </script> | ||
26 | + {% endfor %} | ||
27 | +{% endif %} | ||
28 | + | ||
29 | +<div class='row'> | ||
30 | + <div class="col-md-offset-3 col-md-6"> | ||
31 | + <a href="{% url 'news:create' %}" class="btn btn-raised btn-success btn-block">{% trans "Create news" %}</a> | ||
32 | + </div> | ||
33 | +</div> | ||
34 | + | ||
35 | + | ||
36 | +{% endblock %} |