2017-05-09 21:42:01 +00:00
{% extends "core/base.jinja" %}
{% block title %}
2024-07-23 22:16:31 +00:00
{% trans user_name = user .get_display_name ( ) %} {{ user_name }} 's Trombi {% endtrans %}
2017-05-09 21:42:01 +00:00
{% endblock %}
{% block content %}
2024-07-23 22:16:31 +00:00
<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
2017-05-11 16:33:45 +00:00
date.today() <= trombi.comments_deadline %}
2024-07-23 22:16:31 +00:00
{% 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 %}
2017-05-10 21:03:49 +00:00
{% set file = u .profile_pict .url %}
2024-07-23 22:16:31 +00:00
{% else %}
2017-05-10 21:03:49 +00:00
{% set file = static ( 'core/img/na.gif' ) %}
2024-07-23 22:16:31 +00:00
{% endif %}
<div style="max-width: 100px; margin: auto;">
2017-05-10 21:03:49 +00:00
<img src=" {{ file }} " alt="" style="max-width: 100px">
2024-07-23 22:16:31 +00:00
</div>
<div> {{ u .user .get_display_name ( ) }} </div>
{% if trombi .show_profiles %}
2023-05-02 11:07:36 +00:00
<div>
2024-07-23 22:16:31 +00:00
<a href=" {{ url ( 'trombi:user_profile' , user_id = u .id ) }} "> {% trans %} Profile {% endtrans %} </a>
2023-05-02 11:07:36 +00:00
</div>
2024-07-23 22:16:31 +00:00
{% endif %}
<div>
2017-05-12 08:25:26 +00:00
{% if can_comment %}
2024-07-23 22:16:31 +00:00
{% 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 %}
2017-05-12 08:25:26 +00:00
{% endif %}
2024-07-23 22:16:31 +00:00
</div>
2017-05-12 08:25:26 +00:00
</div>
2024-07-23 22:16:31 +00:00
{% endfor %}
2017-05-09 21:42:01 +00:00
</div>
2024-07-23 22:16:31 +00:00
{% endif %}
2017-05-09 21:42:01 +00:00
{% endblock %}