Move metrics to list summary
1 parent 2a6278c commit 2df56fc169e888569fc42e9fc87b62467806761b
@Simon Hanna Simon Hanna authored on 1 Dec 2015
Showing 4 changed files
View
35
src/postorius/templates/postorius/lists/metrics.html 100644 → 0
{% extends postorius_base_template %}
{% load i18n %}
 
{% block subtitle %}
{% trans "List Metrics | " as page_title %}{{ page_title|add:list.fqdn_listname }}
{% endblock %}
 
{% load nav_helpers %}
 
{% block main %}
{% list_nav 'list_metrics' 'Metrics' %}
 
<table class="table table-bordered table-striped mm_userData">
<tbody>
<tr>
<th>{% trans 'Created at' %}</th>
<td>{{list.settings.created_at}}</td>
</tr>
<tr>
<th>{% trans 'Last post at' %}</th>
<td>{{list.settings.last_post_at}}</td>
</tr>
<tr>
<th>{% trans 'Digest last sent at' %}</th>
<td>{{list.settings.digest_last_sent_at}}</td>
</tr>
<tr>
<th>{% trans 'Volume' %}</th>
<td>{{list.settings.volume}}</td>
</tr>
</tbody>
</table>
 
{% endblock main %}
View
26
src/postorius/templates/postorius/lists/summary.html
<dl>
<dt>{% trans 'To contact the list owners, use the following email address:' %}</dt>
<dd>{{ list.settings.owner_address }}</dd>
</dl>
 
{% if user.is_authenticated %}
{% if user.is_list_owner or user.is_superuser %}
<h2>{% trans 'List Metrics' %}</h2>
<table class="table table-bordered table-striped">
<tbody>
<tr>
<th>{% trans 'Created at' %}</th>
<td>{{list.settings.created_at}}</td>
</tr>
<tr>
<th>{% trans 'Last post at' %}</th>
<td>{{list.settings.last_post_at}}</td>
</tr>
<tr>
<th>{% trans 'Digest last sent at' %}</th>
<td>{{list.settings.digest_last_sent_at}}</td>
</tr>
<tr>
<th>{% trans 'Volume' %}</th>
<td>{{list.settings.volume}}</td>
</tr>
</tbody>
</table>
{% endif %}
{% endif %}
</div>
 
View
3
■■
src/postorius/urls.py
), name='list_members'),
url(r'^members/options/(?P<email>[^/]+)/$',
ListMemberOptionsView.as_view(
), name='list_member_options'),
url(r'^metrics$',
ListMetricsView.as_view(
), name='list_metrics'),
url(r'^$',
ListSummaryView.as_view(
), name='list_summary'),
url(r'^subscribe$',
View
src/postorius/views/list.py