mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
introduce djhtml as jinja+scss formater
This commit is contained in:
committed by
Bartuccio Antoine
parent
13d0d2a300
commit
b25805e0a1
@ -1,43 +1,43 @@
|
||||
{% extends "core/base.jinja" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}Mailing lists administration{% endtrans %}
|
||||
{% trans %}Mailing lists administration{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% macro display_mailings(list) %}
|
||||
<table>
|
||||
<tr>
|
||||
<th>{% trans %}Email{% endtrans %}</th>
|
||||
<th>{% trans %}Club{%endtrans%}</th>
|
||||
<th>{% trans %}Actions{% endtrans %}</th>
|
||||
</tr>
|
||||
{% for mailing in list %}
|
||||
<tr>
|
||||
<td>{{ mailing.email_full }}</td>
|
||||
<td><a href="{{ url('club:mailing', club_id=mailing.club.id) }}">{{ mailing.club }}</a></td>
|
||||
<td>
|
||||
<a href="{{ url('com:mailing_delete', mailing_id=mailing.id) }}">{% trans %}Delete{% endtrans %}</a> - {% if not mailing.is_moderated %}<a href="{{ url('com:mailing_moderate', mailing_id=mailing.id) }}">{% trans %}Moderate{% endtrans %}</a>{% else %}{% trans user=mailing.moderator %}Moderated by {{ user }}{% endtrans %}{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>{% trans %}Email{% endtrans %}</th>
|
||||
<th>{% trans %}Club{%endtrans%}</th>
|
||||
<th>{% trans %}Actions{% endtrans %}</th>
|
||||
</tr>
|
||||
{% for mailing in list %}
|
||||
<tr>
|
||||
<td>{{ mailing.email_full }}</td>
|
||||
<td><a href="{{ url('club:mailing', club_id=mailing.club.id) }}">{{ mailing.club }}</a></td>
|
||||
<td>
|
||||
<a href="{{ url('com:mailing_delete', mailing_id=mailing.id) }}">{% trans %}Delete{% endtrans %}</a> - {% if not mailing.is_moderated %}<a href="{{ url('com:mailing_moderate', mailing_id=mailing.id) }}">{% trans %}Moderate{% endtrans %}</a>{% else %}{% trans user=mailing.moderator %}Moderated by {{ user }}{% endtrans %}{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
{% endmacro %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{% trans %}This page lists all mailing lists{% endtrans %}</h1>
|
||||
<h1>{% trans %}This page lists all mailing lists{% endtrans %}</h1>
|
||||
|
||||
{% if has_unmoderated %}
|
||||
{% if has_unmoderated %}
|
||||
<h2>{% trans %}Not moderated mailing lists{% endtrans %}</h2>
|
||||
{{ display_mailings(unmoderated) }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<h2>{% trans %}Moderated mailing lists{% endtrans %}</h2>
|
||||
{% if has_moderated %}
|
||||
{{ display_mailings(moderated) }}
|
||||
{% else %}
|
||||
<h2>{% trans %}Moderated mailing lists{% endtrans %}</h2>
|
||||
{% if has_moderated %}
|
||||
{{ display_mailings(moderated) }}
|
||||
{% else %}
|
||||
<p>{% trans %}No mailing list existing{% endtrans %}</p>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
@ -2,317 +2,317 @@
|
||||
{% from 'core/macros.jinja' import user_profile_link %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}News admin{% endtrans %}
|
||||
{% trans %}News admin{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h3>{% trans %}News{% endtrans %}</h3>
|
||||
<h3>{% trans %}News{% endtrans %}</h3>
|
||||
|
||||
<p><a href="{{ url('com:news_new') }}">{% trans %}Create news{% endtrans %}</a></p>
|
||||
<p><a href="{{ url('com:news_new') }}">{% trans %}Create news{% endtrans %}</a></p>
|
||||
|
||||
<hr />
|
||||
<h4>{% trans %}Notices{% endtrans %}</h4>
|
||||
{% set notices = object_list.filter(type="NOTICE").distinct().order_by('id') %}
|
||||
<h5>{% trans %}Displayed notices{% endtrans %}</h5>
|
||||
<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 %}Actions{% endtrans %}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for news in notices.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><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) }}?remove">{% trans %}Remove{% endtrans %}</a>
|
||||
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<h5>{% trans %}Notices to moderate{% endtrans %}</h5>
|
||||
<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 %}Actions{% endtrans %}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for news in notices.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><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>
|
||||
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<hr />
|
||||
<h4>{% trans %}Notices{% endtrans %}</h4>
|
||||
{% set notices = object_list.filter(type="NOTICE").distinct().order_by('id') %}
|
||||
<h5>{% trans %}Displayed notices{% endtrans %}</h5>
|
||||
<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 %}Actions{% endtrans %}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for news in notices.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><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) }}?remove">{% trans %}Remove{% endtrans %}</a>
|
||||
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<h5>{% trans %}Notices to moderate{% endtrans %}</h5>
|
||||
<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 %}Actions{% endtrans %}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for news in notices.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><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>
|
||||
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<hr />
|
||||
<h4>{% trans %}Weeklies{% endtrans %}</h4>
|
||||
{% set weeklies = object_list.filter(type="WEEKLY", dates__end_date__gte=timezone.now()).distinct().order_by('id') %}
|
||||
<h5>{% trans %}Displayed weeklies{% endtrans %}</h5>
|
||||
<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 %}Dates{% endtrans %}</td>
|
||||
<td>{% trans %}Actions{% endtrans %}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for news in weeklies.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>
|
||||
<ul>
|
||||
{% for d in news.dates.all() %}
|
||||
<li>{{ d.start_date|localtime|date(DATETIME_FORMAT) }}
|
||||
{{ d.start_date|localtime|time(DATETIME_FORMAT) }} -
|
||||
{{ d.end_date|localtime|date(DATETIME_FORMAT) }}
|
||||
{{ d.end_date|localtime|time(DATETIME_FORMAT) }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</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) }}?remove">{% trans %}Remove{% endtrans %}</a>
|
||||
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<h5>{% trans %}Weeklies to moderate{% endtrans %}</h5>
|
||||
<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 %}Dates{% endtrans %}</td>
|
||||
<td>{% trans %}Actions{% endtrans %}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for news in weeklies.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>
|
||||
<ul>
|
||||
{% for d in news.dates.all() %}
|
||||
<li>{{ d.start_date|localtime|date(DATETIME_FORMAT) }}
|
||||
{{ d.start_date|localtime|time(DATETIME_FORMAT) }} -
|
||||
{{ d.end_date|localtime|date(DATETIME_FORMAT) }}
|
||||
{{ d.end_date|localtime|time(DATETIME_FORMAT) }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</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>
|
||||
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<hr />
|
||||
<h4>{% trans %}Weeklies{% endtrans %}</h4>
|
||||
{% set weeklies = object_list.filter(type="WEEKLY", dates__end_date__gte=timezone.now()).distinct().order_by('id') %}
|
||||
<h5>{% trans %}Displayed weeklies{% endtrans %}</h5>
|
||||
<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 %}Dates{% endtrans %}</td>
|
||||
<td>{% trans %}Actions{% endtrans %}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for news in weeklies.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>
|
||||
<ul>
|
||||
{% for d in news.dates.all() %}
|
||||
<li>{{ d.start_date|localtime|date(DATETIME_FORMAT) }}
|
||||
{{ d.start_date|localtime|time(DATETIME_FORMAT) }} -
|
||||
{{ d.end_date|localtime|date(DATETIME_FORMAT) }}
|
||||
{{ d.end_date|localtime|time(DATETIME_FORMAT) }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</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) }}?remove">{% trans %}Remove{% endtrans %}</a>
|
||||
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<h5>{% trans %}Weeklies to moderate{% endtrans %}</h5>
|
||||
<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 %}Dates{% endtrans %}</td>
|
||||
<td>{% trans %}Actions{% endtrans %}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for news in weeklies.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>
|
||||
<ul>
|
||||
{% for d in news.dates.all() %}
|
||||
<li>{{ d.start_date|localtime|date(DATETIME_FORMAT) }}
|
||||
{{ d.start_date|localtime|time(DATETIME_FORMAT) }} -
|
||||
{{ d.end_date|localtime|date(DATETIME_FORMAT) }}
|
||||
{{ d.end_date|localtime|time(DATETIME_FORMAT) }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</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>
|
||||
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<hr />
|
||||
<h4>{% trans %}Calls{% endtrans %}</h4>
|
||||
{% set calls = object_list.filter(type="CALL", dates__end_date__gte=timezone.now()).distinct().order_by('id') %}
|
||||
<h5>{% trans %}Displayed calls{% endtrans %}</h5>
|
||||
<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 calls.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>
|
||||
<a href="{{ url('com:news_moderate', news_id=news.id) }}?remove">{% trans %}Remove{% endtrans %}</a>
|
||||
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<h5>{% trans %}Calls to moderate{% endtrans %}</h5>
|
||||
<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 calls.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>
|
||||
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<hr />
|
||||
<h4>{% trans %}Calls{% endtrans %}</h4>
|
||||
{% set calls = object_list.filter(type="CALL", dates__end_date__gte=timezone.now()).distinct().order_by('id') %}
|
||||
<h5>{% trans %}Displayed calls{% endtrans %}</h5>
|
||||
<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 calls.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>
|
||||
<a href="{{ url('com:news_moderate', news_id=news.id) }}?remove">{% trans %}Remove{% endtrans %}</a>
|
||||
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<h5>{% trans %}Calls to moderate{% endtrans %}</h5>
|
||||
<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 calls.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>
|
||||
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<hr />
|
||||
<h4>{% trans %}Events{% endtrans %}</h4>
|
||||
{% set events = object_list.filter(type="EVENT", dates__end_date__gte=timezone.now()).distinct().order_by('id') %}
|
||||
<h5>{% trans %}Displayed events{% endtrans %}</h5>
|
||||
<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 events.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>
|
||||
<a href="{{ url('com:news_moderate', news_id=news.id) }}?remove">{% trans %}Remove{% endtrans %}</a>
|
||||
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<h5>{% trans %}Events to moderate{% endtrans %}</h5>
|
||||
<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 events.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>
|
||||
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<hr />
|
||||
<h4>{% trans %}Events{% endtrans %}</h4>
|
||||
{% set events = object_list.filter(type="EVENT", dates__end_date__gte=timezone.now()).distinct().order_by('id') %}
|
||||
<h5>{% trans %}Displayed events{% endtrans %}</h5>
|
||||
<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 events.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>
|
||||
<a href="{{ url('com:news_moderate', news_id=news.id) }}?remove">{% trans %}Remove{% endtrans %}</a>
|
||||
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<h5>{% trans %}Events to moderate{% endtrans %}</h5>
|
||||
<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 events.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>
|
||||
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
@ -2,48 +2,48 @@
|
||||
{% from 'core/macros.jinja' import user_profile_link, facebook_share, tweet, link_news_logo, gen_news_metatags %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}News{% endtrans %} -
|
||||
{{ object.title }}
|
||||
{% trans %}News{% endtrans %} -
|
||||
{{ object.title }}
|
||||
{% endblock %}
|
||||
|
||||
{% block head %}
|
||||
{{ super() }}
|
||||
{{ gen_news_metatags(news) }}
|
||||
{{ super() }}
|
||||
{{ gen_news_metatags(news) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<p><a href="{{ url('com:news_list') }}">{% trans %}Back to news{% endtrans %}</a></p>
|
||||
<section id="news_details">
|
||||
<div class="club_logo">
|
||||
<img src="{{ link_news_logo(news)}}" alt="{{ news.club }}" />
|
||||
<a href="{{ news.club.get_absolute_url() }}">{{ news.club }}</a>
|
||||
</div>
|
||||
<h4>{{ news.title }}</h4>
|
||||
<p class="date">
|
||||
<span>{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }}
|
||||
{{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}</span> -
|
||||
<span>{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }}
|
||||
{{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</span>
|
||||
</p>
|
||||
<div class="news_content">
|
||||
<div><em>{{ news.summary|markdown }}</em></div>
|
||||
<br/>
|
||||
<div>{{ news.content|markdown }}</div>
|
||||
{{ facebook_share(news) }}
|
||||
{{ tweet(news) }}
|
||||
<div class="news_meta">
|
||||
<p><a href="{{ url('com:news_list') }}">{% trans %}Back to news{% endtrans %}</a></p>
|
||||
<section id="news_details">
|
||||
<div class="club_logo">
|
||||
<img src="{{ link_news_logo(news)}}" alt="{{ news.club }}" />
|
||||
<a href="{{ news.club.get_absolute_url() }}">{{ news.club }}</a>
|
||||
</div>
|
||||
<h4>{{ news.title }}</h4>
|
||||
<p class="date">
|
||||
<span>{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }}
|
||||
{{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}</span> -
|
||||
<span>{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }}
|
||||
{{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</span>
|
||||
</p>
|
||||
<div class="news_content">
|
||||
<div><em>{{ news.summary|markdown }}</em></div>
|
||||
<br/>
|
||||
<div>{{ news.content|markdown }}</div>
|
||||
{{ facebook_share(news) }}
|
||||
{{ tweet(news) }}
|
||||
<div class="news_meta">
|
||||
<p>{% trans %}Author: {% endtrans %}{{ user_profile_link(news.author) }}</p>
|
||||
{% if news.moderator %}
|
||||
<p>{% trans %}Moderator: {% endtrans %}{{ user_profile_link(news.moderator) }}</p>
|
||||
<p>{% trans %}Moderator: {% endtrans %}{{ user_profile_link(news.moderator) }}</p>
|
||||
{% elif user.is_com_admin %}
|
||||
<p> <a href="{{ url('com:news_moderate', news_id=news.id) }}">{% trans %}Moderate{% endtrans %}</a></p>
|
||||
<p> <a href="{{ url('com:news_moderate', news_id=news.id) }}">{% trans %}Moderate{% endtrans %}</a></p>
|
||||
{% endif %}
|
||||
{% if user.can_edit(news) %}
|
||||
<p> <a href="{{ url('com:news_edit', news_id=news.id) }}">{% trans %}Edit (will be moderated again){% endtrans %}</a></p>
|
||||
<p> <a href="{{ url('com:news_edit', news_id=news.id) }}">{% trans %}Edit (will be moderated again){% endtrans %}</a></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
@ -2,46 +2,46 @@
|
||||
{% from 'core/macros.jinja' import user_profile_link %}
|
||||
|
||||
{% block title %}
|
||||
{% if object %}
|
||||
{% trans %}Edit news{% endtrans %}
|
||||
{% else %}
|
||||
{% trans %}Create news{% endtrans %}
|
||||
{% endif %}
|
||||
{% if object %}
|
||||
{% trans %}Edit news{% endtrans %}
|
||||
{% else %}
|
||||
{% trans %}Create news{% endtrans %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if 'preview' in request.POST.keys() %}
|
||||
<section class="news_event">
|
||||
<h4>{{ form.instance.title }}</h4>
|
||||
<p class="date">
|
||||
{% if 'preview' in request.POST.keys() %}
|
||||
<section class="news_event">
|
||||
<h4>{{ form.instance.title }}</h4>
|
||||
<p class="date">
|
||||
<span>{{ form.instance.dates.first().start_date|localtime|date(DATETIME_FORMAT) }}
|
||||
{{ form.instance.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}</span> -
|
||||
{{ form.instance.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}</span> -
|
||||
<span>{{ form.instance.dates.first().end_date|localtime|date(DATETIME_FORMAT) }}
|
||||
{{ form.instance.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</span>
|
||||
</p>
|
||||
<p><a href="#">{{ form.instance.club or "Club" }}</a></p>
|
||||
<div>{{ form.instance.summary|markdown }}</div>
|
||||
<div>{{ form.instance.content|markdown }}</div>
|
||||
<p>{% trans %}Author: {% endtrans %} {{ user_profile_link(form.instance.author) }}</p>
|
||||
</section>
|
||||
{% endif %}
|
||||
{% if object %}
|
||||
<h2>{% trans %}Edit news{% endtrans %}</h2>
|
||||
{% else %}
|
||||
<h2>{% trans %}Create news{% endtrans %}</h2>
|
||||
{% endif %}
|
||||
<form action="" method="post">
|
||||
{{ form.instance.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</span>
|
||||
</p>
|
||||
<p><a href="#">{{ form.instance.club or "Club" }}</a></p>
|
||||
<div>{{ form.instance.summary|markdown }}</div>
|
||||
<div>{{ form.instance.content|markdown }}</div>
|
||||
<p>{% trans %}Author: {% endtrans %} {{ user_profile_link(form.instance.author) }}</p>
|
||||
</section>
|
||||
{% endif %}
|
||||
{% if object %}
|
||||
<h2>{% trans %}Edit news{% endtrans %}</h2>
|
||||
{% else %}
|
||||
<h2>{% trans %}Create news{% endtrans %}</h2>
|
||||
{% endif %}
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.non_field_errors() }}
|
||||
{{ form.author }}
|
||||
<p>{{ form.type.errors }}<label for="{{ form.type.name }}">{{ form.type.label }}</label>
|
||||
<ul>
|
||||
<ul>
|
||||
<li>{% trans %}Notice: Information, election result - no date{% endtrans %}</li>
|
||||
<li>{% trans %}Event: punctual event, associated with one date{% endtrans %}</li>
|
||||
<li>{% trans %}Weekly: recurrent event, associated with many dates (specify the first one, and a deadline){% endtrans %}</li>
|
||||
<li>{% trans %}Call: long time event, associated with a long date (election appliance, ...){% endtrans %}</li>
|
||||
</ul>
|
||||
{{ form.type }}</p>
|
||||
</ul>
|
||||
{{ form.type }}</p>
|
||||
<p class="date">{{ form.start_date.errors }}<label for="{{ form.start_date.name }}">{{ form.start_date.label }}</label> {{ form.start_date }}</p>
|
||||
<p class="date">{{ form.end_date.errors }}<label for="{{ form.end_date.name }}">{{ form.end_date.label }}</label> {{ form.end_date }}</p>
|
||||
<p class="until">{{ form.until.errors }}<label for="{{ form.until.name }}">{{ form.until.label }}</label> {{ form.until }}</p>
|
||||
@ -50,38 +50,38 @@
|
||||
<p>{{ form.summary.errors }}<label for="{{ form.summary.name }}">{{ form.summary.label }}</label> {{ form.summary }}</p>
|
||||
<p>{{ form.content.errors }}<label for="{{ form.content.name }}">{{ form.content.label }}</label> {{ form.content }}</p>
|
||||
{% if user.is_com_admin %}
|
||||
<p>{{ form.automoderation.errors }}<label for="{{ form.automoderation.name }}">{{ form.automoderation.label }}</label>
|
||||
<p>{{ form.automoderation.errors }}<label for="{{ form.automoderation.name }}">{{ form.automoderation.label }}</label>
|
||||
{{ form.automoderation }}</p>
|
||||
{% endif %}
|
||||
<p><input type="submit" name="preview" value="{% trans %}Preview{% endtrans %}" /></p>
|
||||
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
||||
</form>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
{% block script %}
|
||||
{{ super() }}
|
||||
<script>
|
||||
$( function() {
|
||||
var type = $('input[name=type]');
|
||||
var dates = $('.date');
|
||||
var until = $('.until');
|
||||
function update_targets () {
|
||||
type_checked = $('input[name=type]:checked');
|
||||
if (type_checked.val() == "EVENT" || type_checked.val() == "CALL") {
|
||||
dates.show();
|
||||
until.hide();
|
||||
} else if (type_checked.val() == "WEEKLY") {
|
||||
dates.show();
|
||||
until.show();
|
||||
} else {
|
||||
dates.hide();
|
||||
until.hide();
|
||||
}
|
||||
{{ super() }}
|
||||
<script>
|
||||
$( function() {
|
||||
var type = $('input[name=type]');
|
||||
var dates = $('.date');
|
||||
var until = $('.until');
|
||||
function update_targets () {
|
||||
type_checked = $('input[name=type]:checked');
|
||||
if (type_checked.val() == "EVENT" || type_checked.val() == "CALL") {
|
||||
dates.show();
|
||||
until.hide();
|
||||
} else if (type_checked.val() == "WEEKLY") {
|
||||
dates.show();
|
||||
until.show();
|
||||
} else {
|
||||
dates.hide();
|
||||
until.hide();
|
||||
}
|
||||
update_targets();
|
||||
type.change(update_targets);
|
||||
} );
|
||||
</script>
|
||||
}
|
||||
update_targets();
|
||||
type.change(update_targets);
|
||||
} );
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
@ -2,162 +2,162 @@
|
||||
{% from 'core/macros.jinja' import tweet_quick, fb_quick %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}News{% endtrans %}
|
||||
{% trans %}News{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if user.is_com_admin %}
|
||||
<div id="news_admin">
|
||||
<a class="button" href="{{ url('com:news_admin_list') }}">{% trans %}Administrate news{% endtrans %}</a>
|
||||
</div>
|
||||
<br>
|
||||
{% endif %}
|
||||
{% if user.is_com_admin %}
|
||||
<div id="news_admin">
|
||||
<a class="button" href="{{ url('com:news_admin_list') }}">{% trans %}Administrate news{% endtrans %}</a>
|
||||
</div>
|
||||
<br>
|
||||
{% endif %}
|
||||
|
||||
<div id="news">
|
||||
<div id="news">
|
||||
<div id="left_column" class="news_column">
|
||||
{% for news in object_list.filter(type="NOTICE") %}
|
||||
<section class="news_notice">
|
||||
<h4><a href="{{ url('com:news_detail', news_id=news.id) }}">{{ news.title }}</a></h4>
|
||||
<div class="news_content">{{ news.summary|markdown }}</div>
|
||||
</section>
|
||||
{% endfor %}
|
||||
{% for news in object_list.filter(type="NOTICE") %}
|
||||
<section class="news_notice">
|
||||
<h4><a href="{{ url('com:news_detail', news_id=news.id) }}">{{ news.title }}</a></h4>
|
||||
<div class="news_content">{{ news.summary|markdown }}</div>
|
||||
</section>
|
||||
{% endfor %}
|
||||
|
||||
{% for news in object_list.filter(dates__start_date__lte=timezone.now(), dates__end_date__gte=timezone.now(), type="CALL") %}
|
||||
<section class="news_call">
|
||||
{% for news in object_list.filter(dates__start_date__lte=timezone.now(), dates__end_date__gte=timezone.now(), type="CALL") %}
|
||||
<section class="news_call">
|
||||
<h4> <a href="{{ url('com:news_detail', news_id=news.id) }}">{{ news.title }}</a></h4>
|
||||
<div class="news_date">
|
||||
<span>{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }}
|
||||
{{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}</span> -
|
||||
<span>{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }}
|
||||
{{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</span>
|
||||
</div>
|
||||
<div class="news_content">{{ news.summary|markdown }}</div>
|
||||
</section>
|
||||
{% endfor %}
|
||||
|
||||
{% set events_dates = NewsDate.objects.filter(end_date__gte=timezone.now(), start_date__lte=timezone.now()+timedelta(days=5), news__type="EVENT", news__is_moderated=True).datetimes('start_date', 'day') %}
|
||||
<h3>{% trans %}Events today and the next few days{% endtrans %}</h3>
|
||||
{% if events_dates %}
|
||||
{% for d in events_dates %}
|
||||
<div class="news_events_group">
|
||||
<div class="news_events_group_date">
|
||||
<div>
|
||||
<div>{{ d|localtime|date('D') }}</div>
|
||||
<div class="day">{{ d|localtime|date('d') }}</div>
|
||||
<div>{{ d|localtime|date('b') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_events_group_items">
|
||||
{% for news in object_list.filter(dates__start_date__gte=d,
|
||||
dates__start_date__lte=d+timedelta(days=1),
|
||||
type="EVENT").exclude(dates__end_date__lt=timezone.now())
|
||||
.order_by('dates__start_date') %}
|
||||
<section class="news_event">
|
||||
<div class="club_logo">
|
||||
{% if news.club.logo %}
|
||||
<img src="{{ news.club.logo.url }}" alt="{{ news.club }}" />
|
||||
{% else %}
|
||||
<img src="{{ static("com/img/news.png") }}" alt="{{ news.club }}" />
|
||||
{% endif %}
|
||||
</div>
|
||||
<h4> <a href="{{ url('com:news_detail', news_id=news.id) }}">{{ news.title }}</a></h4>
|
||||
<div><a href="{{ news.club.get_absolute_url() }}">{{ news.club }}</a></div>
|
||||
<div class="news_date">
|
||||
<span>{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }}
|
||||
{{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}</span> -
|
||||
<span>{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }}
|
||||
{{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</span>
|
||||
<span>{{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}</span> -
|
||||
<span>{{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</span>
|
||||
</div>
|
||||
<div class="news_content">{{ news.summary|markdown }}</div>
|
||||
</section>
|
||||
<div class="news_content">{{ news.summary|markdown }}
|
||||
<div class="button_bar">
|
||||
{{ fb_quick(news) }}
|
||||
{{ tweet_quick(news) }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endfor %}
|
||||
|
||||
{% set events_dates = NewsDate.objects.filter(end_date__gte=timezone.now(), start_date__lte=timezone.now()+timedelta(days=5), news__type="EVENT", news__is_moderated=True).datetimes('start_date', 'day') %}
|
||||
<h3>{% trans %}Events today and the next few days{% endtrans %}</h3>
|
||||
{% if events_dates %}
|
||||
{% for d in events_dates %}
|
||||
<div class="news_events_group">
|
||||
<div class="news_events_group_date">
|
||||
<div>
|
||||
<div>{{ d|localtime|date('D') }}</div>
|
||||
<div class="day">{{ d|localtime|date('d') }}</div>
|
||||
<div>{{ d|localtime|date('b') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_events_group_items">
|
||||
{% for news in object_list.filter(dates__start_date__gte=d,
|
||||
dates__start_date__lte=d+timedelta(days=1),
|
||||
type="EVENT").exclude(dates__end_date__lt=timezone.now())
|
||||
.order_by('dates__start_date') %}
|
||||
<section class="news_event">
|
||||
<div class="club_logo">
|
||||
{% if news.club.logo %}
|
||||
<img src="{{ news.club.logo.url }}" alt="{{ news.club }}" />
|
||||
{% else %}
|
||||
<img src="{{ static("com/img/news.png") }}" alt="{{ news.club }}" />
|
||||
{% endif %}
|
||||
</div>
|
||||
<h4> <a href="{{ url('com:news_detail', news_id=news.id) }}">{{ news.title }}</a></h4>
|
||||
<div><a href="{{ news.club.get_absolute_url() }}">{{ news.club }}</a></div>
|
||||
<div class="news_date">
|
||||
<span>{{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}</span> -
|
||||
<span>{{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</span>
|
||||
</div>
|
||||
<div class="news_content">{{ news.summary|markdown }}
|
||||
<div class="button_bar">
|
||||
{{ fb_quick(news) }}
|
||||
{{ tweet_quick(news) }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div class="news_empty">
|
||||
<em>{% trans %}Nothing to come...{% endtrans %}</em>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% set coming_soon = object_list.filter(dates__start_date__gte=timezone.now()+timedelta(days=5),
|
||||
type="EVENT").order_by('dates__start_date') %}
|
||||
{% if coming_soon %}
|
||||
<h3>{% trans %}Coming soon... don't miss!{% endtrans %}</h3>
|
||||
{% for news in coming_soon %}
|
||||
<section class="news_coming_soon">
|
||||
<a href="{{ url('com:news_detail', news_id=news.id) }}">{{ news.title }}</a>
|
||||
<span class="news_date">{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }}
|
||||
{{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }} -
|
||||
{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }}
|
||||
{{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</span>
|
||||
</section>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
<h3>{% trans %}All coming events{% endtrans %}</h3>
|
||||
<iframe
|
||||
src="https://embed.styledcalendar.com/#2mF2is8CEXhr4ADcX6qN"
|
||||
title="Styled Calendar"
|
||||
class="styled-calendar-container"
|
||||
style="width: 100%; border: none; height: 1060px"
|
||||
data-cy="calendar-embed-iframe">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div id="right_column" class="news_column">
|
||||
<div id="agenda">
|
||||
<div id="agenda_title">{% trans %}Agenda{% endtrans %}</div>
|
||||
<div id="agenda_content">
|
||||
{% for d in NewsDate.objects.filter(end_date__gte=timezone.now(),
|
||||
news__is_moderated=True, news__type__in=["WEEKLY",
|
||||
"EVENT"]).order_by('start_date', 'end_date') %}
|
||||
<div class="agenda_item">
|
||||
<div class="agenda_date">
|
||||
<strong>{{ d.start_date|localtime|date('D d M Y') }}</strong>
|
||||
</div>
|
||||
<div class="agenda_time">
|
||||
<span>{{ d.start_date|localtime|time(DATETIME_FORMAT) }}</span> -
|
||||
<span>{{ d.end_date|localtime|time(DATETIME_FORMAT) }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<strong><a href="{{ url('com:news_detail', news_id=d.news.id) }}">{{ d.news.title }}</a></strong>
|
||||
<a href="{{ d.news.club.get_absolute_url() }}">{{ d.news.club }}</a>
|
||||
</div>
|
||||
<div class="agenda_item_content">{{ d.news.summary|markdown }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div class="news_empty">
|
||||
<em>{% trans %}Nothing to come...{% endtrans %}</em>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div id="birthdays">
|
||||
<div id="birthdays_title">{% trans %}Birthdays{% endtrans %}</div>
|
||||
<div id="birthdays_content">
|
||||
{% if user.is_subscribed %}
|
||||
{% set coming_soon = object_list.filter(dates__start_date__gte=timezone.now()+timedelta(days=5),
|
||||
type="EVENT").order_by('dates__start_date') %}
|
||||
{% if coming_soon %}
|
||||
<h3>{% trans %}Coming soon... don't miss!{% endtrans %}</h3>
|
||||
{% for news in coming_soon %}
|
||||
<section class="news_coming_soon">
|
||||
<a href="{{ url('com:news_detail', news_id=news.id) }}">{{ news.title }}</a>
|
||||
<span class="news_date">{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }}
|
||||
{{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }} -
|
||||
{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }}
|
||||
{{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</span>
|
||||
</section>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
<h3>{% trans %}All coming events{% endtrans %}</h3>
|
||||
<iframe
|
||||
src="https://embed.styledcalendar.com/#2mF2is8CEXhr4ADcX6qN"
|
||||
title="Styled Calendar"
|
||||
class="styled-calendar-container"
|
||||
style="width: 100%; border: none; height: 1060px"
|
||||
data-cy="calendar-embed-iframe">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div id="right_column" class="news_column">
|
||||
<div id="agenda">
|
||||
<div id="agenda_title">{% trans %}Agenda{% endtrans %}</div>
|
||||
<div id="agenda_content">
|
||||
{% for d in NewsDate.objects.filter(end_date__gte=timezone.now(),
|
||||
news__is_moderated=True, news__type__in=["WEEKLY",
|
||||
"EVENT"]).order_by('start_date', 'end_date') %}
|
||||
<div class="agenda_item">
|
||||
<div class="agenda_date">
|
||||
<strong>{{ d.start_date|localtime|date('D d M Y') }}</strong>
|
||||
</div>
|
||||
<div class="agenda_time">
|
||||
<span>{{ d.start_date|localtime|time(DATETIME_FORMAT) }}</span> -
|
||||
<span>{{ d.end_date|localtime|time(DATETIME_FORMAT) }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<strong><a href="{{ url('com:news_detail', news_id=d.news.id) }}">{{ d.news.title }}</a></strong>
|
||||
<a href="{{ d.news.club.get_absolute_url() }}">{{ d.news.club }}</a>
|
||||
</div>
|
||||
<div class="agenda_item_content">{{ d.news.summary|markdown }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="birthdays">
|
||||
<div id="birthdays_title">{% trans %}Birthdays{% endtrans %}</div>
|
||||
<div id="birthdays_content">
|
||||
{% if user.is_subscribed %}
|
||||
{# Cache request for 1 hour #}
|
||||
{% cache 3600 "birthdays" %}
|
||||
<ul class="birthdays_year">
|
||||
{% for d in birthdays.dates('date_of_birth', 'year', 'DESC') %}
|
||||
<li>
|
||||
{% trans age=timezone.now().year - d.year %}{{ age }} year old{% endtrans %}
|
||||
<ul>
|
||||
{% for u in birthdays.filter(date_of_birth__year=d.year) %}
|
||||
<li><a href="{{ u.get_absolute_url() }}">{{ u.get_short_name() }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endcache %}
|
||||
{% else %}
|
||||
<p>{% trans %}You need an up to date subscription to access this content{% endtrans %}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% cache 3600 "birthdays" %}
|
||||
<ul class="birthdays_year">
|
||||
{% for d in birthdays.dates('date_of_birth', 'year', 'DESC') %}
|
||||
<li>
|
||||
{% trans age=timezone.now().year - d.year %}{{ age }} year old{% endtrans %}
|
||||
<ul>
|
||||
{% for u in birthdays.filter(date_of_birth__year=d.year) %}
|
||||
<li><a href="{{ u.get_absolute_url() }}">{{ u.get_short_name() }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endcache %}
|
||||
{% else %}
|
||||
<p>{% trans %}You need an up to date subscription to access this content{% endtrans %}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -1,42 +1,42 @@
|
||||
{% extends "core/base.jinja" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}Poster{% endtrans %}
|
||||
{% trans %}Poster{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="poster_edit">
|
||||
<div id="poster_edit">
|
||||
|
||||
<div id="title">
|
||||
<div id="links" class="left">
|
||||
{% if app == "com" %}
|
||||
<a id="list" class="link" href="{{ url(app + ":poster_list") }}">{% trans %}List{% endtrans %}</a>
|
||||
{% elif app == "club" %}
|
||||
<a id="list" class="link" href="{{ url(app + ":poster_list", club.id) }}">{% trans %}List{% endtrans %}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<h3>{% trans %}Posters - edit{% endtrans %}</h3>
|
||||
<div id="links" class="right">
|
||||
{% if app == "com" %}
|
||||
<a class="link delete" href="{{ url(app + ":poster_delete", poster.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||
{% elif app == "club" %}
|
||||
<a class="link delete" href="{{ url(app + ":poster_delete", club.id, poster.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div id="links" class="left">
|
||||
{% if app == "com" %}
|
||||
<a id="list" class="link" href="{{ url(app + ":poster_list") }}">{% trans %}List{% endtrans %}</a>
|
||||
{% elif app == "club" %}
|
||||
<a id="list" class="link" href="{{ url(app + ":poster_list", club.id) }}">{% trans %}List{% endtrans %}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<h3>{% trans %}Posters - edit{% endtrans %}</h3>
|
||||
<div id="links" class="right">
|
||||
{% if app == "com" %}
|
||||
<a class="link delete" href="{{ url(app + ":poster_delete", poster.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||
{% elif app == "club" %}
|
||||
<a class="link delete" href="{{ url(app + ":poster_delete", club.id, poster.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="poster">
|
||||
|
||||
<form action="" method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p() }}
|
||||
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
||||
</form>
|
||||
<form action="" method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p() }}
|
||||
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
@ -1,66 +1,66 @@
|
||||
{% extends "core/base.jinja" %}
|
||||
|
||||
{% block script %}
|
||||
{{ super() }}
|
||||
<script src="{{ static('com/js/poster_list.js') }}"></script>
|
||||
{{ super() }}
|
||||
<script src="{{ static('com/js/poster_list.js') }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block title %}
|
||||
{% trans %}Poster{% endtrans %}
|
||||
{% trans %}Poster{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="poster_list">
|
||||
<div id="poster_list">
|
||||
|
||||
<div id="title">
|
||||
<h3>{% trans %}Posters{% endtrans %}</h3>
|
||||
<div id="links" class="right">
|
||||
{% if app == "com" %}
|
||||
<a id="create" class="link" href="{{ url(app + ":poster_create") }}">{% trans %}Create{% endtrans %}</a>
|
||||
<a id="moderation" class="link" href="{{ url("com:poster_moderate_list") }}">{% trans %}Moderation{% endtrans %}</a>
|
||||
{% elif app == "club" %}
|
||||
<a id="create" class="link" href="{{ url(app + ":poster_create", club.id) }}">{% trans %}Create{% endtrans %}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<h3>{% trans %}Posters{% endtrans %}</h3>
|
||||
<div id="links" class="right">
|
||||
{% if app == "com" %}
|
||||
<a id="create" class="link" href="{{ url(app + ":poster_create") }}">{% trans %}Create{% endtrans %}</a>
|
||||
<a id="moderation" class="link" href="{{ url("com:poster_moderate_list") }}">{% trans %}Moderation{% endtrans %}</a>
|
||||
{% elif app == "club" %}
|
||||
<a id="create" class="link" href="{{ url(app + ":poster_create", club.id) }}">{% trans %}Create{% endtrans %}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="posters">
|
||||
|
||||
{% if poster_list.count() == 0 %}
|
||||
<div id="no-posters">{% trans %}No posters{% endtrans %}</div>
|
||||
{% else %}
|
||||
{% if poster_list.count() == 0 %}
|
||||
<div id="no-posters">{% trans %}No posters{% endtrans %}</div>
|
||||
{% else %}
|
||||
|
||||
{% for poster in poster_list %}
|
||||
<div class="poster{% if not poster.is_moderated %} not_moderated{% endif %}">
|
||||
<div class="name">{{ poster.name }}</div>
|
||||
<div class="image"><img src="{{ poster.file.url }}"></img></div>
|
||||
<div class="dates">
|
||||
<div class="begin">{{ poster.date_begin | localtime | date("d/M/Y H:m") }}</div>
|
||||
<div class="end">{{ poster.date_end | localtime | date("d/M/Y H:m") }}</div>
|
||||
</div>
|
||||
{% if app == "com" %}
|
||||
<a class="edit" href="{{ url(app + ":poster_edit", poster.id) }}">{% trans %}Edit{% endtrans %}</a>
|
||||
{% elif app == "club" %}
|
||||
<a class="edit" href="{{ url(app + ":poster_edit", club.id, poster.id) }}">{% trans %}Edit{% endtrans %}</a>
|
||||
{% endif %}
|
||||
<div class="tooltip">
|
||||
<ul>
|
||||
{% for screen in poster.screens.all() %}
|
||||
<li>{{ screen }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% for poster in poster_list %}
|
||||
<div class="poster{% if not poster.is_moderated %} not_moderated{% endif %}">
|
||||
<div class="name">{{ poster.name }}</div>
|
||||
<div class="image"><img src="{{ poster.file.url }}"></img></div>
|
||||
<div class="dates">
|
||||
<div class="begin">{{ poster.date_begin | localtime | date("d/M/Y H:m") }}</div>
|
||||
<div class="end">{{ poster.date_end | localtime | date("d/M/Y H:m") }}</div>
|
||||
</div>
|
||||
{% if app == "com" %}
|
||||
<a class="edit" href="{{ url(app + ":poster_edit", poster.id) }}">{% trans %}Edit{% endtrans %}</a>
|
||||
{% elif app == "club" %}
|
||||
<a class="edit" href="{{ url(app + ":poster_edit", club.id, poster.id) }}">{% trans %}Edit{% endtrans %}</a>
|
||||
{% endif %}
|
||||
<div class="tooltip">
|
||||
<ul>
|
||||
{% for screen in poster.screens.all() %}
|
||||
<li>{{ screen }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
<div id="view"><div id="placeholder"></div></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
@ -1,39 +1,39 @@
|
||||
{% extends "core/base.jinja" %}
|
||||
|
||||
{% block script %}
|
||||
{{ super() }}
|
||||
<script src="{{ static('com/js/poster_list.js') }}"></script>
|
||||
{{ super() }}
|
||||
<script src="{{ static('com/js/poster_list.js') }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="poster_list">
|
||||
<div id="poster_list">
|
||||
|
||||
<div id="title">
|
||||
<div id="links" class="left">
|
||||
<a id="list" class="link" href="{{ url("com:poster_list") }}">{% trans %}List{% endtrans %}</a>
|
||||
</div>
|
||||
<h3>{% trans %}Posters - moderation{% endtrans %}</h3>
|
||||
<div id="links" class="left">
|
||||
<a id="list" class="link" href="{{ url("com:poster_list") }}">{% trans %}List{% endtrans %}</a>
|
||||
</div>
|
||||
<h3>{% trans %}Posters - moderation{% endtrans %}</h3>
|
||||
</div>
|
||||
|
||||
<div id="posters">
|
||||
|
||||
{% if object_list.count == 0 %}
|
||||
<div id="no-posters">{% trans %}No objects{% endtrans %}</div>
|
||||
{% else %}
|
||||
{% if object_list.count == 0 %}
|
||||
<div id="no-posters">{% trans %}No objects{% endtrans %}</div>
|
||||
{% else %}
|
||||
|
||||
{% for poster in object_list %}
|
||||
<div class="poster{% if not poster.is_moderated %} not_moderated{% endif %}">
|
||||
<div class="name"> {{ poster.name }} </div>
|
||||
<div class="image"> <img src="{{ poster.file.url }}"></img> </div>
|
||||
<a class="moderate" href="{{ url("com:poster_moderate", object_id=poster.id) }}">Moderate</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% for poster in object_list %}
|
||||
<div class="poster{% if not poster.is_moderated %} not_moderated{% endif %}">
|
||||
<div class="name"> {{ poster.name }} </div>
|
||||
<div class="image"> <img src="{{ poster.file.url }}"></img> </div>
|
||||
<a class="moderate" href="{{ url("com:poster_moderate", object_id=poster.id) }}">Moderate</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
<div id="view"><div id="placeholder"></div></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -1,33 +1,33 @@
|
||||
{% extends "core/base.jinja" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}Screen{% endtrans %}
|
||||
{% trans %}Screen{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="screen_edit">
|
||||
<div id="screen_edit">
|
||||
|
||||
<div id="title">
|
||||
<div id="links" class="left">
|
||||
<a id="list" class="link" href="{{ url("com:screen_list") }}">{% trans %}List{% endtrans %}</a>
|
||||
</div>
|
||||
<h3>{% trans %}Screen - edit{% endtrans %}</h3>
|
||||
<div id="links" class="right">
|
||||
<a class="link delete" href="{{ url("com:screen_delete", screen.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||
</div>
|
||||
<div id="links" class="left">
|
||||
<a id="list" class="link" href="{{ url("com:screen_list") }}">{% trans %}List{% endtrans %}</a>
|
||||
</div>
|
||||
<h3>{% trans %}Screen - edit{% endtrans %}</h3>
|
||||
<div id="links" class="right">
|
||||
<a class="link delete" href="{{ url("com:screen_delete", screen.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="screen">
|
||||
|
||||
<form action="" method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p() }}
|
||||
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
||||
</form>
|
||||
<form action="" method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p() }}
|
||||
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
@ -1,38 +1,38 @@
|
||||
{% extends "core/base.jinja" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}Screens{% endtrans %}
|
||||
{% trans %}Screens{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="screen_list">
|
||||
<div id="screen_list">
|
||||
|
||||
<div id="title">
|
||||
<h3>{% trans %}Screens{% endtrans %}</h3>
|
||||
<div id="links" class="right">
|
||||
<a id="create" class="link" href="{{ url("com:screen_create") }}">{% trans %}Create{% endtrans %}</a>
|
||||
</div>
|
||||
<h3>{% trans %}Screens{% endtrans %}</h3>
|
||||
<div id="links" class="right">
|
||||
<a id="create" class="link" href="{{ url("com:screen_create") }}">{% trans %}Create{% endtrans %}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="screens">
|
||||
|
||||
{% if screen_list.count() == 0 %}
|
||||
<div id="no-screens">{% trans %}No screens{% endtrans %}</div>
|
||||
{% else %}
|
||||
{% if screen_list.count() == 0 %}
|
||||
<div id="no-screens">{% trans %}No screens{% endtrans %}</div>
|
||||
{% else %}
|
||||
|
||||
{% for screen in screen_list %}
|
||||
<div class="screen">
|
||||
<div class="name">{{ screen.name }}</div>
|
||||
<a class="edit" href="{{ url("com:screen_edit", screen.id) }}">{% trans %}Edit{% endtrans %}</a>
|
||||
<a class="slideshow" href="{{ url("com:screen_slideshow", screen.id) }}" target="_blank">{% trans %}Slideshow{% endtrans %}</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% for screen in screen_list %}
|
||||
<div class="screen">
|
||||
<div class="name">{{ screen.name }}</div>
|
||||
<a class="edit" href="{{ url("com:screen_edit", screen.id) }}">{% trans %}Edit{% endtrans %}</a>
|
||||
<a class="slideshow" href="{{ url("com:screen_slideshow", screen.id) }}" target="_blank">{% trans %}Slideshow{% endtrans %}</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
@ -1,30 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<head>
|
||||
<title>{% trans %}Slideshow{% endtrans %}</title>
|
||||
<link href="{{ scss('com/slideshow.scss') }}" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
</head>
|
||||
<body>
|
||||
<div id="slideshow">
|
||||
|
||||
<div id="slides">
|
||||
<div id="slides">
|
||||
{% for poster in posters %}
|
||||
<div class="slide {% if loop.first %}center{% else %}right{% endif %}" display_time="{{ poster.display_time }}">
|
||||
<img src="{{ poster.file.url }}"></img>
|
||||
</div>
|
||||
<div class="slide {% if loop.first %}center{% else %}right{% endif %}" display_time="{{ poster.display_time }}">
|
||||
<img src="{{ poster.file.url }}"></img>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="progress_bullets">
|
||||
<div id="progress_bullets">
|
||||
{% for poster in posters %}
|
||||
<div class="bullet {% if loop.first %}active{% endif %}"></div>
|
||||
<div class="bullet {% if loop.first %}active{% endif %}"></div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="progress_bar"></div>
|
||||
<div id="progress_bar"></div>
|
||||
|
||||
</div>
|
||||
<script src="{{ static('core/js/jquery-3.6.2.min.js') }}"></script>
|
||||
<script src="{{ static('com/js/slideshow.js') }}"></script>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -2,77 +2,77 @@
|
||||
{% from 'core/macros.jinja' import user_profile_link %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}Weekmail{% endtrans %}
|
||||
{% trans %}Weekmail{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<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>
|
||||
<p><a href="{{ url('com:weekmail_article') }}">{% trans %}New article{% endtrans %}</a></p>
|
||||
<h4>{% trans %}Articles in no weekmail yet{% endtrans %}</h4>
|
||||
<table>
|
||||
<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>
|
||||
<p><a href="{{ url('com:weekmail_article') }}">{% trans %}New article{% endtrans %}</a></p>
|
||||
<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>
|
||||
<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() %}
|
||||
{% 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="{{ url('com:weekmail_article_edit', article_id=a.id) }}">{% trans %}Edit{% endtrans %}</a> |
|
||||
<a href="{{ url('com:weekmail_article_delete', article_id=a.id) }}">{% trans %}Delete{% endtrans %}</a> |
|
||||
<a href="?add_article={{ a.id }}">{% trans %}Add to weekmail{% endtrans %}</a> |
|
||||
<a href="?up_article={{ a.id }}">{% trans %}Up{% endtrans %}</a> |
|
||||
<a href="?down_article={{ a.id }}">{% trans %}Down{% endtrans %}</a>
|
||||
</td>
|
||||
<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="{{ url('com:weekmail_article_delete', article_id=a.id) }}">{% trans %}Delete{% endtrans %}</a> |
|
||||
<a href="?add_article={{ a.id }}">{% trans %}Add to 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 %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<h4>{% trans %}Articles included the next weekmail{% endtrans %}</h4>
|
||||
<table>
|
||||
</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>
|
||||
<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') %}
|
||||
{% 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="{{ url('com:weekmail_article_delete', article_id=a.id) }}">{% trans %}Delete{% 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>
|
||||
<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="{{ url('com:weekmail_article_delete', article_id=a.id) }}">{% trans %}Delete{% 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 %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<form action="" method="post" enctype="multipart/form-data">
|
||||
</table>
|
||||
<form action="" method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p() }}
|
||||
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
||||
</form>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
@ -2,41 +2,41 @@
|
||||
{% from 'core/macros.jinja' import user_profile_link %}
|
||||
|
||||
{% block title %}
|
||||
{{ weekmail.title }}
|
||||
{{ weekmail.title }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<a href="{{ url('com:weekmail') }}">{% trans %}Back{% endtrans %}</a>
|
||||
{% if bad_recipients %}
|
||||
<a href="{{ url('com:weekmail') }}">{% trans %}Back{% endtrans %}</a>
|
||||
{% if bad_recipients %}
|
||||
<p>
|
||||
<span class="important">
|
||||
<span class="important">
|
||||
{% trans %}The following recipients were refused by the SMTP:{% endtrans %}
|
||||
</span>
|
||||
<ul>
|
||||
{% for r in bad_recipients.keys() %}
|
||||
<li>{{ r }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</span>
|
||||
<ul>
|
||||
{% for r in bad_recipients.keys() %}
|
||||
<li>{{ r }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<form method="post" action="">
|
||||
{% csrf_token %}
|
||||
<button type="submit" name="send" value="clean">{% trans %}Clean subscribers{% endtrans %}</button>
|
||||
{% csrf_token %}
|
||||
<button type="submit" name="send" value="clean">{% trans %}Clean subscribers{% endtrans %}</button>
|
||||
</form>
|
||||
{% else %}
|
||||
{% else %}
|
||||
{% 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>
|
||||
<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 %}
|
||||
{% endif %}
|
||||
<hr>
|
||||
{{ weekmail_rendered|safe }}
|
||||
{% endif %}
|
||||
<hr>
|
||||
{{ weekmail_rendered|safe }}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
@ -1,52 +1,52 @@
|
||||
<style type="text/css" media="all">
|
||||
h1, h2, h3, h4, h5, h6, p {
|
||||
h1, h2, h3, h4, h5, h6, p {
|
||||
padding: 5px ;
|
||||
margin: 5px;
|
||||
}
|
||||
img {
|
||||
}
|
||||
img {
|
||||
margin: 5px ;
|
||||
width: 95%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<div style="background: #CBD1DD; padding: 0px 5%;">
|
||||
<div style="background: #F9FAFB;">
|
||||
<h2 style="background: #000; color: #f9fafb">{{ weekmail.title }}</h2>
|
||||
<img src="{{ weekmail.get_banner() }}"
|
||||
id="OWATemporaryImageDivContainerBannerForOutlook"
|
||||
>
|
||||
{% if weekmail.intro %}
|
||||
<h3 style="background: #000; color: #f9fafb">{% trans %}Intro{% endtrans %}</h3>
|
||||
{{ weekmail.intro|markdown }}
|
||||
{% endif %}
|
||||
<div style="background: #F9FAFB;">
|
||||
<h2 style="background: #000; color: #f9fafb">{{ weekmail.title }}</h2>
|
||||
<img src="{{ weekmail.get_banner() }}"
|
||||
id="OWATemporaryImageDivContainerBannerForOutlook"
|
||||
>
|
||||
{% if weekmail.intro %}
|
||||
<h3 style="background: #000; color: #f9fafb">{% trans %}Intro{% endtrans %}</h3>
|
||||
{{ weekmail.intro|markdown }}
|
||||
{% endif %}
|
||||
|
||||
<h3 style="background: #000; color: #f9fafb">{% trans %}Table of content{% endtrans %}</h3>
|
||||
<ul>
|
||||
{% for a in weekmail.articles.all() %}
|
||||
<li>[{{ a.club }}] {{ a.title }}</li>
|
||||
{%- endfor %}
|
||||
</ul>
|
||||
<h3 style="background: #000; color: #f9fafb">{% trans %}Table of content{% endtrans %}</h3>
|
||||
<ul>
|
||||
{% for a in weekmail.articles.all() %}
|
||||
<li>[{{ a.club }}] {{ a.title }}</li>
|
||||
{%- endfor %}
|
||||
</ul>
|
||||
|
||||
{%- for a in weekmail.articles.all() %}
|
||||
<h3 style="background: #000; color: #f9fafb">[{{ a.club }}] {{ a.title }}</h3>
|
||||
{{ a.content|markdown }}
|
||||
{%- endfor -%}
|
||||
{%- for a in weekmail.articles.all() %}
|
||||
<h3 style="background: #000; color: #f9fafb">[{{ a.club }}] {{ a.title }}</h3>
|
||||
{{ a.content|markdown }}
|
||||
{%- endfor -%}
|
||||
|
||||
{%- if weekmail.joke %}
|
||||
<h3 style="background: #000; color: #f9fafb">{% trans %}Joke{% endtrans %}</h3>
|
||||
{{ weekmail.joke|markdown }}
|
||||
{% endif -%}
|
||||
{%- if weekmail.joke %}
|
||||
<h3 style="background: #000; color: #f9fafb">{% trans %}Joke{% endtrans %}</h3>
|
||||
{{ weekmail.joke|markdown }}
|
||||
{% endif -%}
|
||||
|
||||
{%- if weekmail.protip %}
|
||||
<h3 style="background: #000; color: #f9fafb">{% trans %}Pro tip{% endtrans %}</h3>
|
||||
{{ weekmail.protip|markdown }}
|
||||
{% endif -%}
|
||||
{%- if weekmail.protip %}
|
||||
<h3 style="background: #000; color: #f9fafb">{% trans %}Pro tip{% endtrans %}</h3>
|
||||
{{ weekmail.protip|markdown }}
|
||||
{% endif -%}
|
||||
|
||||
{%- if weekmail.conclusion %}
|
||||
<h3 style="background: #000; color: #f9fafb">{% trans %}Final word{% endtrans %}</h3>
|
||||
{{ weekmail.conclusion|markdown }}
|
||||
{% endif -%}
|
||||
<img src="{{ weekmail.get_footer() }}"
|
||||
</div>
|
||||
{%- if weekmail.conclusion %}
|
||||
<h3 style="background: #000; color: #f9fafb">{% trans %}Final word{% endtrans %}</h3>
|
||||
{{ weekmail.conclusion|markdown }}
|
||||
{% endif -%}
|
||||
<img src="{{ weekmail.get_footer() }}"
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
# {{ weekmail.title }}
|
||||
|
||||
{%- if weekmail.intro %}
|
||||
## {% trans %}Intro{% endtrans %}
|
||||
{{ weekmail.intro }}
|
||||
## {% trans %}Intro{% endtrans %}
|
||||
{{ weekmail.intro }}
|
||||
{% endif %}
|
||||
|
||||
## {% trans %}Table of content{% endtrans %}
|
||||
@ -11,22 +11,22 @@
|
||||
{% endfor -%}
|
||||
|
||||
{% for a in weekmail.articles.all() %}
|
||||
## [{{ a.club }}] {{ a.title }}
|
||||
{{ a.content }}
|
||||
## [{{ a.club }}] {{ a.title }}
|
||||
{{ a.content }}
|
||||
{% endfor -%}
|
||||
|
||||
{%- if weekmail.joke %}
|
||||
## {% trans %}Joke{% endtrans %}
|
||||
{{ weekmail.joke }}
|
||||
## {% trans %}Joke{% endtrans %}
|
||||
{{ weekmail.joke }}
|
||||
{% endif -%}
|
||||
|
||||
{%- if weekmail.protip %}
|
||||
## {% trans %}Pro tip{% endtrans %}
|
||||
{{ weekmail.protip }}
|
||||
## {% trans %}Pro tip{% endtrans %}
|
||||
{{ weekmail.protip }}
|
||||
{% endif -%}
|
||||
|
||||
{%- if weekmail.conclusion %}
|
||||
## {% trans %}Final word{% endtrans %}
|
||||
{{ weekmail.conclusion }}
|
||||
## {% trans %}Final word{% endtrans %}
|
||||
{{ weekmail.conclusion }}
|
||||
{% endif -%}
|
||||
|
||||
|
20
com/tests.py
20
com/tests.py
@ -69,11 +69,11 @@ class TestCom(TestCase):
|
||||
},
|
||||
)
|
||||
r = self.client.get(reverse("core:index"))
|
||||
self.assertContains(
|
||||
r,
|
||||
"""<div id="alert_box">
|
||||
<div class="markdown"><h3>ALERTE!</h3>
|
||||
<p><strong>Caaaataaaapuuuulte!!!!</strong></p>""",
|
||||
assert r.status_code == 200
|
||||
self.assertInHTML(
|
||||
"""<div id="alert_box"><div class="markdown"><h3>ALERTE!</h3>
|
||||
<p><strong>Caaaataaaapuuuulte!!!!</strong></p>""",
|
||||
r.content.decode(),
|
||||
)
|
||||
|
||||
def test_info_msg(self):
|
||||
@ -86,10 +86,12 @@ class TestCom(TestCase):
|
||||
},
|
||||
)
|
||||
r = self.client.get(reverse("core:index"))
|
||||
self.assertContains(
|
||||
r,
|
||||
"""<div id="info_box">
|
||||
<div class="markdown"><h3>INFO: <strong>Caaaataaaapuuuulte!!!!</strong></h3>""",
|
||||
|
||||
assert r.status_code == 200
|
||||
self.assertInHTML(
|
||||
"""<div id="info_box"><div class="markdown">
|
||||
<h3>INFO: <strong>Caaaataaaapuuuulte!!!!</strong></h3>""",
|
||||
r.content.decode(),
|
||||
)
|
||||
|
||||
def test_birthday_non_subscribed_user(self):
|
||||
|
Reference in New Issue
Block a user