Newer
Older
postorius / src / postorius / templates / postorius / lists / index.html
@Bhavesh Goyal Bhavesh Goyal on 15 Apr 2015 1 KB Merged Updations
{% extends postorius_base_template %}
{% load url from future %}
{% load i18n %}

{% block subtitle %}
{% trans "List Index" as page_title %}{{ page_title }}
{% endblock %}

{% block main %}

    <div class="mm_subHeader">
        <h1>{% trans "Mailing Lists" %}</h1>
    </div>

    {% if user.is_superuser %}
        <p>
        {% if domain_count < 2 %}
            <a class="btn btn-success" href="{% url 'domain_new' %}">{% trans "Create New Domain" %}</a>
        {% else %}
            <a class="btn btn-success" href="{% url 'list_new' %}">{% trans "Create New List" %}</a>
        {% endif %}
        </p>
    {% endif %}

    {% if lists|length > 0 %}

        <table class="table table-bordered table-striped">
            <thead>
                <tr>
                    <th>{% trans 'List name' %}</th>
                    <th>{% trans 'Post address' %}</th>
                    <th>{% trans 'Description' %}</th>
                </tr>
            </thead>
            <tbody>
                {% for list in lists %}
                <tr>
                    <td>
                        <a href="{% url 'list_summary' list_id=list.list_id %}">{{ list.display_name }}</a>{% if not list.settings.advertised %} (private*){% endif %}
                    </td>
                    <td>{{ list.fqdn_listname }}</td>
                    <td>{{ list.settings.description }}</td>
                </tr>
                {% endfor %}
            </tbody>
        </table>

        {% if user.is_superuser %}
            <small>* Private lists can only be seen by admins.</small>
        {% endif %}

    {% else %}

        <p>There are currently no mailing lists.</p>

    {% endif %}

{% endblock main %}