2017-05-09 21:42:01 +00:00
{% extends "core/base.jinja" %}
{% block title %}
2017-05-10 20:17:05 +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 %}
2017-05-10 20:17:05 +00:00
<h3> {% trans %} Trombi' {% endtrans %} </h3>
2017-05-09 21:42:01 +00:00
{% if subscribe_form %}
<form action="" method="post">
{% csrf_token %}
{{ subscribe_form .as_p ( ) }}
<p><input type="submit" value=" {% trans %} Save {% endtrans %} " /></p>
</form>
{% else %}
2017-05-10 20:17:05 +00:00
<p> {% trans trombi = user .trombi_user .trombi %} You are subscribed to the Trombi {{ trombi }} {% endtrans %} </p>
2017-05-10 19:59:22 +00:00
<hr>
2017-05-11 16:33:45 +00:00
{% 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 %}
2017-05-10 19:59:22 +00:00
<div>
2017-07-05 19:13:10 +00:00
{% for u in user .trombi_user .trombi .users .exclude ( id = user .trombi_user .id ) .order_by ( 'user__nick_name' ) %}
2017-05-10 21:03:49 +00:00
<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>
2017-05-09 21:42:01 +00:00
<div> {{ u .user .get_display_name ( ) }} </div>
2017-05-12 08:25:26 +00:00
{% if trombi .show_profiles %}
<div>
<a href=" {{ url ( "trombi:user_profile" , user_id = u .id ) }} "> {% trans %} Profile {% endtrans %} </a>
</div>
2017-05-11 16:33:45 +00:00
{% endif %}
2017-05-12 08:25:26 +00:00
<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 %}
{% endif %}
</div>
2017-05-09 21:42:01 +00:00
</div>
{% endfor %}
2017-05-10 19:59:22 +00:00
</div>
2017-05-09 21:42:01 +00:00
{% endif %}
{% endblock %}