diff --git a/src/postorius/templates/postorius/lists/metrics.html b/src/postorius/templates/postorius/lists/metrics.html
deleted file mode 100644
index c42e6ae..0000000
--- a/src/postorius/templates/postorius/lists/metrics.html
+++ /dev/null
@@ -1,34 +0,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' %}
-
-
-
-
- {% trans 'Created at' %} |
- {{list.settings.created_at}} |
-
-
- {% trans 'Last post at' %} |
- {{list.settings.last_post_at}} |
-
-
- {% trans 'Digest last sent at' %} |
- {{list.settings.digest_last_sent_at}} |
-
-
- {% trans 'Volume' %} |
- {{list.settings.volume}} |
-
-
-
-
-{% endblock main %}
diff --git a/src/postorius/templates/postorius/lists/summary.html b/src/postorius/templates/postorius/lists/summary.html
index 0551ede..3fbd1a0 100644
--- a/src/postorius/templates/postorius/lists/summary.html
+++ b/src/postorius/templates/postorius/lists/summary.html
@@ -32,6 +32,32 @@
{% trans 'To contact the list owners, use the following email address:' %}
{{ list.settings.owner_address }}
+
+ {% if user.is_authenticated %}
+ {% if user.is_list_owner or user.is_superuser %}
+ {% trans 'List Metrics' %}
+
+
+
+ {% trans 'Created at' %} |
+ {{list.settings.created_at}} |
+
+
+ {% trans 'Last post at' %} |
+ {{list.settings.last_post_at}} |
+
+
+ {% trans 'Digest last sent at' %} |
+ {{list.settings.digest_last_sent_at}} |
+
+
+ {% trans 'Volume' %} |
+ {{list.settings.volume}} |
+
+
+
+ {% endif %}
+ {% endif %}
diff --git a/src/postorius/urls.py b/src/postorius/urls.py
index a91020a..59dd81c 100644
--- a/src/postorius/urls.py
+++ b/src/postorius/urls.py
@@ -35,9 +35,6 @@
url(r'^members/options/(?P[^/]+)/$',
ListMemberOptionsView.as_view(
), name='list_member_options'),
- url(r'^metrics$',
- ListMetricsView.as_view(
- ), name='list_metrics'),
url(r'^$',
ListSummaryView.as_view(
), name='list_summary'),
diff --git a/src/postorius/views/list.py b/src/postorius/views/list.py
index b2eb075..500025a 100644
--- a/src/postorius/views/list.py
+++ b/src/postorius/views/list.py
@@ -163,35 +163,16 @@
context_instance=RequestContext(request))
-class ListMetricsView(MailingListView):
-
- """Shows common list metrics.
- """
-
- @method_decorator(login_required)
- @method_decorator(list_owner_required)
- def get(self, request, list_id):
- return render_to_response('postorius/lists/metrics.html',
- {'list': self.mailing_list},
- context_instance=RequestContext(request))
-
-
class ListSummaryView(MailingListView):
"""Shows common list metrics.
"""
def get(self, request, list_id):
- if request.user.is_authenticated():
- user_emails = [request.user.email] + request.user.other_emails
- else:
- user_emails = None
-
- userSubscribed = False
- subscribed_address = None
data = {'list': self.mailing_list,
'userSubscribed': False,
'subscribed_address': None}
if request.user.is_authenticated():
+ user_emails = [request.user.email] + request.user.other_emails
for address in user_emails:
try:
self.mailing_list.get_member(address)
@@ -205,6 +186,7 @@
user_emails, initial={'email': data['subscribed_address']})
data['subscribe_form'] = ListSubscribe(user_emails)
else:
+ user_emails = None
data['change_subscription_form'] = None
return render_to_response(
'postorius/lists/summary.html', data,