Repository URL to install this package:
|
Version:
5.14.0 ▾
|
{% extends 'backoffice/base.html' %}
{% load url from future %}
{% load i18n staticfiles tables %}
{% block extr_js %}{% endblock %}
{% block extra_head %}
<style>
#article-list {
margin-top: 20px;
}
</style>
{% endblock %}
{% block content %}
<div class="row">
<h1>{% trans "News" %}</h1>
<div class="row">
<div class="pull-right">
<a href="{% url 'backoffice:news-create' %}" class="btn btn-primary">{% trans "Create new article" %}</a>
</div>
</div>
</div>
{% if articles.paginator.count > 0 %}
<div class="row">
<table class="table table-condensed" id="article-list">
<thead>
<tr>
<th>{% order_col "title" "Title" "Title" %}</th>
<th>{% order_col "created_at" "Creation date" "creation date" %}</th>
<th>{% order_col "published" "Published" "Published" %}</th>
</tr>
</thead>
{% for article in articles.object_list %}
<tr>
<td><a href="{% url 'backoffice:news-detail' article.id %}">{{ article.title }}</a></td>
<td>{{ article.created_at }}</td>
<td>{% if article.published %}<span class="label label-info">{% trans "Published" %}{% endif %}</span></td>
</tr>
{% endfor %}
</table>
</div>
<div class="row">
<div id="pagination">
{{ users.render }}
</div>
</div>
{% else %}
<div class="row">
{% trans "No article" %}
</div>
{% endif %}
{% endblock %}