mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-21 01:48:21 +02:00
Display banners when a user is no more a BDE or Kfet member
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
{% load static i18n pretty_money static getenv perms %}
|
||||
{% load static i18n pretty_money static getenv perms memberinfo %}
|
||||
{% comment %}
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
{% endcomment %}
|
||||
@ -64,8 +64,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
<a class="nav-link {% if request.path_info == url %}active{% endif %}" href="{{ url }}"><i class="fa fa-coffee"></i> {% trans 'Consumptions' %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{# FIXME Find a better solution to check if a user has the right to see the transfer page #}
|
||||
{% if "note.alias"|model_list_length >= 2 %}
|
||||
{% if user.is_authenticated and user|is_member:"Kfet" %}
|
||||
<li class="nav-item">
|
||||
{% url 'note:transfer' as url %}
|
||||
<a class="nav-link {% if request.path_info == url %}active{% endif %}" href="{{ url }}"><i class="fa fa-exchange"></i> {% trans 'Transfer' %} </a>
|
||||
@ -152,10 +151,22 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
</nav>
|
||||
<div class="{% block containertype %}container{% endblock %} my-3">
|
||||
<div id="messages">
|
||||
{% if request.user.is_authenticated and not request.user.profile.email_confirmed %}
|
||||
<div class="alert alert-warning">
|
||||
{% trans "Your e-mail address is not validated. Please check your mail inbox and click on the validation link." %}
|
||||
</div>
|
||||
{% if user.is_authenticated %}
|
||||
{% if not user|is_member:"BDE" %}
|
||||
<div class="alert alert-danger">
|
||||
{% trans "You are not a BDE member anymore. Please renew your membership if you want to use the note." %}
|
||||
</div>
|
||||
{% elif not user|is_member:"Kfet" %}
|
||||
<div class="alert alert-warning">
|
||||
{% trans "You are not a Kfet member, so you can't use your note account." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if not user.profile.email_confirmed %}
|
||||
<div class="alert alert-warning">
|
||||
{% trans "Your e-mail address is not validated. Please check your mail inbox and click on the validation link." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if user.sogecredit and not user.sogecredit.valid %}
|
||||
<div class="alert alert-info">
|
||||
|
Reference in New Issue
Block a user