Improve weekmail

This commit is contained in:
Skia
2017-01-07 15:08:23 +01:00
parent 0aef7656b8
commit 097d238962
6 changed files with 158 additions and 10 deletions

View File

@ -1,4 +1,5 @@
{% extends "core/base.jinja" %}
{% from 'core/macros.jinja' import user_profile_link %}
{% block title %}
{% trans %}Weekmail{% endtrans %}
@ -6,7 +7,57 @@
{% block content %}
<h3>{% trans %}Weekmail{% endtrans %}</h3>
{{ object }}
<h4>{% trans %}Articles in no weekmail yet{% endtrans %}</h4>
<table>
<thead>
<tr>
<td>{% trans %}Author{% endtrans %}</td>
<td>{% trans %}Club{% endtrans %}</td>
<td>{% trans %}Title{% endtrans %}</td>
<td>{% trans %}Content{% endtrans %}</td>
<td>{% trans %}Actions{% endtrans %}</td>
</tr>
</thead>
<tbody>
{% for a in orphans.all() %}
<tr>
<td>{{ user_profile_link(a.author) }}</td>
<td><a href="{{ a.club.get_absolute_url() }}">{{ a.club }}</a></td>
<td>{{ a.title }}</td>
<td>{{ a.content|markdown }}</td>
<td><a href="?add_article={{ a.id }}">{% trans %}Add to weekmail{% endtrans %}</a></td>
</tr>
{% endfor %}
</tbody>
</table>
<h4>{% trans %}Articles included the next weekmail{% endtrans %}</h4>
<table>
<thead>
<tr>
<td>{% trans %}Author{% endtrans %}</td>
<td>{% trans %}Club{% endtrans %}</td>
<td>{% trans %}Title{% endtrans %}</td>
<td>{% trans %}Content{% endtrans %}</td>
<td>{% trans %}Actions{% endtrans %}</td>
</tr>
</thead>
<tbody>
{% for a in object.articles.order_by('rank') %}
<tr>
<td>{{ user_profile_link(a.author) }}</td>
<td><a href="{{ a.club.get_absolute_url() }}">{{ a.club }}</a></td>
<td>{{ a.title }}</td>
<td>{{ a.content|markdown }}</td>
<td>
<a href="{{ url('com:weekmail_article_edit', article_id=a.id) }}">{% trans %}Edit{% endtrans %}</a> |
<a href="?del_article={{ a.id }}">{% trans %}Delete from weekmail{% endtrans %}</a> |
<a href="?up_article={{ a.id }}">{% trans %}Up{% endtrans %}</a> |
<a href="?down_article={{ a.id }}">{% trans %}Down{% endtrans %}</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<form action="" method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p() }}