introduce djhtml as jinja+scss formater

This commit is contained in:
thomas girod
2024-07-24 00:16:31 +02:00
committed by Bartuccio Antoine
parent 13d0d2a300
commit b25805e0a1
171 changed files with 7070 additions and 7018 deletions

View File

@ -1,30 +1,30 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}Comment{% endtrans %}
{% trans %}Comment{% endtrans %}
{% endblock %}
{% block content %}
<h2>{% trans %}Comment{% endtrans %}</h2>
<div style="width: 400px; margin: auto; border: solid 1px grey; text-align: center">
<h2>{% trans %}Comment{% endtrans %}</h2>
<div style="width: 400px; margin: auto; border: solid 1px grey; text-align: center">
{% set file = None %}
{% if target.profile_pict %}
{% set file = target.profile_pict.url %}
{% set file = target.profile_pict.url %}
{% else %}
{% set file = static('core/img/na.gif') %}
{% set file = static('core/img/na.gif') %}
{% endif %}
<div style="max-width: 300px; margin: auto;">
<img src="{{ file }}" alt="" style="max-width: 300px">
<img src="{{ file }}" alt="" style="max-width: 300px">
</div>
<div>
{{ target.user.get_display_name() }}
{{ target.user.get_display_name() }}
</div>
</div>
<form action="" method="post">
</div>
<form action="" method="post">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
</form>
</form>
{% endblock %}

View File

@ -1,33 +1,33 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}Moderate Trombi comments{% endtrans %}
{% trans %}Moderate Trombi comments{% endtrans %}
{% endblock %}
{% block content %}
<h3>{% trans %}Moderate Trombi comments{% endtrans %}</h3>
<h4>{{ trombi }}</h4>
<a href="{{ url('trombi:detail', trombi_id=object.id) }}">{% trans %}Back{% endtrans %}</a>
<hr>
<dl>
{% for c in comments %}
<dt>{% trans author=c.author.user.get_display_name(),
target=c.target.user.get_display_name() %}Author: {{ author }} - Target: {{ target }}{% endtrans %}</dt>
<dd>
<h3>{% trans %}Moderate Trombi comments{% endtrans %}</h3>
<h4>{{ trombi }}</h4>
<a href="{{ url('trombi:detail', trombi_id=object.id) }}">{% trans %}Back{% endtrans %}</a>
<hr>
<dl>
{% for c in comments %}
<dt>{% trans author=c.author.user.get_display_name(),
target=c.target.user.get_display_name() %}Author: {{ author }} - Target: {{ target }}{% endtrans %}</dt>
<dd>
<pre>
{{ c.content }}
</pre>
<form action="{{ url('trombi:moderate_comment', comment_id=c.id )}}" method="post">
{% csrf_token %}
<input type="hidden" name="action" id="action" value="accept" />
<p><input type="submit" value="{% trans %}Accept{% endtrans %}" /></p>
</form>
<form action="{{ url('trombi:moderate_comment', comment_id=c.id )}}" method="post">
{% csrf_token %}
<input type="hidden" name="action" id="action" value="reject" />
<p><input type="submit" value="{% trans %}Reject{% endtrans %}" /></p>
</form>
</dd>
<form action="{{ url('trombi:moderate_comment', comment_id=c.id )}}" method="post">
{% csrf_token %}
<input type="hidden" name="action" id="action" value="accept" />
<p><input type="submit" value="{% trans %}Accept{% endtrans %}" /></p>
</form>
<form action="{{ url('trombi:moderate_comment', comment_id=c.id )}}" method="post">
{% csrf_token %}
<input type="hidden" name="action" id="action" value="reject" />
<p><input type="submit" value="{% trans %}Reject{% endtrans %}" /></p>
</form>
</dd>
{% endfor %}
</dl>

View File

@ -1,40 +1,40 @@
{% extends 'core/base.jinja' %}
{% block title %}
{% trans club=object.club %}{{ club }}'s Trombi{% endtrans %}
{% trans club=object.club %}{{ club }}'s Trombi{% endtrans %}
{% endblock %}
{% block content %}
<h2>{% trans club=object.club %}{{ club }}'s Trombi{% endtrans %}</h2>
<a href="{{ url('trombi:edit', trombi_id=object.id) }}">{% trans %}Edit{% endtrans %}</a>
<a href="{{ url('trombi:moderate_comments', trombi_id=object.id) }}">{% trans %}Moderate comments{% endtrans %}</a>
<p>{% trans %}Subscription deadline: {% endtrans %}{{ object.subscription_deadline|date(DATETIME_FORMAT) }}</p>
<p>{% trans %}Comment deadline: {% endtrans %}{{ object.comments_deadline|date(DATETIME_FORMAT) }}</p>
<a href="{{ url('trombi:export', trombi_id=object.id) }}">{% trans %}Export{% endtrans %}</a>
<hr>
<h4>{% trans %}Add user{% endtrans %}</h4>
<form action="" method="post">
{% csrf_token %}
{{ form.as_p() }}
<input type="submit" value="{% trans %}Add{% endtrans %}" />
</form>
<hr>
<div>
<h2>{% trans club=object.club %}{{ club }}'s Trombi{% endtrans %}</h2>
<a href="{{ url('trombi:edit', trombi_id=object.id) }}">{% trans %}Edit{% endtrans %}</a>
<a href="{{ url('trombi:moderate_comments', trombi_id=object.id) }}">{% trans %}Moderate comments{% endtrans %}</a>
<p>{% trans %}Subscription deadline: {% endtrans %}{{ object.subscription_deadline|date(DATETIME_FORMAT) }}</p>
<p>{% trans %}Comment deadline: {% endtrans %}{{ object.comments_deadline|date(DATETIME_FORMAT) }}</p>
<a href="{{ url('trombi:export', trombi_id=object.id) }}">{% trans %}Export{% endtrans %}</a>
<hr>
<h4>{% trans %}Add user{% endtrans %}</h4>
<form action="" method="post">
{% csrf_token %}
{{ form.as_p() }}
<input type="submit" value="{% trans %}Add{% endtrans %}" />
</form>
<hr>
<div>
{% for u in object.users.order_by('user__nick_name') %}
<div class="ib" style="border: solid 1px grey; text-align: center">
{% set file = None %}
{% if u.profile_pict %}
{% set file = u.profile_pict.url %}
{% else %}
{% set file = static('core/img/na.gif') %}
{% endif %}
<div style="max-width: 100px; margin: auto;">
<img src="{{ file }}" alt="" style="max-width: 100px">
</div>
<div>{{ u.user.get_display_name() }}</div>
<div><a href="{{ url('trombi:delete_user', user_id=u.id) }}">{% trans %}Delete{% endtrans %}</a></div>
<div><a href="{{ url('trombi:create_membership', user_id=u.id) }}">{% trans %}Add club membership{% endtrans %}</a></div>
<div class="ib" style="border: solid 1px grey; text-align: center">
{% set file = None %}
{% if u.profile_pict %}
{% set file = u.profile_pict.url %}
{% else %}
{% set file = static('core/img/na.gif') %}
{% endif %}
<div style="max-width: 100px; margin: auto;">
<img src="{{ file }}" alt="" style="max-width: 100px">
</div>
<div>{{ u.user.get_display_name() }}</div>
<div><a href="{{ url('trombi:delete_user', user_id=u.id) }}">{% trans %}Delete{% endtrans %}</a></div>
<div><a href="{{ url('trombi:create_membership', user_id=u.id) }}">{% trans %}Add club membership{% endtrans %}</a></div>
</div>
{% endfor %}
</div>
</div>
{% endblock %}

View File

@ -1,42 +1,42 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}Edit profile{% endtrans %}
{% trans %}Edit profile{% endtrans %}
{% endblock %}
{% block content %}
<h2>{% trans %}Edit profile{% endtrans %}</h2>
<p> <a href="{{ url('trombi:user_tools') }}">{% trans %}Back to tools{% endtrans %}</a></p>
<form action="" method="post" enctype="multipart/form-data">
<h2>{% trans %}Edit profile{% endtrans %}</h2>
<p> <a href="{{ url('trombi:user_tools') }}">{% trans %}Back to tools{% endtrans %}</a></p>
<form action="" method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
</form>
<h4>{% trans %}Club{% endtrans %}</h4>
<a href="{{ url('trombi:reset_memberships') }}">
</form>
<h4>{% trans %}Club{% endtrans %}</h4>
<a href="{{ url('trombi:reset_memberships') }}">
{% trans %}Reset club memberships in Trombi (delete exising ones, does not impact real club memberships){% endtrans %}
</a>
<table style="max-width: 80%; margin: auto;">
</a>
<table style="max-width: 80%; margin: auto;">
<thead>
<tr>
<td>{% trans %}Club{% endtrans %}</td>
<td>{% trans %}Role{% endtrans %}</td>
<td>{% trans %}Dates{% endtrans %}</td>
</tr>
<tr>
<td>{% trans %}Club{% endtrans %}</td>
<td>{% trans %}Role{% endtrans %}</td>
<td>{% trans %}Dates{% endtrans %}</td>
</tr>
</thead>
<tbody>
{% for m in user.trombi_user.memberships.all() %}
{% for m in user.trombi_user.memberships.all() %}
<tr>
<td>{{ m.club }}</td>
<td>{{ m.role }}</td>
<td>{{ m.start }} - {{ m.end }}</td>
<td>
<a href="{{ url('trombi:edit_membership', membership_id=m.id) }}">{% trans %}Edit{% endtrans %}</a>
<a href="{{ url('trombi:delete_membership', membership_id=m.id) }}">{% trans %}Delete{% endtrans %}</a>
</td>
<td>{{ m.club }}</td>
<td>{{ m.role }}</td>
<td>{{ m.start }} - {{ m.end }}</td>
<td>
<a href="{{ url('trombi:edit_membership', membership_id=m.id) }}">{% trans %}Edit{% endtrans %}</a>
<a href="{{ url('trombi:delete_membership', membership_id=m.id) }}">{% trans %}Delete{% endtrans %}</a>
</td>
</tr>
{% endfor %}
{% endfor %}
</tbody>
</table>
</table>
{% endblock %}

View File

@ -1,117 +1,117 @@
{% extends 'core/base.jinja' %}
{% block title %}
{% trans club=object.club %}{{ club }}'s Trombi{% endtrans %}
{% trans club=object.club %}{{ club }}'s Trombi{% endtrans %}
{% endblock %}
{% block content %}
<h2>{% trans club=object.club %}{{ club }}'s Trombi{% endtrans %}</h2>
<a href="{{ url('trombi:detail', trombi_id=object.id) }}">{% trans %}Back{% endtrans %}</a>
<hr>
<div>
<h2>{% trans club=object.club %}{{ club }}'s Trombi{% endtrans %}</h2>
<a href="{{ url('trombi:detail', trombi_id=object.id) }}">{% trans %}Back{% endtrans %}</a>
<hr>
<div>
{% for trombi_user in object.users.order_by('user__nick_name') %}
<div style="border: solid 1px grey; text-align: center; margin: 5px;">
<div id="user_{{ trombi_user.id }}_infos">
{{ trombi_user.user.get_display_name() }}<br>
{{ trombi_user.user.department }}/{{ trombi_user.user.dpt_option }}<br>
{% trans %}Quote: {% endtrans %}{{ trombi_user.user.quote }}<br>
{% trans %}Date of birth: {% endtrans %}{{ trombi_user.user.date_of_birth|date("d F Y") }}<br>
{% trans %}Email: {% endtrans %}{{ trombi_user.user.second_email }}<br>
{% trans %}Phone: {% endtrans %}{{ trombi_user.user.phone|phonenumber }}<br>
{% trans %}City: {% endtrans %}{{ trombi_user.user.parent_address }}<br>
</div>
<button onclick="copyToClipboard(document.getElementById('user_{{ trombi_user.id }}_infos'))">{% trans %}Copy{% endtrans %}</button>
<h4>{% trans %}Pictures{% endtrans %}</h4>
{% set profile_file = None %}
{% set scrub_file = None %}
{% if trombi_user.profile_pict %}
{% set profile_file = trombi_user.profile_pict.url %}
{% else %}
{% set profile_file = static('core/img/na.gif') %}
{% endif %}
{% if trombi_user.scrub_pict %}
{% set scrub_file = trombi_user.scrub_pict.url %}
{% else %}
{% set scrub_file = static('core/img/na.gif') %}
{% endif %}
<div style="max-width: 410px; margin: auto; text-align: center;">
<div>
<div class="ib w_medium">
<div id="user_{{ trombi_user.id }}_profile"><img src="{{ profile_file }}" alt="" style="max-width: 200px"></div>
<button onclick="copyToClipboard(document.getElementById('user_{{ trombi_user.id }}_profile'))">{% trans %}Copy profile picture{% endtrans %}</button>
</div>
<div class="ib w_medium">
<div id="user_{{ trombi_user.id }}_scrub"><img src="{{ scrub_file }}" alt="" style="max-width: 200px"></div>
<button onclick="copyToClipboard(document.getElementById('user_{{ trombi_user.id }}_scrub'))">{% trans %}Copy scrub picture{% endtrans %}</button>
</div>
</div>
</div>
{% if trombi_user.memberships.exists() %}
<h4>{% trans %}Club{% endtrans %}</h4>
<table id="user_{{ trombi_user.id }}_clubs" style="max-width: 70%; margin: auto;">
<thead>
<tr>
<td>{% trans %}Club{% endtrans %}</td>
<td>{% trans %}Role{% endtrans %}</td>
</tr>
</thead>
<tbody>
{% for m in trombi_user.memberships.all() %}
<tr>
<td>{{ m.club }}</td>
<td>{{ m.start }} - {{ m.end }} ({{ m.role }})</td>
</tr>
{% endfor %}
</tbody>
</table>
<button onclick="copyToClipboard(document.getElementById('user_{{ trombi_user.id }}_clubs'))">{% trans %}Copy clubs{% endtrans %}</button>
{% endif %}
<h4>{% trans %}Comments{% endtrans %}</h4>
<table id="user_{{ trombi_user.id }}_coms" style="text-align: left; word-wrap: break-word;">
<tbody>
{% for c in trombi_user.received_comments.filter(is_moderated=True) %}
<tr>
<td>{{ c.author.user.get_short_name() }}</td>
<td>
{% for line in c.content.splitlines() %}
{{ line }}<br>
{% endfor %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
<button onclick="copyToClipboard(document.getElementById('user_{{ trombi_user.id }}_coms'))">{% trans %}Copy comments{% endtrans %}</button>
<div style="border: solid 1px grey; text-align: center; margin: 5px;">
<div id="user_{{ trombi_user.id }}_infos">
{{ trombi_user.user.get_display_name() }}<br>
{{ trombi_user.user.department }}/{{ trombi_user.user.dpt_option }}<br>
{% trans %}Quote: {% endtrans %}{{ trombi_user.user.quote }}<br>
{% trans %}Date of birth: {% endtrans %}{{ trombi_user.user.date_of_birth|date("d F Y") }}<br>
{% trans %}Email: {% endtrans %}{{ trombi_user.user.second_email }}<br>
{% trans %}Phone: {% endtrans %}{{ trombi_user.user.phone|phonenumber }}<br>
{% trans %}City: {% endtrans %}{{ trombi_user.user.parent_address }}<br>
</div>
<button onclick="copyToClipboard(document.getElementById('user_{{ trombi_user.id }}_infos'))">{% trans %}Copy{% endtrans %}</button>
<h4>{% trans %}Pictures{% endtrans %}</h4>
{% set profile_file = None %}
{% set scrub_file = None %}
{% if trombi_user.profile_pict %}
{% set profile_file = trombi_user.profile_pict.url %}
{% else %}
{% set profile_file = static('core/img/na.gif') %}
{% endif %}
{% if trombi_user.scrub_pict %}
{% set scrub_file = trombi_user.scrub_pict.url %}
{% else %}
{% set scrub_file = static('core/img/na.gif') %}
{% endif %}
<div style="max-width: 410px; margin: auto; text-align: center;">
<div>
<div class="ib w_medium">
<div id="user_{{ trombi_user.id }}_profile"><img src="{{ profile_file }}" alt="" style="max-width: 200px"></div>
<button onclick="copyToClipboard(document.getElementById('user_{{ trombi_user.id }}_profile'))">{% trans %}Copy profile picture{% endtrans %}</button>
</div>
<div class="ib w_medium">
<div id="user_{{ trombi_user.id }}_scrub"><img src="{{ scrub_file }}" alt="" style="max-width: 200px"></div>
<button onclick="copyToClipboard(document.getElementById('user_{{ trombi_user.id }}_scrub'))">{% trans %}Copy scrub picture{% endtrans %}</button>
</div>
</div>
</div>
{% if trombi_user.memberships.exists() %}
<h4>{% trans %}Club{% endtrans %}</h4>
<table id="user_{{ trombi_user.id }}_clubs" style="max-width: 70%; margin: auto;">
<thead>
<tr>
<td>{% trans %}Club{% endtrans %}</td>
<td>{% trans %}Role{% endtrans %}</td>
</tr>
</thead>
<tbody>
{% for m in trombi_user.memberships.all() %}
<tr>
<td>{{ m.club }}</td>
<td>{{ m.start }} - {{ m.end }} ({{ m.role }})</td>
</tr>
{% endfor %}
</tbody>
</table>
<button onclick="copyToClipboard(document.getElementById('user_{{ trombi_user.id }}_clubs'))">{% trans %}Copy clubs{% endtrans %}</button>
{% endif %}
<h4>{% trans %}Comments{% endtrans %}</h4>
<table id="user_{{ trombi_user.id }}_coms" style="text-align: left; word-wrap: break-word;">
<tbody>
{% for c in trombi_user.received_comments.filter(is_moderated=True) %}
<tr>
<td>{{ c.author.user.get_short_name() }}</td>
<td>
{% for line in c.content.splitlines() %}
{{ line }}<br>
{% endfor %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
<button onclick="copyToClipboard(document.getElementById('user_{{ trombi_user.id }}_coms'))">{% trans %}Copy comments{% endtrans %}</button>
</div>
{% endfor %}
</div>
</div>
{% endblock %}
{% block script %}
{{ super () }}
<script>
function copyToClipboard(el) {
var body = document.body, range, sel;
if (document.createRange && window.getSelection) {
{{ super () }}
<script>
function copyToClipboard(el) {
var body = document.body, range, sel;
if (document.createRange && window.getSelection) {
range = document.createRange();
sel = window.getSelection();
sel.removeAllRanges();
try {
range.selectNodeContents(el);
sel.addRange(range);
range.selectNodeContents(el);
sel.addRange(range);
} catch (e) {
range.selectNode(el);
sel.addRange(range);
range.selectNode(el);
sel.addRange(range);
}
document.execCommand("copy");
} else if (body.createTextRange) {
} else if (body.createTextRange) {
range = body.createTextRange();
range.moveToElementText(el);
range.select();
range.execCommand("Copy");
}
}
}
</script>
</script>
{% endblock %}

View File

@ -1,62 +1,62 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans user_name=trombi_user.user.get_display_name() %}{{ user_name }}'s Trombi profile{% endtrans %}
{% trans user_name=trombi_user.user.get_display_name() %}{{ user_name }}'s Trombi profile{% endtrans %}
{% endblock %}
{% block content %}
<h3>{% trans user_name=trombi_user.user.get_display_name() %}{{ user_name }}'s Trombi profile{% endtrans %}</h3>
<p> <a href="{{ url('trombi:user_tools') }}">{% trans %}Back to tools{% endtrans %}</a></p>
<div>
<h3>{% trans user_name=trombi_user.user.get_display_name() %}{{ user_name }}'s Trombi profile{% endtrans %}</h3>
<p> <a href="{{ url('trombi:user_tools') }}">{% trans %}Back to tools{% endtrans %}</a></p>
<div>
<h4>{% trans %}Pictures{% endtrans %}</h4>
{% set profile_file = None %}
{% set scrub_file = None %}
{% if trombi_user.profile_pict %}
{% set profile_file = trombi_user.profile_pict.url %}
{% set profile_file = trombi_user.profile_pict.url %}
{% else %}
{% set profile_file = static('core/img/na.gif') %}
{% set profile_file = static('core/img/na.gif') %}
{% endif %}
{% if trombi_user.scrub_pict %}
{% set scrub_file = trombi_user.scrub_pict.url %}
{% set scrub_file = trombi_user.scrub_pict.url %}
{% else %}
{% set scrub_file = static('core/img/na.gif') %}
{% set scrub_file = static('core/img/na.gif') %}
{% endif %}
<div style="max-width: 410px; margin: auto; text-align: center;">
<div>
<img src="{{ profile_file }}" alt="" style="max-width: 200px">
<img src="{{ scrub_file }}" alt="" style="max-width: 200px">
</div>
<div>
<em>{{ trombi_user.user.get_short_name() }}</em>
</div>
<div>
<img src="{{ profile_file }}" alt="" style="max-width: 200px">
<img src="{{ scrub_file }}" alt="" style="max-width: 200px">
</div>
<div>
<em>{{ trombi_user.user.get_short_name() }}</em>
</div>
</div>
{% if trombi_user.memberships.exists() %}
<h4>{% trans %}Club{% endtrans %}</h4>
<table style="max-width: 70%; margin: auto;">
<h4>{% trans %}Club{% endtrans %}</h4>
<table style="max-width: 70%; margin: auto;">
<thead>
<tr>
<td>{% trans %}Club{% endtrans %}</td>
<td>{% trans %}Role{% endtrans %}</td>
<td>{% trans %}Date{% endtrans %}</td>
</tr>
<tr>
<td>{% trans %}Club{% endtrans %}</td>
<td>{% trans %}Role{% endtrans %}</td>
<td>{% trans %}Date{% endtrans %}</td>
</tr>
</thead>
<tbody>
{% for m in trombi_user.memberships.all() %}
{% for m in trombi_user.memberships.all() %}
<tr>
<td>{{ m.club }}</td>
<td>{{ m.role }}</td>
<td>{{ m.start }} - {{ m.end }}</td>
<td>{{ m.club }}</td>
<td>{{ m.role }}</td>
<td>{{ m.start }} - {{ m.end }}</td>
</tr>
{% endfor %}
{% endfor %}
</tbody>
</table>
</table>
{% endif %}
<dl>
{% for c in trombi_user.received_comments.filter(is_moderated=True) %}
{% for c in trombi_user.received_comments.filter(is_moderated=True) %}
<dt style="font-weight: bold; font-size: 110%">{{ c.author.user.get_display_name() }}</dt>
<dd><pre>{{ c.content }}</pre></dd>
{% endfor %}
{% endfor %}
</dl>
</div>
</div>
{% endblock %}

View File

@ -1,60 +1,60 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans user_name=user.get_display_name() %}{{ user_name }}'s Trombi{% endtrans %}
{% trans user_name=user.get_display_name() %}{{ user_name }}'s Trombi{% endtrans %}
{% endblock %}
{% block content %}
<h3>{% trans%}Trombi'{% endtrans %}</h3>
{% if subscribe_form %}
<form action="" method="post">
{% csrf_token %}
{{ subscribe_form.as_p() }}
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
</form>
{% endif %}
{% if trombi %}
<p>{% trans trombi = user.trombi_user.trombi %}You are subscribed to the Trombi {{ trombi }}{% endtrans %}</p>
<hr>
{% set can_comment = trombi.subscription_deadline < date.today() and
<h3>{% trans%}Trombi'{% endtrans %}</h3>
{% if subscribe_form %}
<form action="" method="post">
{% csrf_token %}
{{ subscribe_form.as_p() }}
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
</form>
{% endif %}
{% if trombi %}
<p>{% trans trombi = user.trombi_user.trombi %}You are subscribed to the Trombi {{ trombi }}{% endtrans %}</p>
<hr>
{% set can_comment = trombi.subscription_deadline < date.today() and
date.today() <= trombi.comments_deadline %}
{% if not can_comment %}
<p>{% trans %}You can not write comments at this date.{% endtrans %}</p>
<p>
{% trans start=trombi.subscription_deadline|date(DATE_FORMAT), end=trombi.comments_deadline|date(DATE_FORMAT) %}Comments are only allowed between {{ start }} (excluded) and {{ end }} (included){% endtrans %}</p>
<hr>
{% endif %}
<div>
{% for u in user.trombi_user.trombi.users.exclude(id=user.trombi_user.id).order_by('user__nick_name') %}
<div class="ib" style="border: solid 1px grey; text-align: center">
{% set file = None %}
{% if u.profile_pict %}
{% if not can_comment %}
<p>{% trans %}You can not write comments at this date.{% endtrans %}</p>
<p>
{% trans start=trombi.subscription_deadline|date(DATE_FORMAT), end=trombi.comments_deadline|date(DATE_FORMAT) %}Comments are only allowed between {{ start }} (excluded) and {{ end }} (included){% endtrans %}</p>
<hr>
{% endif %}
<div>
{% for u in user.trombi_user.trombi.users.exclude(id=user.trombi_user.id).order_by('user__nick_name') %}
<div class="ib" style="border: solid 1px grey; text-align: center">
{% set file = None %}
{% if u.profile_pict %}
{% set file = u.profile_pict.url %}
{% else %}
{% else %}
{% set file = static('core/img/na.gif') %}
{% endif %}
<div style="max-width: 100px; margin: auto;">
{% endif %}
<div style="max-width: 100px; margin: auto;">
<img src="{{ file }}" alt="" style="max-width: 100px">
</div>
<div>{{ u.user.get_display_name() }}</div>
{% if trombi.show_profiles %}
</div>
<div>{{ u.user.get_display_name() }}</div>
{% if trombi.show_profiles %}
<div>
<a href="{{ url('trombi:user_profile', user_id=u.id) }}">{% trans %}Profile{% endtrans %}</a>
<a href="{{ url('trombi:user_profile', user_id=u.id) }}">{% trans %}Profile{% endtrans %}</a>
</div>
{% endif %}
<div>
{% endif %}
<div>
{% if can_comment %}
{% set comment = u.received_comments.filter(author__id=user.trombi_user.id).first() %}
{% if comment %}
<a href="{{ url('trombi:edit_comment', comment_id=comment.id) }}">{% trans %}Edit comment{% endtrans %}</a>
{% else %}
<a href="{{ url('trombi:new_comment', user_id=u.id) }}">{% trans %}Comment{% endtrans %}</a>
{% endif %}
{% set comment = u.received_comments.filter(author__id=user.trombi_user.id).first() %}
{% if comment %}
<a href="{{ url('trombi:edit_comment', comment_id=comment.id) }}">{% trans %}Edit comment{% endtrans %}</a>
{% else %}
<a href="{{ url('trombi:new_comment', user_id=u.id) }}">{% trans %}Comment{% endtrans %}</a>
{% endif %}
{% endif %}
</div>
</div>
{% endfor %}
</div>
{% endfor %}
</div>
{% endif %}
{% endif %}
{% endblock %}