mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 11:59:23 +00:00
Improve Trombi again with pictures, notifs, and style!
This commit is contained in:
31
trombi/templates/trombi/comment.jinja
Normal file
31
trombi/templates/trombi/comment.jinja
Normal file
@ -0,0 +1,31 @@
|
||||
{% extends "core/base.jinja" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}Comment{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<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 %}
|
||||
{% else %}
|
||||
{% set file = static('core/img/na.gif') %}
|
||||
{% endif %}
|
||||
<div style="max-width: 300px; margin: auto;">
|
||||
<img src="{{ file }}" alt="" style="max-width: 300px">
|
||||
</div>
|
||||
<div>
|
||||
{{ target.user.get_display_name() }}
|
||||
</div>
|
||||
</div>
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p() }}
|
||||
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
@ -10,10 +10,22 @@
|
||||
<p>Subscription deadline: {{ object.subscription_deadline|date(DATETIME_FORMAT) }}</p>
|
||||
<p>Comment deadline: {{ object.comments_deadline|date(DATETIME_FORMAT) }}</p>
|
||||
<a href="#">Export</a>
|
||||
<p>People:</p>
|
||||
<ul>
|
||||
{% for u in object.users.all() %}
|
||||
<li>{{ u.user.get_display_name() }} - <a href="{{ url('trombi:delete_user', trombi_id=object.id, user_id=u.id) }}">Delete</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<hr>
|
||||
<div>
|
||||
{% for u in object.users.all() %}
|
||||
<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', trombi_id=object.id, user_id=u.id) }}">Delete</a></div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -15,10 +15,20 @@
|
||||
{% else %}
|
||||
<p>{% trans trombi = user.trombi_user.trombi %}You are subscribed to the Trombi {{ trombi }}{% endtrans %}</p>
|
||||
<p><a href="{{ url("trombi:profile") }}">Edit my profile</a></p>
|
||||
<p><a href="{{ url("trombi:pictures") }}">Edit my pictures</a></p>
|
||||
<hr>
|
||||
<div>
|
||||
{% for u in user.trombi_user.trombi.users.exclude(id=user.trombi_user.id) %}
|
||||
<div class="ib">
|
||||
<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>
|
||||
{% set comment = u.received_comments.filter(author__id=user.trombi_user.id).first() %}
|
||||
{% if comment %}
|
||||
|
Reference in New Issue
Block a user