diff --git a/README.rst b/README.rst
index 0af843c..d978a8a 100644
--- a/README.rst
+++ b/README.rst
@@ -26,7 +26,7 @@
Postorius requires Python 2.6 or newer and mailman.client,
the official Python bindings for GNU Mailman, it also requires
django-social-auth.
-The minimum Django version is 1.3.
+The minimum Django version is 1.6.
Postorius needs a running version of GNU Mailman version 3.
diff --git a/setup.py b/setup.py
index 8dcca73..0c01869 100644
--- a/setup.py
+++ b/setup.py
@@ -26,7 +26,7 @@
setup(
name="postorius",
- version='1.0.0b1',
+ version='1.0.0b3',
description="A web user interface for GNU Mailman",
long_description=open('README.rst').read(),
maintainer="The Mailman GSOC Coders",
@@ -39,7 +39,7 @@
packages=find_packages('src'),
package_dir={'': 'src'},
include_package_data=True,
- install_requires=['django>=1.5, <1.8',
+ install_requires=['django>=1.6',
'django-browserid',
'mailmanclient']
)
diff --git a/src/postorius/__init__.py b/src/postorius/__init__.py
index d841089..871cc3f 100644
--- a/src/postorius/__init__.py
+++ b/src/postorius/__init__.py
@@ -16,4 +16,4 @@
# You should have received a copy of the GNU General Public License along with
# Postorius. If not, see .
-__version__ = '1.0.0b1'
+__version__ = '1.0.0b3'
diff --git a/src/postorius/auth/decorators.py b/src/postorius/auth/decorators.py
index fed0033..80f39dc 100644
--- a/src/postorius/auth/decorators.py
+++ b/src/postorius/auth/decorators.py
@@ -88,7 +88,12 @@
user.email not in mlist.owners:
raise PermissionDenied
else:
- user.is_list_moderator = True
+ if user.email in mlist.moderators and \
+ user.email not in mlist.owners:
+ user.is_list_moderator = True
+ else:
+ user.is_list_moderator = True
+ user.is_list_owner = True
return fn(*args, **kwargs)
return wrapper
diff --git a/src/postorius/doc/news.rst b/src/postorius/doc/news.rst
index ce4c260..5f61066 100644
--- a/src/postorius/doc/news.rst
+++ b/src/postorius/doc/news.rst
@@ -22,7 +22,7 @@
1.0 beta 2
==========
-(2015-xx-xx)
+(2015-04-15)
* French translation. Provided by Guillaume Libersat
* Addedd an improved test harness using WebTest. Contributed by Aurélien Bompard.
@@ -37,6 +37,8 @@
* Rework of internal testing
* Mozilla Persona integration: switch from django-social-auto to django-browserid: Contributed by Abhilash Raj.
* Fix manage.py mmclient command for non-IPython shells. Contributed by Ankush Sharma (LP: 1428169).
+* Added archiver options: Site-wide enabled archivers can not be enabled
+on a per-list basis through the web UI.
1.0 beta 1 -- "Year of the Parrot"
diff --git a/src/postorius/forms.py b/src/postorius/forms.py
index bfcd766..0fde621 100644
--- a/src/postorius/forms.py
+++ b/src/postorius/forms.py
@@ -20,7 +20,6 @@
from django.core.validators import validate_email, URLValidator
from django.utils.translation import gettext_lazy as _
from fieldset_forms import FieldsetForm
-from django.forms.models import modelformset_factory
class DomainNew(FieldsetForm):
@@ -41,16 +40,13 @@
description = forms.CharField(
label=_('Description'),
required=False)
- contact_address = forms.EmailField(
- label=_('Contact Address'),
- required=False)
def clean_mail_host(self):
mail_host = self.cleaned_data['mail_host']
try:
validate_email('mail@' + mail_host)
except:
- raise forms.ValidationError(_("Enter a valid Mail Host"))
+ raise forms.ValidationError(_("Please enter a valid domain name"))
return mail_host
def clean_web_host(self):
@@ -58,7 +54,7 @@
try:
URLValidator()(web_host)
except:
- raise forms.ValidationError(_("Please enter a valid Web Host"))
+ raise forms.ValidationError(_("Please enter a valid domain name"))
return web_host
class Meta:
@@ -426,10 +422,19 @@
# label=_('No reply address'),
# required=False,
# )
- posting_pipeline = forms.CharField(
+ posting_pipeline = forms.ChoiceField(
label=_('Pipeline'),
+ widget=forms.Select(),
+ required=False,
+ error_messages={
+ 'required': _("Please choose a reply-to action.")},
+ choices=(
+ ("default-owner-pipeline", _("default-owner-pipeline")),
+ ("default-posting-pipeline", _("default-posting-pipeline")),
+ ("virgin", _("virgin"))),
help_text=(
'Type of pipeline you want to use for this mailing list')
+
)
# post_id = forms.IntegerField(
# label=_('Post ID'),
@@ -672,6 +677,20 @@
]
+class ListArchiverForm(forms.Form):
+ """
+ Select archivers for a list.
+ """
+ archivers = forms.MultipleChoiceField(
+ widget=forms.CheckboxSelectMultiple,
+ label=_('Activate archivers for this list'))
+
+ def __init__(self, archivers, *args, **kwargs):
+ super(ListArchiverForm, self).__init__(*args, **kwargs)
+ self.fields['archivers'].choices = sorted(
+ [(key, key) for key in archivers.keys()])
+
+
class Login(FieldsetForm):
"""Form fields to let the user log in.
@@ -931,5 +950,6 @@
email = cleaned_data.get('email')
user_email = cleaned_data.get('user_email')
if email == user_email:
- raise forms.ValidationError(_('Please provide a different email address than your own.'))
+ raise forms.ValidationError(_('Please provide a different email '
+ 'address than your own.'))
return cleaned_data
diff --git a/src/postorius/static/postorius/css/style.css b/src/postorius/static/postorius/css/style.css
index c3bbf3a..af1a86f 100755
--- a/src/postorius/static/postorius/css/style.css
+++ b/src/postorius/static/postorius/css/style.css
@@ -52,7 +52,7 @@
/***** meta nav *****/
.mm_header {
- padding: 5px;
+ padding: 5px 0;
border-bottom: 1px solid #CACACA;
background: #fafafa;
background: -moz-linear-gradient(top, #fff 0%, #efefef 100%);
@@ -290,3 +290,12 @@
/* Internet Explorer */
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
}
+
+/* archival options */
+.well .archival-options-form ul {
+ margin-top: 15px;
+ margin-bottom: 15px;
+}
+.well .archival-options-form li {
+ display: block;
+}
diff --git a/src/postorius/templates/postorius/base.html b/src/postorius/templates/postorius/base.html
index 307538e..3dc4283 100644
--- a/src/postorius/templates/postorius/base.html
+++ b/src/postorius/templates/postorius/base.html
@@ -3,7 +3,11 @@
-
Mailman/Postorius
+
+ {% block title %}
+ {% block subtitle %}{% endblock %}{{ subtitle|add:"-Mailman/Postorius" }}
+ {% endblock %}
+
@@ -20,13 +24,12 @@
{% if user.is_authenticated %}
@@ -43,7 +46,7 @@
{% if messages %}
{% for message in messages %}
- - {{ message }}
+ - {{ message }}
{% endfor %}
{% endif %}
diff --git a/src/postorius/templates/postorius/domain_confirm_delete.html b/src/postorius/templates/postorius/domain_confirm_delete.html
index a33cc84..23ea00c 100644
--- a/src/postorius/templates/postorius/domain_confirm_delete.html
+++ b/src/postorius/templates/postorius/domain_confirm_delete.html
@@ -1,6 +1,11 @@
{% extends postorius_base_template %}
{% load url from future %}
{% load i18n %}
+
+{% block subtitle %}
+{% trans "Confirm Domain Removal | " as page_title %}{{ page_title|add:domain}}
+{% endblock %}
+
{% load nav_helpers %}
{% block main %}
diff --git a/src/postorius/templates/postorius/domain_index.html b/src/postorius/templates/postorius/domain_index.html
index 4feb1d3..dfa11a1 100644
--- a/src/postorius/templates/postorius/domain_index.html
+++ b/src/postorius/templates/postorius/domain_index.html
@@ -2,6 +2,10 @@
{% load url from future %}
{% load i18n %}
+{% block subtitle %}
+{% trans "Domains" as page_title %}{{ page_title }}
+{% endblock %}
+
{% block main %}
{% trans "Domain Index" %}
@@ -13,7 +17,6 @@
{% trans "Mail Host" %} |
{% trans "URL Host" %} |
- {% trans "Contact Address" %} |
{% trans "Description" %} |
|
@@ -23,7 +26,6 @@
{{ domain.mail_host }} |
{{ domain.base_url }} |
- {{ domain.contact_address }} |
{{ domain.description }} |
{% trans 'Delete' %} |
diff --git a/src/postorius/templates/postorius/domain_new.html b/src/postorius/templates/postorius/domain_new.html
index a6b3685..b468b01 100644
--- a/src/postorius/templates/postorius/domain_new.html
+++ b/src/postorius/templates/postorius/domain_new.html
@@ -2,6 +2,10 @@
{% load url from future %}
{% load i18n %}
+{% block subtitle %}
+{% trans "Add Domain" as page_title %}{{ page_title }}
+{% endblock %}
+
{% block main %}
{% include 'postorius/menu/settings_nav.html' %}
@@ -37,15 +41,6 @@
-
- {{ form.contact_address.errors }}
-
-
- {{ form.contact_address}}
-
{% trans "Example:" %} {% trans "postmaster@domain.org" %}
-
-
-
diff --git a/src/postorius/templates/postorius/lists/archival_options.html b/src/postorius/templates/postorius/lists/archival_options.html
new file mode 100644
index 0000000..abc0ad2
--- /dev/null
+++ b/src/postorius/templates/postorius/lists/archival_options.html
@@ -0,0 +1,28 @@
+{% extends postorius_base_template %}
+{% load url from future %}
+{% load i18n %}
+
+{% block subtitle %}
+{% trans "Archival Options | " as page_title %}{{ page_title|add:list.fqdn_listname}}
+{% endblock %}
+
+{% load nav_helpers %}
+
+{% block main %}
+ {% if message %}{{ message }}
{% endif %}
+ {% list_nav 'list_archival_options' 'Archivers' %}
+
+ {% trans 'Archivers' %}
+
+
+
+{% endblock %}
diff --git a/src/postorius/templates/postorius/lists/confirm_delete.html b/src/postorius/templates/postorius/lists/confirm_delete.html
index d868e29..a74a19c 100644
--- a/src/postorius/templates/postorius/lists/confirm_delete.html
+++ b/src/postorius/templates/postorius/lists/confirm_delete.html
@@ -1,6 +1,11 @@
{% extends postorius_base_template %}
{% load url from future %}
{% load i18n %}
+
+{% block subtitle %}
+{% trans "Delete | " as page_title %}{{ page_title|add:list.fqdn_listname}}
+{% endblock %}
+
{% load nav_helpers %}
{% block main %}
diff --git a/src/postorius/templates/postorius/lists/confirm_remove_role.html b/src/postorius/templates/postorius/lists/confirm_remove_role.html
index b7e1ccb..f78f85c 100644
--- a/src/postorius/templates/postorius/lists/confirm_remove_role.html
+++ b/src/postorius/templates/postorius/lists/confirm_remove_role.html
@@ -1,6 +1,11 @@
{% extends "postorius/base.html" %}
{% load url from future %}
{% load i18n %}
+
+{% block subtitle %}
+{% trans "Confirm Remove Role | " as page_title %}{{ page_title|add:address}}
+{% endblock %}
+
{% load nav_helpers %}
{% block main %}
diff --git a/src/postorius/templates/postorius/lists/held_messages.html b/src/postorius/templates/postorius/lists/held_messages.html
index 0a8b3c6..bde56a2 100644
--- a/src/postorius/templates/postorius/lists/held_messages.html
+++ b/src/postorius/templates/postorius/lists/held_messages.html
@@ -1,6 +1,11 @@
{% extends postorius_base_template %}
{% load url from future %}
{% load i18n %}
+
+{% block subtitle %}
+{% trans "Held Messages | " as page_title %}{{ page_title|add:list.fqdn_listname}}
+{% endblock %}
+
{% load nav_helpers %}
{% block body_class %}list_summary{% endblock %}
diff --git a/src/postorius/templates/postorius/lists/index.html b/src/postorius/templates/postorius/lists/index.html
index 052ce37..63a692a 100644
--- a/src/postorius/templates/postorius/lists/index.html
+++ b/src/postorius/templates/postorius/lists/index.html
@@ -1,6 +1,11 @@
{% extends postorius_base_template %}
{% load url from future %}
{% load i18n %}
+
+{% block subtitle %}
+{% trans "List Index" as page_title %}{{ page_title }}
+{% endblock %}
+
{% block main %}