Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
fun-apps / templates / backoffice / articles.html
Size: Mime:
{% 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 %}