mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-25 02:24:26 +00:00
Some basic templating
This commit is contained in:
parent
37d303634c
commit
6af16cc893
@ -1,4 +1,5 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
{% from 'core/macros.jinja' import user_profile_link %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h3>{% trans %}Club{% endtrans %}</h3>
|
<h3>{% trans %}Club{% endtrans %}</h3>
|
||||||
@ -15,11 +16,20 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
<h3>{{ club.name }}</h3>
|
<h3>{{ club.name }}</h3>
|
||||||
<p>{{ club.address }}</p>
|
<p>{{ club.address }}</p>
|
||||||
<ul>
|
<table>
|
||||||
{% for m in club.members.filter(end_date=None).all() %}
|
<thead>
|
||||||
<li>{{ m }}</li>
|
<td>{% trans %}User{% endtrans %}</td>
|
||||||
|
<td>{% trans %}Role{% endtrans %}</td>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for m in club.members.filter(end_date=None).order_by('-role').all() %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ user_profile_link(m.user) }}</td>
|
||||||
|
<td>{{ settings.SITH_CLUB_ROLES[m.role] }}</td>
|
||||||
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</tbody>
|
||||||
|
</table>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,12 +1,22 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
{% from 'core/macros.jinja' import user_profile_link %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2>{% trans %}Club members{% endtrans %}</h2>
|
<h2>{% trans %}Club members{% endtrans %}</h2>
|
||||||
<ul>
|
<table>
|
||||||
{% for m in club.members.all() %}
|
<thead>
|
||||||
<li>{{ m }}</li>
|
<td>{% trans %}User{% endtrans %}</td>
|
||||||
|
<td>{% trans %}Role{% endtrans %}</td>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for m in club.members.filter(end_date=None).order_by('-role').all() %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ user_profile_link(m.user) }}</td>
|
||||||
|
<td>{{ settings.SITH_CLUB_ROLES[m.role] }}</td>
|
||||||
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</tbody>
|
||||||
|
</table>
|
||||||
<form action="{{ url('club:club_members', club_id=club.id) }}" method="post">
|
<form action="{{ url('club:club_members', club_id=club.id) }}" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.as_p() }}
|
{{ form.as_p() }}
|
||||||
|
@ -45,7 +45,8 @@
|
|||||||
{# if the user is member of a club, he can view the subscription state #}
|
{# if the user is member of a club, he can view the subscription state #}
|
||||||
<p>
|
<p>
|
||||||
{% if get_subscriber(profile).is_subscribed() %}
|
{% if get_subscriber(profile).is_subscribed() %}
|
||||||
{% trans subscription_end=get_subscriber(profile).subscriptions.last().subscription_end %}Subscribed until {{ subscription_end }}{% endtrans %}
|
{% trans subscription_end=get_subscriber(profile).subscriptions.last().subscription_end %}Subscribed until {{ subscription_end }}{% endtrans %}<br/>
|
||||||
|
{% trans %}Account number: {% endtrans %}{{ profile.customer.account_id }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% trans %}Not subscribed{% endtrans %}
|
{% trans %}Not subscribed{% endtrans %}
|
||||||
{% if user.is_in_group(settings.SITH_MAIN_BOARD_GROUP) %}
|
{% if user.is_in_group(settings.SITH_MAIN_BOARD_GROUP) %}
|
||||||
|
Loading…
Reference in New Issue
Block a user