mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 11:59:23 +00:00
Fix database and add some view
This commit is contained in:
27
election/templates/election/election_detail.jinja
Normal file
27
election/templates/election/election_detail.jinja
Normal file
@ -0,0 +1,27 @@
|
||||
{% extends "core/base.jinja" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}Election list{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if object.has_voted(request.user) %}
|
||||
A voté
|
||||
{% endif %}
|
||||
<h1>{{object.title}}</h1>
|
||||
<p>{{object.description}}</p>
|
||||
<p>{% trans %}End :{% endtrans %} {{object.end_date}}</p>
|
||||
{% for resp in object.responsability.all() %}
|
||||
<h2>{{resp.title}}</h2>
|
||||
{% for user in resp.candidate.all() %}
|
||||
<a href="{{url('core:user_profile', user_id=user.subscriber.id)}}"><h3>{{user.subscriber.first_name}} {{user.subscriber.last_name}} ({{user.subscriber.nick_name}})</h3></a>
|
||||
{% if user.subscriber.profile_pict %}
|
||||
<img src="{{user.subscriber.profile_pict.get_download_url()}}" alt="{% trans %}Profile{% endtrans %}"/>
|
||||
{% endif %}
|
||||
{% if user.program %}
|
||||
<h4>Programme</h4>
|
||||
<p>{{user.program}}</p>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
@ -7,7 +7,7 @@
|
||||
{% block content %}
|
||||
{% for el in object_list %}
|
||||
{% if el.is_active %}
|
||||
<p>{{el}}</p>
|
||||
<p><a href="{{ url('election:detail', election_id=el.id) }}">{{el}}</a></p>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
Reference in New Issue
Block a user