Some great weekmail improvements

This commit is contained in:
Skia
2017-01-11 12:18:42 +01:00
parent 83555a3640
commit 147809bb5d
7 changed files with 297 additions and 129 deletions

View File

@ -6,9 +6,9 @@
{% endblock %}
{% block content %}
<h3>{% trans %}Weekmail{% endtrans %}</h3>
<p><a href="{{ url('com:weekmail_preview') }}" target="_blank">{% trans %}Preview{% endtrans %}</a></p>
<p><a href="?send">{% trans %}Send{% endtrans %}</a></p>
<h3>{% trans %}Weekmail{% endtrans %} {{ object.id }}</h3>
<p><a href="{{ url('com:weekmail_preview') }}">{% trans %}Preview{% endtrans %}</a></p>
<p><a href="{{ url('com:weekmail_preview') }}?send=true">{% trans %}Send{% endtrans %}</a></p>
<h4>{% trans %}Articles in no weekmail yet{% endtrans %}</h4>
<table>
<thead>

View File

@ -6,6 +6,18 @@
{% endblock %}
{% block content %}
<a href="{{ url('com:weekmail') }}">{% trans %}Back{% endtrans %}</a>
{% if request.GET['send'] %}
<p>{% trans %}Are you sure you want to send this weekmail?{% endtrans %}</p>
{% if request.LANGUAGE_CODE != settings.LANGUAGE_CODE[:2] %}
<p><strong>{% trans %}Warning: you are sending the weekmail in another language than the default one!{% endtrans %}</strong></p>
{% endif %}
<form method="post" action="">
{% csrf_token %}
<button type="submit" name="send" value="validate">{% trans %}Send{% endtrans %}</button>
</form>
{% endif %}
<hr>
{{ weekmail_rendered|safe }}
{% endblock %}