8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-22 19:33:11 +00:00

Changement des couleurs et prise en ompte de l'activation du solde

This commit is contained in:
grisel-davy 2018-06-15 11:00:12 +02:00 committed by Gabriel Detraz
parent a84e8b5575
commit c5af76f963

View file

@ -28,19 +28,90 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% load logs_extra %} {% load logs_extra %}
{% block title %}Profil{% endblock %} {% block title %}Profil{% endblock %}
{% block content %} {% block content %}
<h2>{{ users.surname }} {{users.name}}</h2>
<p>Vous êtes {% if users.end_adhesion != None %}<span class="label label-success"> <div align="center">
un {{ users.class_name | lower}}</span>{% else %}<span class="label label-danger"> <h2>Bienvenue {{users.name}} {{ users.surname }}</h2>
non adhérent</span>{% endif %} et votre connexion est {% if users.has_access %} </div>
<span class="label label-success">active</span>{% else %}<span class="label label-danger">désactivée</span>{% endif %}.</p> <div class="dashboard_container">
{% if user_solde %} <div class="row">
<p>Votre solde est de <span class="badge">{{ users.solde }}€</span>. {% if solde_activated %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:credit-solde' users.pk%}"> <div class="col-sm-6 col-md-4">
<i class="fa fa-euro-sign"></i> {% else %}
Recharger <div class="col-sm-6 col-md-6">
</a> {% endif %}
</p> <div class="col-12">
{% endif %} {% if users.is_adherent %}
<div class="panel panel-success">
<div class="panel-heading dashboard">Connécté</div>
<div class="panel-body dashboard"><i class="text-success">Fin de connexion: {{user.end_adhesion|date:"d M Y"}}</i></div>
</div>
{% else %}
<div class="panel panel-danger">
<div class="panel-heading dashboard">Non connécté</div>
<div class="panel-body dashboard">
<a class="btn btn-danger btn-sm" role="button" href="{% url 'cotisations:credit-solde' users.id %}">
<i class="fas fa-sign-in-alt"></i>
Adhérer
</a>
</div>
</div>
{% endif %}
</div>
</div>
{% if solde_activated %}
<div class="col-sm-6 col-md-4">
<div class="col-12">
<div class="col-12">
<div class="panel panel-info">
<div class="panel-heading dashboard">{{user.solde}} <i class="fas fa-euro-sign"></i></div>
<div class="panel-body dashboard">
<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:credit-solde' users.id %}">
<i class="fa fa-euro-sign"></i>
Modifier le solde
</a>
</div>
</div>
</div>
</div>
</div>
{% endif %}
{% if solde_activated %}
<div class="col-sm-6 col-md-4">
{% else %}
<div class="col-sm-6 col-md-6">
{% endif %}
<div class="col-12">
{% if nb_machines %}
<div class="panel panel-info">
<div class="panel-heading dashboard">
<span class="badge">{{nb_machines}}</span>
Machines
<i class="fa fa-desktop"></i>
</div>
<div class="panel-body dashboard">
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:new-machine' users.id %}">
<i class="fa fa-desktop"></i>
Ajouter une machine
</a>
</div>
</div>
{% else %}
<div class="panel panel-warning">
<div class="panel-heading dashboard">Aucune machine</div>
<div class="panel-body dashboard">
<a class="btn btn-warning btn-sm" role="button" href="{% url 'machines:new-machine' users.id %}">
<i class="fa fa-desktop"></i>
Ajouter une machine
</a>
</div>
</div>
{% endif %}
</div>
</div>
</div>
</div>
<div class="panel-group" id="accordion"> <div class="panel-group" id="accordion">
<div class="panel panel-default"> <div class="panel panel-default">