diff --git a/src/postorius/models.py b/src/postorius/models.py index df3cf28..abc277b 100644 --- a/src/postorius/models.py +++ b/src/postorius/models.py @@ -287,7 +287,7 @@ The following settings are recognized: - >>> EMAIL_CONFIRMATION_TEMPLATE = 'postorius/address_confirmation_message.txt' + >>> EMAIL_CONFIRMATION_TEMPLATE = 'postorius/user/address_confirmation_message.txt' >>> EMAIL_CONFIRMATION_FROM = 'postmaster@list.org' >>> EMAIL_CONFIRMATION_SUBJECT = 'Confirmation needed' @@ -306,7 +306,7 @@ if not template_path: template_path = getattr(settings, 'EMAIL_CONFIRMATION_TEMPLATE', - 'postorius/address_confirmation_message.txt') + 'postorius/user/address_confirmation_message.txt') # Create a template context (if there is none) containing # the activation_link and the host_url. if not template_context: diff --git a/src/postorius/templates/postorius/_pagination.html b/src/postorius/templates/postorius/_pagination.html deleted file mode 100644 index 29d6dd2..0000000 --- a/src/postorius/templates/postorius/_pagination.html +++ /dev/null @@ -1,74 +0,0 @@ -{% load i18n %} - -{% if page.paginator.num_pages > 1 %} - -{% endif %} diff --git a/src/postorius/templates/postorius/address_confirmation_message.txt b/src/postorius/templates/postorius/address_confirmation_message.txt deleted file mode 100644 index 8166a13..0000000 --- a/src/postorius/templates/postorius/address_confirmation_message.txt +++ /dev/null @@ -1,6 +0,0 @@ -Please click the link below to add your email address to your mailing list -profile at {{ host_url }}: - -{{ activation_link }} - -Thanks! diff --git a/src/postorius/templates/postorius/address_notification_message.txt b/src/postorius/templates/postorius/address_notification_message.txt deleted file mode 100644 index 73bae33..0000000 --- a/src/postorius/templates/postorius/address_notification_message.txt +++ /dev/null @@ -1,7 +0,0 @@ -Someone has requested to add {{email}} to their mailing list profile at {{ host_url }}. - -If you are that person, please click the link below to confirm. - -{{ activation_link }} - -Thanks! diff --git a/src/postorius/templates/postorius/domain/confirm_delete.html b/src/postorius/templates/postorius/domain/confirm_delete.html new file mode 100644 index 0000000..96fe721 --- /dev/null +++ b/src/postorius/templates/postorius/domain/confirm_delete.html @@ -0,0 +1,24 @@ +{% extends postorius_base_template %} +{% load i18n %} + +{% block subtitle %} +{% trans 'Confirm Domain Removal' %} | {{ domain}} +{% endblock %} + +{% load nav_helpers %} + +{% block main %} + +
{% trans 'Are you sure you want to permanently delete this Domain?' %}
+ + + +{% endblock main %} diff --git a/src/postorius/templates/postorius/domain/index.html b/src/postorius/templates/postorius/domain/index.html new file mode 100644 index 0000000..da4c017 --- /dev/null +++ b/src/postorius/templates/postorius/domain/index.html @@ -0,0 +1,39 @@ +{% extends postorius_base_template %} +{% load i18n %} + +{% block subtitle %} +{% trans 'Domains' %} +{% endblock %} + +{% block main %} + +{% trans 'Mail Host' %} | +{% trans 'URL Host' %} | +{% trans 'Description' %} | ++ |
---|---|---|---|
{{ domain.mail_host }} | +{{ domain.base_url }} | +{{ domain.description }} | +{% trans 'Delete' %} | +
{% trans 'Are you sure you want to permanently delete this Domain?' %}
- - - -{% endblock main %} diff --git a/src/postorius/templates/postorius/domain_index.html b/src/postorius/templates/postorius/domain_index.html deleted file mode 100644 index da4c017..0000000 --- a/src/postorius/templates/postorius/domain_index.html +++ /dev/null @@ -1,39 +0,0 @@ -{% extends postorius_base_template %} -{% load i18n %} - -{% block subtitle %} -{% trans 'Domains' %} -{% endblock %} - -{% block main %} - -{% trans 'Mail Host' %} | -{% trans 'URL Host' %} | -{% trans 'Description' %} | -- |
---|---|---|---|
{{ domain.mail_host }} | -{{ domain.base_url }} | -{{ domain.description }} | -{% trans 'Delete' %} | -
+ {% if domain_count < 2 %} + {% trans 'Create New Domain' %} + {% endif %} + {% trans 'Create New List' %} +
+ {% endif %} + {% if lists|length > 0 %} +{% trans 'List name' %} | +{% trans 'Post address' %} | +{% trans 'Description' %} | +
---|---|---|
+ {{ list.display_name }} + {% if not list.settings.advertised %} ({% trans 'unadvertised' %}*){% endif %} + | +{{ list.fqdn_listname }} | +{{ list.settings.description }} | +
{% trans 'There are currently no mailing lists.' %}
+ {% endif %} + +{% endblock main %} diff --git a/src/postorius/templates/postorius/lib/pagination.html b/src/postorius/templates/postorius/lib/pagination.html new file mode 100644 index 0000000..29d6dd2 --- /dev/null +++ b/src/postorius/templates/postorius/lib/pagination.html @@ -0,0 +1,74 @@ +{% load i18n %} + +{% if page.paginator.num_pages > 1 %} + +{% endif %} diff --git a/src/postorius/templates/postorius/lists/held_messages.html b/src/postorius/templates/postorius/lists/held_messages.html index 95e210d..5a48e97 100644 --- a/src/postorius/templates/postorius/lists/held_messages.html +++ b/src/postorius/templates/postorius/lists/held_messages.html @@ -82,7 +82,7 @@ - {% include 'postorius/_pagination.html' with page=held_messages %} + {% include 'postorius/lib/pagination.html' with page=held_messages %} {% else %}{% trans 'There are currently no held messages.' %}
{% endif %} diff --git a/src/postorius/templates/postorius/lists/index.html b/src/postorius/templates/postorius/lists/index.html deleted file mode 100644 index 6c76705..0000000 --- a/src/postorius/templates/postorius/lists/index.html +++ /dev/null @@ -1,54 +0,0 @@ -{% extends postorius_base_template %} -{% load i18n %} - -{% block subtitle %} -{% trans 'List Index' %} -{% endblock %} - -{% block main %} - -- {% if domain_count < 2 %} - {% trans 'Create New Domain' %} - {% endif %} - {% trans 'Create New List' %} -
- {% endif %} - {% if lists|length > 0 %} -{% trans 'List name' %} | -{% trans 'Post address' %} | -{% trans 'Description' %} | -
---|---|---|
- {{ list.display_name }} - {% if not list.settings.advertised %} ({% trans 'unadvertised' %}*){% endif %} - | -{{ list.fqdn_listname }} | -{{ list.settings.description }} | -
{% trans 'There are currently no mailing lists.' %}
- {% endif %} - -{% endblock main %} diff --git a/src/postorius/templates/postorius/lists/members.html b/src/postorius/templates/postorius/lists/members.html index 3af847e..503e301 100644 --- a/src/postorius/templates/postorius/lists/members.html +++ b/src/postorius/templates/postorius/lists/members.html @@ -77,7 +77,7 @@ {% if role == 'subscriber' %} - {% include 'postorius/_pagination.html' with page=members %} + {% include 'postorius/lib/pagination.html' with page=members %} {% endif %} {% else %}{{ empty_error }}
diff --git a/src/postorius/templates/postorius/user/address_activation.html b/src/postorius/templates/postorius/user/address_activation.html new file mode 100644 index 0000000..e97586a --- /dev/null +++ b/src/postorius/templates/postorius/user/address_activation.html @@ -0,0 +1,18 @@ +{% extends postorius_base_template %} +{% load i18n %} +{% load bootstrap_tags %} +{% load nav_helpers %} + +{% block subtitle %} +{% trans 'Add email' %} | {{ user.username }} +{% endblock %} + +{% block main %} + + {% user_nav 'add_email' 'Add email address' %} + + + +{% endblock main %} diff --git a/src/postorius/templates/postorius/user/address_activation_sent.html b/src/postorius/templates/postorius/user/address_activation_sent.html new file mode 100644 index 0000000..dd6390f --- /dev/null +++ b/src/postorius/templates/postorius/user/address_activation_sent.html @@ -0,0 +1,15 @@ +{% extends postorius_base_template %} +{% load i18n %} +{% load nav_helpers %} + +{% block subtitle %} +{% trans "Confirmation Sent" as page_title %}{{ page_title }} +{% endblock %} + +{% block main %} + + {% user_nav 'add_email' 'Add Email Address' %} + +{% trans "A confirmation link has been sent to the email address you submitted. Please check your email account and click on the confirmation link to add this address for your account." %}
+{% endblock main %} diff --git a/src/postorius/templates/postorius/user/address_confirmation_message.txt b/src/postorius/templates/postorius/user/address_confirmation_message.txt new file mode 100644 index 0000000..8166a13 --- /dev/null +++ b/src/postorius/templates/postorius/user/address_confirmation_message.txt @@ -0,0 +1,6 @@ +Please click the link below to add your email address to your mailing list +profile at {{ host_url }}: + +{{ activation_link }} + +Thanks! diff --git a/src/postorius/templates/postorius/user/address_preferences.html b/src/postorius/templates/postorius/user/address_preferences.html new file mode 100644 index 0000000..3ffacd8 --- /dev/null +++ b/src/postorius/templates/postorius/user/address_preferences.html @@ -0,0 +1,77 @@ +{% extends postorius_base_template %} + +{% load i18n %} +{% load bootstrap_tags %} +{% load nav_helpers %} + +{% block subtitle %} +{% trans 'Subscription Preferences' %} | {{ user.username }} +{% endblock %} + +{% block main %} + + {% user_nav 'settings' 'Subscription Settings' %} + + + + {% if nolists %} +{% trans 'You are not yet subscribed to any lists, so you have no Mailman preferences.' %}
+ {% else %} +{% trans 'Each email address can have specific Mailman preferences.' %}
+ + {% endif %} + +{% endblock main %} +{% block additionaljs %} + +{% endblock %} diff --git a/src/postorius/templates/postorius/user/mailman_settings.html b/src/postorius/templates/postorius/user/mailman_settings.html new file mode 100644 index 0000000..44a312a --- /dev/null +++ b/src/postorius/templates/postorius/user/mailman_settings.html @@ -0,0 +1,31 @@ +{% extends postorius_base_template %} +{% load i18n %} +{% load bootstrap_tags %} +{% load nav_helpers %} + +{% block subtitle %} +{% trans 'Subscription settings' %} | {{ user.username }} +{% endblock %} + +{% block main %} + + {% user_nav 'settings' 'Subscription settings' %} + + + + {% if not mm_user %} +{% trans 'You are not yet subscribed to any lists, so you have no Mailman preferences.' %}
+ {% else %} + + {% endif %} + +{% endblock main %} diff --git a/src/postorius/templates/postorius/user/profile.html b/src/postorius/templates/postorius/user/profile.html new file mode 100644 index 0000000..c6e99b3 --- /dev/null +++ b/src/postorius/templates/postorius/user/profile.html @@ -0,0 +1,38 @@ +{% extends postorius_base_template %} +{% load i18n %} +{% load nav_helpers %} + +{% block subtitle %} +{% trans 'Profile' %} | {{ user.username }} +{% endblock %} + +{% block main %} + + {% user_nav 'profile' 'User Profile' %} + +{% trans 'Mailman display name' %} | +{{ mm_user.display_name }} | +
{% trans 'Username' %} | +{{ user.username }} | +
{% trans 'Main email' %} | +{{ user.email}} | +
{% trans 'Other emails' %} | +
|
+
{% trans 'You are not yet subscribed to any lists, so you have no Mailman preferences.' %}
+ {% else %} +{% trans 'Each list subscription can have specific Mailman preferences.' %}
+ + {% endif %} + +{% endblock main %} +{% block additionaljs %} + +{% endblock %} diff --git a/src/postorius/templates/postorius/user/subscriptions.html b/src/postorius/templates/postorius/user/subscriptions.html new file mode 100644 index 0000000..4a6151b --- /dev/null +++ b/src/postorius/templates/postorius/user/subscriptions.html @@ -0,0 +1,36 @@ +{% extends postorius_base_template %} + +{% load i18n %} +{% load nav_helpers %} + +{% block subtitle %} +{% trans 'Subscriptions' %} | {{ user.username }} +{% endblock %} + +{% block main %} + + {% user_nav 'subscriptions' 'List Subscriptions' %} + +{% trans 'You are subscribed to the following mailing lists:' %}
+{% trans 'List Name' %} | +{% trans 'Subscription Address' %} | +{% trans 'Delivery Mode' %} | +
---|---|---|
{{ subscription.list_id }} | +{{ subscription.address }} | +{{ subscription.preferences.delivery_mode }} | +
{% trans "A confirmation link has been sent to the email address you submitted. Please check your email account and click on the confirmation link to add this address for your account." %}
-{% endblock main %} diff --git a/src/postorius/templates/postorius/user_address_preferences.html b/src/postorius/templates/postorius/user_address_preferences.html deleted file mode 100644 index 3ffacd8..0000000 --- a/src/postorius/templates/postorius/user_address_preferences.html +++ /dev/null @@ -1,77 +0,0 @@ -{% extends postorius_base_template %} - -{% load i18n %} -{% load bootstrap_tags %} -{% load nav_helpers %} - -{% block subtitle %} -{% trans 'Subscription Preferences' %} | {{ user.username }} -{% endblock %} - -{% block main %} - - {% user_nav 'settings' 'Subscription Settings' %} - - - - {% if nolists %} -{% trans 'You are not yet subscribed to any lists, so you have no Mailman preferences.' %}
- {% else %} -{% trans 'Each email address can have specific Mailman preferences.' %}
- - {% endif %} - -{% endblock main %} -{% block additionaljs %} - -{% endblock %} diff --git a/src/postorius/templates/postorius/user_mailmansettings.html b/src/postorius/templates/postorius/user_mailmansettings.html deleted file mode 100644 index 44a312a..0000000 --- a/src/postorius/templates/postorius/user_mailmansettings.html +++ /dev/null @@ -1,31 +0,0 @@ -{% extends postorius_base_template %} -{% load i18n %} -{% load bootstrap_tags %} -{% load nav_helpers %} - -{% block subtitle %} -{% trans 'Subscription settings' %} | {{ user.username }} -{% endblock %} - -{% block main %} - - {% user_nav 'settings' 'Subscription settings' %} - - - - {% if not mm_user %} -{% trans 'You are not yet subscribed to any lists, so you have no Mailman preferences.' %}
- {% else %} - - {% endif %} - -{% endblock main %} diff --git a/src/postorius/templates/postorius/user_profile.html b/src/postorius/templates/postorius/user_profile.html deleted file mode 100644 index c6e99b3..0000000 --- a/src/postorius/templates/postorius/user_profile.html +++ /dev/null @@ -1,38 +0,0 @@ -{% extends postorius_base_template %} -{% load i18n %} -{% load nav_helpers %} - -{% block subtitle %} -{% trans 'Profile' %} | {{ user.username }} -{% endblock %} - -{% block main %} - - {% user_nav 'profile' 'User Profile' %} - -{% trans 'Mailman display name' %} | -{{ mm_user.display_name }} | -
{% trans 'Username' %} | -{{ user.username }} | -
{% trans 'Main email' %} | -{{ user.email}} | -
{% trans 'Other emails' %} | -
|
-
{% trans 'You are not yet subscribed to any lists, so you have no Mailman preferences.' %}
- {% else %} -{% trans 'Each list subscription can have specific Mailman preferences.' %}
- - {% endif %} - -{% endblock main %} -{% block additionaljs %} - -{% endblock %} diff --git a/src/postorius/templates/postorius/user_subscriptions.html b/src/postorius/templates/postorius/user_subscriptions.html deleted file mode 100644 index 4a6151b..0000000 --- a/src/postorius/templates/postorius/user_subscriptions.html +++ /dev/null @@ -1,36 +0,0 @@ -{% extends postorius_base_template %} - -{% load i18n %} -{% load nav_helpers %} - -{% block subtitle %} -{% trans 'Subscriptions' %} | {{ user.username }} -{% endblock %} - -{% block main %} - - {% user_nav 'subscriptions' 'List Subscriptions' %} - -{% trans 'You are subscribed to the following mailing lists:' %}
-{% trans 'List Name' %} | -{% trans 'Subscription Address' %} | -{% trans 'Delivery Mode' %} | -
---|---|---|
{{ subscription.list_id }} | -{{ subscription.address }} | -{{ subscription.preferences.delivery_mode }} | -