mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 20:09:25 +00:00
Almost finish the weekmail
This commit is contained in:
@ -7,6 +7,8 @@
|
||||
|
||||
{% 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>
|
||||
<h4>{% trans %}Articles in no weekmail yet{% endtrans %}</h4>
|
||||
<table>
|
||||
<thead>
|
||||
|
13
com/templates/com/weekmail_preview.jinja
Normal file
13
com/templates/com/weekmail_preview.jinja
Normal file
@ -0,0 +1,13 @@
|
||||
{% extends "core/base.jinja" %}
|
||||
{% from 'core/macros.jinja' import user_profile_link %}
|
||||
|
||||
{% block title %}
|
||||
{{ weekmail.title }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ weekmail_rendered|safe }}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
34
com/templates/com/weekmail_renderer.jinja
Normal file
34
com/templates/com/weekmail_renderer.jinja
Normal file
@ -0,0 +1,34 @@
|
||||
<h2>{{ weekmail.title }}</h2>
|
||||
|
||||
{% if weekmail.intro %}
|
||||
<h3>{% trans %}Intro{% endtrans %}</h3>
|
||||
{{ weekmail.intro|markdown }}
|
||||
{% endif %}
|
||||
|
||||
<h3>{% 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>[{{ a.club }}] {{ a.title }}</h3>
|
||||
{{ a.content|markdown }}
|
||||
{% endfor %}
|
||||
|
||||
{% if weekmail.joke %}
|
||||
<h3>{% trans %}Joke{% endtrans %}</h3>
|
||||
{{ weekmail.joke|markdown }}
|
||||
{% endif %}
|
||||
|
||||
{% if weekmail.protip %}
|
||||
<h3>{% trans %}Pro tip{% endtrans %}</h3>
|
||||
{{ weekmail.protip|markdown }}
|
||||
{% endif %}
|
||||
|
||||
{% if weekmail.conclusion %}
|
||||
<h3>{% trans %}Final word{% endtrans %}</h3>
|
||||
{{ weekmail.conclusion|markdown }}
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user