summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/base.html4
-rw-r--r--templates/patchwork/activation_email.txt (renamed from templates/registration/activation_email.txt)2
-rw-r--r--templates/patchwork/activation_email_subject.txt (renamed from templates/registration/activation_email_subject.txt)0
-rw-r--r--templates/patchwork/confirm-error.html19
-rw-r--r--templates/patchwork/help/about.html4
-rw-r--r--templates/patchwork/login.html (renamed from templates/registration/login.html)0
-rw-r--r--templates/patchwork/logout.html (renamed from templates/registration/logout.html)0
-rw-r--r--templates/patchwork/mail-form.html38
-rw-r--r--templates/patchwork/mail-settings.html37
-rw-r--r--templates/patchwork/optin-request.html50
-rw-r--r--templates/patchwork/optin-request.mail12
-rw-r--r--templates/patchwork/optin.html19
-rw-r--r--templates/patchwork/optout-request.html51
-rw-r--r--templates/patchwork/optout-request.mail12
-rw-r--r--templates/patchwork/optout.html22
-rw-r--r--templates/patchwork/patch-change-notification-subject.text1
-rw-r--r--templates/patchwork/patch-change-notification.mail19
-rw-r--r--templates/patchwork/profile.html36
-rw-r--r--templates/patchwork/registration-confirm.html (renamed from templates/registration/activate.html)0
-rw-r--r--templates/patchwork/registration_form.html (renamed from templates/registration/registration_form.html)5
-rw-r--r--templates/patchwork/user-link.mail2
-rw-r--r--templates/registration/registration_complete.html13
22 files changed, 313 insertions, 33 deletions
diff --git a/templates/base.html b/templates/base.html
index e14470e..d3b8e67 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -30,7 +30,9 @@
{% else %}
<a href="{% url auth_login %}">login</a>
<br/>
- <a href="{% url registration_register %}">register</a>
+ <a href="{% url patchwork.views.user.register %}">register</a>
+ <br/>
+ <a href="{% url patchwork.views.mail.settings %}">mail settings</a>
{% endif %}
</div>
<div style="clear: both;"></div>
diff --git a/templates/registration/activation_email.txt b/templates/patchwork/activation_email.txt
index 6b1477d..e918e5f 100644
--- a/templates/registration/activation_email.txt
+++ b/templates/patchwork/activation_email.txt
@@ -3,7 +3,7 @@ Hi,
This email is to confirm your account on the patchwork patch-tracking
system. You can activate your account by visiting the url:
- http://{{site.domain}}{% url registration_activate activation_key=activation_key %}
+ http://{{site.domain}}{% url patchwork.views.confirm key=confirmation.key %}
If you didn't request a user account on patchwork, then you can ignore
this mail.
diff --git a/templates/registration/activation_email_subject.txt b/templates/patchwork/activation_email_subject.txt
index c409f38..c409f38 100644
--- a/templates/registration/activation_email_subject.txt
+++ b/templates/patchwork/activation_email_subject.txt
diff --git a/templates/patchwork/confirm-error.html b/templates/patchwork/confirm-error.html
new file mode 100644
index 0000000..81292e2
--- /dev/null
+++ b/templates/patchwork/confirm-error.html
@@ -0,0 +1,19 @@
+{% extends "base.html" %}
+
+{% block title %}Confirmation{% endblock %}
+{% block heading %}Confirmation{% endblock %}
+
+
+{% block body %}
+
+{% if error == 'inactive' %}
+<p>This confirmation has already been processed; you've probably visited this
+page before.</p>
+{% endif %}
+
+{% if error == 'expired' %}
+<p>The confirmation has expired. If you'd still like to perform the
+{{conf.get_type_display}} process, you'll need to resubmit the request.</p>
+{% endif %}
+
+{% endblock %}
diff --git a/templates/patchwork/help/about.html b/templates/patchwork/help/about.html
index edc381e..0d784d7 100644
--- a/templates/patchwork/help/about.html
+++ b/templates/patchwork/help/about.html
@@ -11,10 +11,6 @@
<p>Patchwork is built on the <a href="http://djangoproject.com/">django</a>
web framework.</p>
-<p>Patchwork includes the <a
-href="http://code.google.com/p/django-registration/">django-registration</a>
-application.</p>
-
<p>Icons from the <a href="http://sweetie.sublink.ca/">Sweetie</a> icon set.</a>
{% endblock %}
diff --git a/templates/registration/login.html b/templates/patchwork/login.html
index 2dfc2a7..2dfc2a7 100644
--- a/templates/registration/login.html
+++ b/templates/patchwork/login.html
diff --git a/templates/registration/logout.html b/templates/patchwork/logout.html
index f030aee..f030aee 100644
--- a/templates/registration/logout.html
+++ b/templates/patchwork/logout.html
diff --git a/templates/patchwork/mail-form.html b/templates/patchwork/mail-form.html
new file mode 100644
index 0000000..d71b2fb
--- /dev/null
+++ b/templates/patchwork/mail-form.html
@@ -0,0 +1,38 @@
+{% extends "base.html" %}
+
+{% block title %}mail settings{% endblock %}
+{% block heading %}mail settings{% endblock %}
+
+{% block body %}
+
+<p>You can configure patchwork to send you mail on certain events,
+or block automated mail altogether. Enter your email address to
+view or change your email settings.</p>
+
+<form method="post">
+{% csrf_token %}
+<table class="form registerform">
+{% if form.errors %}
+ <tr>
+ <td colspan="2" class="error">
+ There was an error accessing your mail settings:
+ </td>
+ </tr>
+{% endif %}
+ <tr>
+ <th>{{ form.email.label_tag }}</th>
+ <td>
+ {{form.email}}
+ {{form.email.errors}}
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="submitrow">
+ <input type="submit" value="Access mail settings"/>
+ </td>
+ </tr>
+</table>
+</form>
+
+
+{% endblock %}
diff --git a/templates/patchwork/mail-settings.html b/templates/patchwork/mail-settings.html
new file mode 100644
index 0000000..303139a
--- /dev/null
+++ b/templates/patchwork/mail-settings.html
@@ -0,0 +1,37 @@
+{% extends "base.html" %}
+
+{% block title %}mail settings{% endblock %}
+{% block heading %}mail settings{% endblock %}
+
+{% block body %}
+<p>Settings for <strong>{{email}}</strong>:</p>
+
+<table class="horizontal">
+ <tr>
+ <th>Opt-out list</th>
+{% if is_optout %}
+ <td>Patchwork <strong>may not</strong> send automated notifications to
+ this address.</td>
+ <td>
+ <form method="post" action="{% url patchwork.views.mail.optin %}">
+ {% csrf_token %}
+ <input type="hidden" name="email" value="{{email}}"/>
+ <input type="submit" value="Opt-in"/>
+ </form>
+ </td>
+
+{% else %}
+ <td>Patchwork <strong>may</strong> send automated notifications to
+ this address.</td>
+ <td>
+ <form method="post" action="{% url patchwork.views.mail.optout %}">
+ {% csrf_token %}
+ <input type="hidden" name="email" value="{{email}}"/>
+ <input type="submit" value="Opt-out"/>
+ </form>
+ </td>
+{% endif %}
+ </tr>
+</table>
+
+{% endblock %}
diff --git a/templates/patchwork/optin-request.html b/templates/patchwork/optin-request.html
new file mode 100644
index 0000000..63a4e12
--- /dev/null
+++ b/templates/patchwork/optin-request.html
@@ -0,0 +1,50 @@
+{% extends "base.html" %}
+
+{% block title %}opt-in{% endblock %}
+{% block heading %}opt-in{% endblock %}
+
+{% block body %}
+{% if email_sent %}
+<p><strong>Opt-in confirmation email sent</strong></p>
+<p>An opt-in confirmation mail has been sent to
+<strong>{{confirmation.email}}</strong>, containing a link. Please click on
+that link to confirm your opt-in.</p>
+{% else %}
+{% if error %}
+<p class="error">{{error}}</p>
+{% endif %}
+
+{% if form %}
+<p>This form allows you to opt-in to automated email from patchwork. Use
+this if you have previously opted-out of patchwork mail, but now want to
+received notifications from patchwork.</p>
+When you submit it, an email will be sent to your address with a link to click
+to finalise the opt-in. Patchwork does this to prevent someone opting you in
+without your consent.</p>
+<form method="post" action="">
+{% csrf_token %}
+{{form.email.errors}}
+<div style="padding: 0.5em 1em 2em;">
+{{form.email.label_tag}}: {{form.email}}
+</div>
+<input type="submit" value="Send me an opt-in link">
+</form>
+{% endif %}
+
+{% if error and admins %}
+<p>If you are having trouble opting in, please email
+{% for admin in admins %}
+{% if admins|length > 1 and forloop.last %} or {% endif %}
+{{admin.0}} &lt;<a href="mailto:{{admin.1}}">{{admin.1}}</a
+>&gt;{% if admins|length > 2 and not forloop.last %}, {% endif %}
+{% endfor %}
+{% endif %}
+
+{% endif %}
+
+{% if user.is_authenticated %}
+<p>Return to your <a href="{% url patchwork.views.user.profile %}">user
+profile</a>.</p>
+{% endif %}
+
+{% endblock %}
diff --git a/templates/patchwork/optin-request.mail b/templates/patchwork/optin-request.mail
new file mode 100644
index 0000000..34dd2c7
--- /dev/null
+++ b/templates/patchwork/optin-request.mail
@@ -0,0 +1,12 @@
+Hi,
+
+This email is to confirm that you would like to opt-in to automated
+email from the patchwork system at {{site.domain}}.
+
+To complete the opt-in process, visit:
+
+ http://{{site.domain}}{% url patchwork.views.confirm key=confirmation.key %}
+
+If you didn't request this opt-in, you don't need to do anything.
+
+Happy patchworking.
diff --git a/templates/patchwork/optin.html b/templates/patchwork/optin.html
new file mode 100644
index 0000000..f7c0c04
--- /dev/null
+++ b/templates/patchwork/optin.html
@@ -0,0 +1,19 @@
+{% extends "base.html" %}
+
+{% block title %}opt-in{% endblock %}
+{% block heading %}opt-in{% endblock %}
+
+{% block body %}
+
+<p><strong>Opt-in complete</strong>. You have sucessfully opted back in to
+automated email from this patchwork system, using the address
+<strong>{{email}}</strong>.</p>
+<p>If you later decide that you no longer want to receive automated mail from
+patchwork, just visit <a href="{% url patchwork.views.mail.settings %}"
+>http://{{site.domain}}{% url patchwork.views.mail.settings %}</a>, or
+visit the main patchwork page and navigate from there.</p>
+{% if user.is_authenticated %}
+<p>Return to your <a href="{% url patchwork.views.user.profile %}">user
+profile</a>.</p>
+{% endif %}
+{% endblock %}
diff --git a/templates/patchwork/optout-request.html b/templates/patchwork/optout-request.html
new file mode 100644
index 0000000..dbdf250
--- /dev/null
+++ b/templates/patchwork/optout-request.html
@@ -0,0 +1,51 @@
+{% extends "base.html" %}
+
+{% block title %}opt-out{% endblock %}
+{% block heading %}opt-out{% endblock %}
+
+{% block body %}
+{% if email_sent %}
+<p><strong>Opt-out confirmation email sent</strong></p>
+<p>An opt-out confirmation mail has been sent to
+<strong>{{confirmation.email}}</strong>, containing a link. Please click on
+that link to confirm your opt-out.</p>
+{% else %}
+{% if error %}
+<p class="error">{{error}}</p>
+{% endif %}
+
+{% if form %}
+<p>This form allows you to opt-out of automated email from patchwork.</p>
+<p>If you opt-out of email, Patchwork may still email you if you do certain
+actions yourself (such as create a new patchwork account), but will not send
+you unsolicited email.</p>
+When you submit it, one email will be sent to your address with a link to click
+to finalise the opt-out. Patchwork does this to prevent someone opting you out
+without your consent.</p>
+<form method="post" action="">
+{% csrf_token %}
+{{form.email.errors}}
+<div style="padding: 0.5em 1em 2em;">
+{{form.email.label_tag}}: {{form.email}}
+</div>
+<input type="submit" value="Send me an opt-out link">
+</form>
+{% endif %}
+
+{% if error and admins %}
+<p>If you are having trouble opting out, please email
+{% for admin in admins %}
+{% if admins|length > 1 and forloop.last %} or {% endif %}
+{{admin.0}} &lt;<a href="mailto:{{admin.1}}">{{admin.1}}</a
+>&gt;{% if admins|length > 2 and not forloop.last %}, {% endif %}
+{% endfor %}
+{% endif %}
+
+{% endif %}
+
+{% if user.is_authenticated %}
+<p>Return to your <a href="{% url patchwork.views.user.profile %}">user
+profile</a>.</p>
+{% endif %}
+
+{% endblock %}
diff --git a/templates/patchwork/optout-request.mail b/templates/patchwork/optout-request.mail
new file mode 100644
index 0000000..f896e3c
--- /dev/null
+++ b/templates/patchwork/optout-request.mail
@@ -0,0 +1,12 @@
+Hi,
+
+This email is to confirm that you would like to opt-out from all email
+from the patchwork system at {{site.domain}}.
+
+To complete the opt-out process, visit:
+
+ http://{{site.domain}}{% url patchwork.views.confirm key=confirmation.key %}
+
+If you didn't request this opt-out, you don't need to do anything.
+
+Happy patchworking.
diff --git a/templates/patchwork/optout.html b/templates/patchwork/optout.html
new file mode 100644
index 0000000..6b97806
--- /dev/null
+++ b/templates/patchwork/optout.html
@@ -0,0 +1,22 @@
+{% extends "base.html" %}
+
+{% block title %}opt-out{% endblock %}
+{% block heading %}opt-out{% endblock %}
+
+{% block body %}
+
+<p><strong>Opt-out complete</strong>. You have successfully opted-out of
+automated notifications from this patchwork system, from the address
+<strong>{{email}}</strong></p>
+<p>Please note that you may still receive email from other patchwork setups at
+different sites, as they are run independently. You may need to opt-out of
+those separately.</p>
+<p>If you later decide to receive mail from patchwork, just visit
+<a href="{% url patchwork.views.mail.settings %}"
+>http://{{site.domain}}{% url patchwork.views.mail.settings %}</a>, or
+visit the main patchwork page and navigate from there.</p>
+{% if user.is_authenticated %}
+<p>Return to your <a href="{% url patchwork.views.user.profile %}">user
+profile</a>.</p>
+{% endif %}
+{% endblock %}
diff --git a/templates/patchwork/patch-change-notification-subject.text b/templates/patchwork/patch-change-notification-subject.text
new file mode 100644
index 0000000..02ee55b
--- /dev/null
+++ b/templates/patchwork/patch-change-notification-subject.text
@@ -0,0 +1 @@
+Patch update notification: {{notifications|length}} patch{{notifications|length|pluralize:"es"}} updated
diff --git a/templates/patchwork/patch-change-notification.mail b/templates/patchwork/patch-change-notification.mail
new file mode 100644
index 0000000..d86a6af
--- /dev/null
+++ b/templates/patchwork/patch-change-notification.mail
@@ -0,0 +1,19 @@
+Hello,
+
+The following patch{{notifications|length|pluralize:"es"}} (submitted by you) {{notifications|length|pluralize:"has,have"}} been updated in patchwork:
+{% for notification in notifications %}
+ * {{notification.patch.name}}
+ - http://{{site.domain}}{{notification.patch.get_absolute_url}}
+ was: {{notification.orig_state}}
+ now: {{notification.patch.state}}
+{% endfor %}
+This email is a notification only - you do not need to respond.
+
+Happy patchworking.
+
+--
+
+This is an automated mail sent by the patchwork system at
+{{site.domain}}. To stop receiving these notifications, edit
+your mail settings at:
+ http://{{site.domain}}{% url patchwork.views.mail.settings %}
diff --git a/templates/patchwork/profile.html b/templates/patchwork/profile.html
index 44df921..130b947 100644
--- a/templates/patchwork/profile.html
+++ b/templates/patchwork/profile.html
@@ -40,34 +40,50 @@ Contributor to
<p>The following email addresses are associated with this patchwork account.
Adding alternative addresses allows patchwork to group contributions that
you have made under different addresses.</p>
+<p>The "notify?" column allows you to opt-in or -out of automated
+patchwork notification emails. Setting it to "no" will disable automated
+notifications for that address.</p>
<p>Adding a new email address will send a confirmation email to that
address.</p>
-<table class="vertical" style="width: 20em;">
+<table class="vertical">
<tr>
<th>email</th>
- <th/>
- </tr>
- <tr>
- <td>{{ user.email }}</td>
- <td></td>
+ <th>action</th>
+ <th>notify?</th>
</tr>
{% for email in linked_emails %}
- {% ifnotequal email.email user.email %}
<tr>
<td>{{ email.email }}</td>
<td>
- {% ifnotequal user.email email.email %}
+ {% ifnotequal user.email email.email %}
<form action="{% url patchwork.views.user.unlink person_id=email.id %}"
method="post">
{% csrf_token %}
<input type="submit" value="Unlink"/>
</form>
{% endifnotequal %}
+ </td>
+ <td>
+ {% if email.is_optout %}
+ <form method="post" action="{% url patchwork.views.mail.optin %}">
+ No,
+ {% csrf_token %}
+ <input type="hidden" name="email" value="{{email.email}}"/>
+ <input type="submit" value="Opt-in"/>
+ </form>
+ {% else %}
+ <form method="post" action="{% url patchwork.views.mail.optout %}">
+ Yes,
+ {% csrf_token %}
+ <input type="hidden" name="email" value="{{email.email}}"/>
+ <input type="submit" value="Opt-out"/>
+ </form>
+ {% endif %}
+ </td>
</tr>
- {% endifnotequal %}
{% endfor %}
<tr>
- <td colspan="2">
+ <td colspan="3">
<form action="{% url patchwork.views.user.link %}" method="post">
{% csrf_token %}
{{ linkform.email }}
diff --git a/templates/registration/activate.html b/templates/patchwork/registration-confirm.html
index f0cc39f..f0cc39f 100644
--- a/templates/registration/activate.html
+++ b/templates/patchwork/registration-confirm.html
diff --git a/templates/registration/registration_form.html b/templates/patchwork/registration_form.html
index e2b17c1..3a314b8 100644
--- a/templates/registration/registration_form.html
+++ b/templates/patchwork/registration_form.html
@@ -6,12 +6,11 @@
{% block body %}
-{% if request and not error %}
+{% if confirmation and not error %}
<p>Registration successful!</p>
- <p>A confirmation email has been sent to {{ request.email }}. You'll
+ <p>A confirmation email has been sent to {{ confirmation.email }}. You'll
need to visit the link provided in that email to confirm your
registration.</p>
- <pre>{{email}}</pre>
</p>
{% else %}
<p>By creating a patchwork account, you can:<p>
diff --git a/templates/patchwork/user-link.mail b/templates/patchwork/user-link.mail
index 5f74d3b..c483181 100644
--- a/templates/patchwork/user-link.mail
+++ b/templates/patchwork/user-link.mail
@@ -7,6 +7,6 @@ This email is to confirm that you own the email address:
So that you can add it to your patchwork profile. You can confirm this
email address by visiting the url:
- http://{{site.domain}}{% url patchwork.views.user.link_confirm key=confirmation.key %}
+ http://{{site.domain}}{% url patchwork.views.confirm key=confirmation.key %}
Happy patchworking.
diff --git a/templates/registration/registration_complete.html b/templates/registration/registration_complete.html
deleted file mode 100644
index a89c116..0000000
--- a/templates/registration/registration_complete.html
+++ /dev/null
@@ -1,13 +0,0 @@
-{% extends "base.html" %}
-
-{% block title %}Registration{% endblock %}
-{% block heading %}Registration{% endblock %}
-
-{% block body %}
-
- <p>Registration successful!</p>
- <p>A confirmation email has been sent to your email address. You'll
- need to visit the link provided in that email to activate your
- patchwork account.</p>
-
-{% endblock %}