Newer
Older
postorius / src / postorius / templates / postorius / user / subscriptions.html
@Aurélien Bompard Aurélien Bompard on 4 May 2016 2 KB Change the display to make it look less alarming
{% extends postorius_base_template %}

{% load i18n %}
{% load nav_helpers %}
{% load membership_helpers %}

{% block subtitle %}
{% trans 'Subscriptions' %} | {{ user.username }}
{% endblock %}

{% block main %}

    {% user_nav 'subscriptions' 'List Subscriptions' %}
    {% if memberships %}
        <p>{% trans 'You are subscribed to the following mailing lists:' %}</p>
        <div class="table-responsive">
            <table class="table table-bordered table-striped">
                <thead>
                    <tr>
                        <th>{% trans 'List Name' %}</th>
                        <th>{% trans 'Subscription Address' %}</th>
                        <th>{% trans 'Delivery Mode' %}</th>
                        <th class="text-center">{% trans 'Roles' %}</th>
                    </tr>
                </thead>
                <tbody>
                    {% for subscription in memberships %}
                        <tr>
                            <td><a href="{% url 'list_summary' subscription.list_id %}">{{ subscription.list_id }}</a></td>
                            <td>{{ subscription.address }}</td>
                            <td>{{ subscription.preferences.delivery_mode }}</td>
                            <td>
                                {% trans 'subscriber' %}
                                {% user_is_list_moderator request.user subscription.list_id as is_moderator %}
                                {% if is_moderator %}
                                + {% trans 'moderator' %}
                                {% endif %}
                                {% user_is_list_owner request.user subscription.list_id as is_owner %}
                                {% if is_owner %}
                                + {% trans 'owner' %}
                                {% endif %}
                                </ul>
                            </td>
                        </tr>
                    {% endfor %}
                </tbody>
            </table>
        </div>
    {% else %}
        <p>{% trans 'You are not yet subscribed to any lists.' %}</p>
    {% endif %}
{% endblock main %}