mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-16 19:23:27 +00:00
81 lines
3.7 KiB
Django/Jinja
81 lines
3.7 KiB
Django/Jinja
{% extends "core/base.jinja" %}
|
|
{% from 'core/macros.jinja' import user_profile_link %}
|
|
|
|
{% block title %}
|
|
{% trans %}News admin{% endtrans %}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<h3>{% trans %}News{% endtrans %}</h3>
|
|
<h4>{% trans %}Displayed news{% endtrans %}</h4>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<td>{% trans %}Type{% endtrans %}</td>
|
|
<td>{% trans %}Title{% endtrans %}</td>
|
|
<td>{% trans %}Summary{% endtrans %}</td>
|
|
<td>{% trans %}Club{% endtrans %}</td>
|
|
<td>{% trans %}Author{% endtrans %}</td>
|
|
<td>{% trans %}Moderator{% endtrans %}</td>
|
|
<td>{% trans %}Start{% endtrans %}</td>
|
|
<td>{% trans %}End{% endtrans %}</td>
|
|
<td>{% trans %}Actions{% endtrans %}</td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for news in object_list.filter(is_moderated=True) %}
|
|
<tr>
|
|
<td>{{ news.get_type_display() }}</td>
|
|
<td>{{ news.title }}</td>
|
|
<td>{{ news.summary|markdown }}</td>
|
|
<td><a href="{{ news.club.get_absolute_url() }}">{{ news.club }}</a></td>
|
|
<td>{{ user_profile_link(news.author) }}</td>
|
|
<td>{{ user_profile_link(news.moderator) }}</td>
|
|
<td>{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }}
|
|
{{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}</td>
|
|
<td>{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }}
|
|
{{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</td>
|
|
<td><a href="{{ url('com:news_detail', news_id=news.id) }}">{% trans %}View{% endtrans %}</a>
|
|
<a href="{{ url('com:news_edit', news_id=news.id) }}">{% trans %}Edit{% endtrans %}</a> </td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
<h4>{% trans %}News to moderate{% endtrans %}</h4>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<td>{% trans %}Type{% endtrans %}</td>
|
|
<td>{% trans %}Title{% endtrans %}</td>
|
|
<td>{% trans %}Summary{% endtrans %}</td>
|
|
<td>{% trans %}Club{% endtrans %}</td>
|
|
<td>{% trans %}Author{% endtrans %}</td>
|
|
<td>{% trans %}Start{% endtrans %}</td>
|
|
<td>{% trans %}End{% endtrans %}</td>
|
|
<td>{% trans %}Actions{% endtrans %}</td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for news in object_list.filter(is_moderated=False) %}
|
|
<tr>
|
|
<td>{{ news.get_type_display() }}</td>
|
|
<td>{{ news.title }}</td>
|
|
<td>{{ news.summary|markdown }}</td>
|
|
<td><a href="{{ news.club.get_absolute_url() }}">{{ news.club }}</a></td>
|
|
<td>{{ user_profile_link(news.author) }}</td>
|
|
<td>{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }}
|
|
{{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}</td>
|
|
<td>{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }}
|
|
{{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</td>
|
|
<td><a href="{{ url('com:news_detail', news_id=news.id) }}">{% trans %}View{% endtrans %}</a>
|
|
<a href="{{ url('com:news_edit', news_id=news.id) }}">{% trans %}Edit{% endtrans %}</a>
|
|
<a href="{{ url('com:news_moderate', news_id=news.id) }}">{% trans %}Moderate{% endtrans %}</a></td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endblock %}
|
|
|
|
|
|
|