Cloned DMOJ
This commit is contained in:
parent
f623974b58
commit
49dc9ff10c
513 changed files with 132349 additions and 39 deletions
16
templates/newsletter/common.html
Normal file
16
templates/newsletter/common.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{% block title %}{{ _('Newsletter') }}{% endblock title %}</title>
|
||||
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" >
|
||||
{% block header %}
|
||||
{% endblock header %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{% block body %}
|
||||
{% endblock body %}
|
||||
</body>
|
||||
</html>
|
22
templates/newsletter/message/message.html
Normal file
22
templates/newsletter/message/message.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>{{ newsletter.title }}: {{ message.title }}</title>
|
||||
</head>
|
||||
<body>
|
||||
{% for article in message.articles.all() %}
|
||||
<div>{{ article.text|safe }}</div>
|
||||
|
||||
{% if article.url %}
|
||||
<div><a href="{{ article.url }}">Read more</a></div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<a href="http://{{ site.domain }}{{ url('newsletter_unsubscribe_request', newsletter.slug) }}" style="color:#999;float:right">Unsubscribe</a>
|
||||
{% if submission and submission.publish %}
|
||||
<a href="http://{{ site.domain }}{{ submission.get_absolute_url }}" style="color:#999">Read message online</a>
|
||||
{% endif %}
|
||||
</body>
|
||||
</html>
|
15
templates/newsletter/message/message.txt
Normal file
15
templates/newsletter/message/message.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
++++++++++++++++++++
|
||||
|
||||
{{ newsletter.title|safe }}: {{ message.title|safe }}
|
||||
|
||||
++++++++++++++++++++
|
||||
|
||||
{% for article in message.articles.all() %}
|
||||
{{ article.title|safe }}
|
||||
{{ article.text|striptags|safe }}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
++++++++++++++++++++
|
||||
|
||||
Unsubscribe: http://{{ site }}{{ url('newsletter_unsubscribe_request', newsletter.slug) }}
|
1
templates/newsletter/message/message_subject.txt
Normal file
1
templates/newsletter/message/message_subject.txt
Normal file
|
@ -0,0 +1 @@
|
|||
{{ message.title|safe }}
|
20
templates/newsletter/message/subscribe.html
Normal file
20
templates/newsletter/message/subscribe.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Subscription to {{ newsletter.title }}</title>
|
||||
</head>
|
||||
<body>
|
||||
Dear {{ subscription.name }},
|
||||
|
||||
you, or someone in your name requested a subscription to {{ newsletter.title }}.
|
||||
|
||||
If you would like to confirm your subscription, please follow this activation link:
|
||||
http://{{ site.domain }}{{ subscription.subscribe_activate_url }}
|
||||
|
||||
Kind regards,
|
||||
{{ newsletter.sender }}
|
||||
</body>
|
||||
</html>
|
9
templates/newsletter/message/subscribe.txt
Normal file
9
templates/newsletter/message/subscribe.txt
Normal file
|
@ -0,0 +1,9 @@
|
|||
Dear {{ subscription.name|safe }},
|
||||
|
||||
you, or someone in your name requested a subscription to {{ newsletter.title|safe }}.
|
||||
|
||||
If you would like to confirm your subscription, please follow this activation link:
|
||||
http://{{ site.domain }}{{ subscription.subscribe_activate_url }}
|
||||
|
||||
Kind regards,
|
||||
{{ newsletter.sender|safe }}
|
1
templates/newsletter/message/subscribe_subject.txt
Normal file
1
templates/newsletter/message/subscribe_subject.txt
Normal file
|
@ -0,0 +1 @@
|
|||
{{ newsletter.title|safe }} - Confirm subscription
|
20
templates/newsletter/message/unsubscribe.html
Normal file
20
templates/newsletter/message/unsubscribe.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Unsubscription from {{ newsletter.title }}</title>
|
||||
</head>
|
||||
<body>
|
||||
Dear {{ subscription.name }},
|
||||
|
||||
you, or someone in your name requested unsubscription from {{ newsletter.title }}.
|
||||
|
||||
If you would like to confirm your unsubscription, please follow this activation link:
|
||||
http://{{ site.domain }}{{ subscription.unsubscribe_activate_url }}
|
||||
|
||||
Kind regards,
|
||||
{{ newsletter.sender }}
|
||||
</body>
|
||||
</html>
|
9
templates/newsletter/message/unsubscribe.txt
Normal file
9
templates/newsletter/message/unsubscribe.txt
Normal file
|
@ -0,0 +1,9 @@
|
|||
Dear {{ subscription.name|safe }},
|
||||
|
||||
you, or someone in your name requested unsubscription from {{ newsletter.title|safe }}.
|
||||
|
||||
If you would like to confirm your unsubscription, please follow this activation link:
|
||||
http://{{ site.domain }}{{ subscription.unsubscribe_activate_url }}
|
||||
|
||||
Kind regards,
|
||||
{{ newsletter.sender|safe }}
|
1
templates/newsletter/message/unsubscribe_subject.txt
Normal file
1
templates/newsletter/message/unsubscribe_subject.txt
Normal file
|
@ -0,0 +1 @@
|
|||
{{ newsletter.title|safe }} - Confirm unsubscription
|
20
templates/newsletter/message/update.html
Normal file
20
templates/newsletter/message/update.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Update of subscription to {{ newsletter.title }}</title>
|
||||
</head>
|
||||
<body>
|
||||
Dear {{ subscription.name }},
|
||||
|
||||
you, or someone in your name requested updating your personal information for {{ newsletter.title }}.
|
||||
|
||||
To make changes to your information in our database, please follow this activation link:
|
||||
http://{{ site.domain }}{{ subscription.update_activate_url }}
|
||||
|
||||
Kind regards,
|
||||
{{ newsletter.sender }}
|
||||
</body>
|
||||
</html>
|
9
templates/newsletter/message/update.txt
Normal file
9
templates/newsletter/message/update.txt
Normal file
|
@ -0,0 +1,9 @@
|
|||
Dear {{ subscription.name|safe }},
|
||||
|
||||
you, or someone in your name requested updating your personal information for {{ newsletter.title|safe }}.
|
||||
|
||||
To make changes to your information in our database, please follow this activation link:
|
||||
http://{{ site.domain }}{{ subscription.update_activate_url }}
|
||||
|
||||
Kind regards,
|
||||
{{ newsletter.sender|safe }}
|
1
templates/newsletter/message/update_subject.txt
Normal file
1
templates/newsletter/message/update_subject.txt
Normal file
|
@ -0,0 +1 @@
|
|||
{{ newsletter.title|safe }} - Update information
|
13
templates/newsletter/newsletter_detail.html
Normal file
13
templates/newsletter/newsletter_detail.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ object.title }} - Newsletter - {{ SITE_LONG_NAME }}{% endblock %}
|
||||
{% block content_title %}Newsletter: {{ object.title }}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<ul>
|
||||
<li><a href="{{ url('newsletter_subscribe_request', object.slug) }}">Subscribe</a></li>
|
||||
<li><a href="{{ url('newsletter_unsubscribe_request', object.slug) }}">Unsubscribe</a></li>
|
||||
<li><a href="{{ url('newsletter_archive', object.slug) }}">Archive</a></li>
|
||||
<li><a href="{{ url('newsletter_list') }}">Back to list</a></li>
|
||||
</ul>
|
||||
{% endblock %}
|
42
templates/newsletter/newsletter_list.html
Normal file
42
templates/newsletter/newsletter_list.html
Normal file
|
@ -0,0 +1,42 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}Newsletter list - {{ SITE_LONG_NAME }}{% endblock %}
|
||||
{% block content_title %}Newsletter list{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% if request.user.is_authenticated %}
|
||||
<form method="POST" action="" class="form-area">
|
||||
{% csrf_token %}
|
||||
{{ formset.management_form }}
|
||||
<table>
|
||||
<tr>
|
||||
<th>Newsletter</th>
|
||||
<th>Subscribe</th>
|
||||
</tr>
|
||||
{% for form in formset.forms %}
|
||||
<tr>
|
||||
<td>{{ form.id }}{{ form.newsletter }}
|
||||
<a href="{{ url('newsletter_archive', form.instance.newsletter.slug) }}">
|
||||
{{ form.instance.newsletter.title }}</a>
|
||||
</td>
|
||||
<td>{{ form.subscribed }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<hr>
|
||||
<p>
|
||||
<input id="id_submit" name="submit" value="Update subscriptions" type="submit" style="float: right">
|
||||
</p>
|
||||
</form>
|
||||
{% else %}
|
||||
<table class="form-area">
|
||||
<tr>
|
||||
<th>Newsletter</th>
|
||||
</tr>
|
||||
{% for newsletter in object_list %}
|
||||
<tr>
|
||||
<td><a href="{{ url('newsletter_detail', newsletter.slug) }}">{{ newsletter.title }}</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
{% endblock %}
|
13
templates/newsletter/submission_archive.html
Normal file
13
templates/newsletter/submission_archive.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}{{ object.title }} - Newsletter Archive - {{ SITE_LONG_NAME }}{% endblock %}
|
||||
{% block content_title %}Newsletter Archive: {{ object.title }}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<ul>
|
||||
{% for submission in latest %}
|
||||
<li><a href="{{ submission.get_absolute_url }}">{{ submission }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<hr>
|
||||
<p><a href="{{ url('newsletter_list') }}">Back to list</a></p>
|
||||
{% endblock %}
|
12
templates/newsletter/subscription_activate.html
Normal file
12
templates/newsletter/subscription_activate.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Newsletter {{ newsletter.title }} {{ action }} activate{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Newsletter {{ newsletter.title }} {{ action }} activate</h1>
|
||||
<form enctype="multipart/form-data" method="post" action=".">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p() }}
|
||||
<p><input id="id_submit" name="submit" type="submit" value="Activate"></p>
|
||||
</form>
|
||||
{% endblock %}
|
19
templates/newsletter/subscription_subscribe.html
Normal file
19
templates/newsletter/subscription_subscribe.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Newsletter subscribe{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Newsletter subscribe {{ newsletter.title }}</h1>
|
||||
{% if error %}
|
||||
<p>
|
||||
Due to a technical error we were not able to submit your confirmation email.
|
||||
This could be because your email address is invalid.
|
||||
</p>
|
||||
{% else %}
|
||||
<form enctype="multipart/form-data" method="post" action=".">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p() }}
|
||||
<p><input id="id_submit" name="submit" value="Subscribe" type="submit"></p>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endblock %}
|
|
@ -0,0 +1,7 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Newsletter {{ newsletter.title }} {{ action }} activate{% endblock %}
|
||||
{% block body %}
|
||||
<h1>Newsletter {{ newsletter.title }} {{ action }} activate</h1>
|
||||
<p>Your subscription has successfully been activated.</p>
|
||||
{% endblock %}
|
|
@ -0,0 +1,8 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}Newsletter subscribe{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Newsletter subscribe {{ newsletter.title }}</h1>
|
||||
<p>Your subscription request was successfully received and an activation email has been sent to you. In that email
|
||||
you will find a link which you need to follow in order to activate your subscription.</p>
|
||||
{% endblock %}
|
22
templates/newsletter/subscription_subscribe_user.html
Normal file
22
templates/newsletter/subscription_subscribe_user.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Newsletter subscribe{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Newsletter subscribe {{ newsletter.title }}</h1>
|
||||
<p>Welcome, {{ request.user }}!</p>
|
||||
{% if messages %}
|
||||
<ul>
|
||||
{% for message in messages %}
|
||||
<li>{{ message }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
Do you want to subscribe to this newsletter?
|
||||
<form enctype="multipart/form-data" method="post"
|
||||
action="{{ url('newsletter_subscribe_confirm', newsletter.slug) }}">
|
||||
{% csrf_token %}
|
||||
<p><input id="id_submit" name="submit" value="Subscribe" type="submit"></p>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endblock %}
|
17
templates/newsletter/subscription_unsubscribe.html
Normal file
17
templates/newsletter/subscription_unsubscribe.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Newsletter unsubscribe{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Newsletter unsubscribe {{ newsletter.title }}</h1>
|
||||
{% if error %}
|
||||
<p>Due to a technical error we were not able to submit your confirmation email.
|
||||
This could be because your email address is invalid.</p>
|
||||
{% else %}
|
||||
<form enctype="multipart/form-data" method="post" action=".">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p() }}
|
||||
<p><input id="id_submit" name="submit" value="Unsubscribe" type="submit"></p>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endblock %}
|
|
@ -0,0 +1,9 @@
|
|||
{% extends "newsletter/common.html" %}
|
||||
|
||||
{% block title %}{{ _('Newsletter') }} {{ newsletter.title }} {{ action }} {{ _('activate') }}{% endblock title %}
|
||||
|
||||
{% block body %}
|
||||
<h1>{{ _('Newsletter') }} {{ newsletter.title }} {{ action }} {{ _('activate') }}</h1>
|
||||
|
||||
<p>{{ _('You have successfully been unsubscribed.') }}</p>
|
||||
{% endblock body %}
|
|
@ -0,0 +1,9 @@
|
|||
{% extends "newsletter/common.html" %}
|
||||
|
||||
{% block title %}{{ _('Newsletter unsubscribe') }}{% endblock title %}
|
||||
|
||||
{% block body %}
|
||||
<h1>{{ _('Newsletter unsubscribe') }} {{ newsletter.title }}</h1>
|
||||
|
||||
<p>{{ _('Your unsubscription request has successfully been received. An email has been sent to you with a link you need to follow in order to confirm your unsubscription.') }}</p>
|
||||
{% endblock body %}
|
25
templates/newsletter/subscription_unsubscribe_user.html
Normal file
25
templates/newsletter/subscription_unsubscribe_user.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
{% extends "newsletter/common.html" %}
|
||||
|
||||
{% block title %}{{ _('Newsletter unsubscribe') }}{% endblock title %}
|
||||
|
||||
{% block body %}
|
||||
<h1>{{ _('Newsletter unsubscribe') }} {{ newsletter.title }}</h1>
|
||||
|
||||
<p>Welcome, {{ request.user }}!</p>
|
||||
|
||||
{% if messages %}
|
||||
<ul>
|
||||
{% for message in messages %}
|
||||
<li>{{ message }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
{{ _('Do you want to unsubscribe from this newsletter?') }}
|
||||
<form enctype="multipart/form-data" method="post"
|
||||
action="{{ url('newsletter_unsubscribe_confirm', newsletter.slug) }}">
|
||||
{% csrf_token %}
|
||||
<p><input id="id_submit" name="submit" value="{{ _('Unsubscribe') }}" type="submit"></p>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
{% endblock body %}
|
17
templates/newsletter/subscription_update.html
Normal file
17
templates/newsletter/subscription_update.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
{% extends "newsletter/common.html" %}
|
||||
|
||||
{% block title %}{{ _('Newsletter update') }}{% endblock title %}
|
||||
|
||||
{% block body %}
|
||||
<h1>{{ _('Newsletter update') }} {{ newsletter.title }}</h1>
|
||||
|
||||
{% if error %}
|
||||
<p>{{ _('Due to a technical error we were not able to submit your confirmation email. This could be because your email address is invalid.') }}</p>
|
||||
{% else %}
|
||||
<form enctype="multipart/form-data" method="post" action=".">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p() }}
|
||||
<p><input id="id_submit" name="submit" value="{{ _('Update subscription') }}" type="submit"></p>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endblock body %}
|
9
templates/newsletter/subscription_update_activated.html
Normal file
9
templates/newsletter/subscription_update_activated.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
{% extends "newsletter/common.html" %}
|
||||
|
||||
{% block title %}{{ _('Newsletter') }} {{ newsletter.title }} {{ action }} {{ _('activate') }}{% endblock title %}
|
||||
|
||||
{% block body %}
|
||||
<h1>{{ _('Newsletter') }} {{ newsletter.title }} {{ action }} {{ _('activate') }}</h1>
|
||||
|
||||
<p>{{ _('Your subscription has successfully been updated.') }}</p>
|
||||
{% endblock body %}
|
9
templates/newsletter/subscription_update_email_sent.html
Normal file
9
templates/newsletter/subscription_update_email_sent.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
{% extends "newsletter/common.html" %}
|
||||
|
||||
{% block title %}{{ _('Newsletter update') }}{% endblock title %}
|
||||
|
||||
{% block body %}
|
||||
<h1>{{ _('Newsletter update') }} {{ newsletter.title }}</h1>
|
||||
|
||||
<p>{{ _('Your update request was successfully received and an activation email has been sent to you. In that email you will find a link which you need to follow in order to update your subscription.') }}</p>
|
||||
{% endblock body %}
|
Loading…
Add table
Add a link
Reference in a new issue