2019-01-08 23:40:59 +00:00
{% extends 'users/sidebar.html' %}
2017-01-15 23:07:42 +00:00
{% comment %}
Re2o est un logiciel d'administration développé initiallement au rezometz. Il
se veut agnostique au réseau considéré, de manière à être installable en
quelques clics.
2020-04-17 14:48:27 +00:00
Copyright © 2017-2020 Gabriel Détraz
Copyright © 2017-2020 Lara Kermarec
Copyright © 2017-2020 Augustin Lemesle
Copyright © 2017-2020 Hugo Levy--Falk
Copyright © 2017-2020 Jean-Romain Garnier
2017-01-15 23:07:42 +00:00
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
{% endcomment %}
2017-12-27 23:10:30 +00:00
{% load acl %}
2018-07-19 10:30:15 +00:00
{% load logs_extra %}
2018-07-30 15:00:41 +00:00
{% load design %}
2018-08-14 10:21:58 +00:00
{% load i18n %}
2018-07-25 18:28:13 +00:00
2018-08-15 17:15:26 +00:00
{% block title %}{% trans "Profile" %}{% endblock %}
2018-06-15 09:00:12 +00:00
2018-07-25 18:28:13 +00:00
{% block content %}
2018-08-10 15:15:03 +00:00
< div align = "center" class = "title-dashboard" >
2018-08-10 11:05:13 +00:00
{% if user == users %}
2018-08-15 17:15:26 +00:00
< h2 > {% blocktrans with name=users.name surname=users.surname %}Welcome {{ name }} {{ surname }}{% endblocktrans %}< / h2 >
2018-08-10 11:05:13 +00:00
{% else %}
2018-08-15 17:15:26 +00:00
< h2 > {% blocktrans with name=users.name surname=users.surname %}Profile of {{ name }} {{ surname }}{% endblocktrans %}< / h2 >
2018-08-10 11:05:13 +00:00
{% endif %}
2018-06-15 09:00:12 +00:00
< / div >
2020-04-16 22:24:35 +00:00
2020-04-17 15:35:24 +00:00
{% if users.email_state == users.EMAIL_STATE_PENDING %}
2020-04-17 00:16:56 +00:00
< div class = "alert alert-warning" >
2020-04-17 12:54:28 +00:00
{% blocktrans with confirm_before_date=users.confirm_email_before_date|date:"DATE_FORMAT" %}Please confirm your email address before {{ confirm_before_date }}, or your account will be suspended.{% endblocktrans %}
2020-04-17 00:16:56 +00:00
< br / >
< a href = "{% url 'users:resend-confirmation-email' users.id %}" >
{% blocktrans %}Didn't receive the email?{% endblocktrans %}
< / a >
< / div >
2020-04-17 15:35:24 +00:00
{% elif users.email_state == users.EMAIL_STATE_UNVERIFIED %}
2020-04-17 00:16:56 +00:00
< div class = "alert alert-danger" >
2020-04-17 15:35:24 +00:00
{% blocktrans %}Your account has been suspended, please confirm your email address.{% endblocktrans %}
2020-04-17 00:16:56 +00:00
< / div >
{% endif %}
2020-04-16 22:24:35 +00:00
2018-06-15 09:00:12 +00:00
< div class = "dashboard_container" >
2018-07-25 18:28:13 +00:00
< div class = "row" >
2018-07-25 18:46:48 +00:00
< div class = "col-sm-6 {% if solde_activated %}col-md-4{% else %}col_md-6{% endif %}" >
2018-07-25 18:28:13 +00:00
{% if users.is_ban%}
< div class = "panel panel-danger" >
2019-11-20 00:52:11 +00:00
< div class = "panel-heading dashboard" > {% trans "Your account has been banned." %}< / div >
2018-07-25 18:28:13 +00:00
< div class = "panel-body dashboard" >
2019-01-08 23:40:59 +00:00
< i class = "text-danger" > {% blocktrans with end_ban_date=users.end_ban|date:"SHORT_DATE_FORMAT" %}End of the ban: {{ end_ban_date }}{% endblocktrans %}< / i >
2018-07-25 18:28:13 +00:00
< / div >
< / div >
2018-08-23 00:54:28 +00:00
{% elif not users.has_access %}
2018-07-25 18:28:13 +00:00
< div class = "panel panel-danger" >
2018-08-15 17:15:26 +00:00
< div class = "panel-heading dashboard" > {% trans "No connection" %}< / div >
2020-04-17 20:20:45 +00:00
2018-08-31 20:25:38 +00:00
< div class = "panel-body dashboard" >
2020-04-17 20:20:45 +00:00
{% if users.email_state == users.EMAIL_STATE_UNVERIFIED %}
< a class = "btn btn-danger btn-sm" role = "button" href = "{% url 'users:resend-confirmation-email' users.id %}" >
< i class = "fa fa-sign-in" > < / i > {% trans "Resend the email" %}
< / a >
{% else %}
{% can_create Facture %}
< a class = "btn btn-danger btn-sm" role = "button" href = "{% url 'cotisations:new-facture' users.id %}" >
< i class = "fa fa-sign-in" > < / i > {% trans "Pay for a connection" %}
< / a >
{% acl_else %}
{% trans "Ask someone with the appropriate rights to pay for a connection." %}
{% acl_end %}
{% endif %}
2018-07-25 18:28:13 +00:00
< / div >
2018-06-15 09:00:12 +00:00
< / div >
2018-06-16 07:57:21 +00:00
{% else %}
2018-07-25 18:28:13 +00:00
< div class = "panel panel-success" >
2019-01-08 23:40:59 +00:00
< div class = "panel-heading dashboard" > {% blocktrans with end_connection_date=users.end_access|date:"SHORT_DATE_FORMAT" %}Connection (until {{ end_connection_date }} ){% endblocktrans %}< / div >
2018-07-25 18:28:13 +00:00
< div class = "panel-body dashboard" >
2018-08-23 00:54:28 +00:00
{% can_create Facture %}
< a class = "btn btn-success btn-sm" role = "button" href = "{% url 'cotisations:new-facture' users.id %}" >
2018-09-19 11:37:10 +00:00
< i class = "fa fa-sign-in" > < / i > {% trans "Extend the connection period" %}
2018-08-23 00:54:28 +00:00
< / a >
{% acl_end %}
2018-07-25 18:28:13 +00:00
< / div >
< / div >
2018-06-15 09:00:12 +00:00
{% endif %}
2018-07-25 18:28:13 +00:00
< / div >
{% if solde_activated %}
< div class = "col-sm-6 col-md-4" >
2018-06-15 09:00:12 +00:00
< div class = "panel panel-info" >
2018-12-30 14:36:15 +00:00
< div class = "panel-heading dashboard" data-parent = "#accordion" data-toggle = "collapse"
data-target="#subscriptions">
{{ users.solde }} < i class = "fa fa-eur" > < / i >
2018-07-25 18:28:13 +00:00
< / div >
2018-06-15 09:00:12 +00:00
< div class = "panel-body dashboard" >
< a class = "btn btn-primary btn-sm" role = "button" href = "{% url 'cotisations:credit-solde' users.id %}" >
2018-09-19 15:11:52 +00:00
< i class = "fa fa-eur" > < / i > {% trans "Refill the balance" %}
2018-06-15 09:00:12 +00:00
< / a >
2018-07-25 18:28:13 +00:00
< / div >
2018-06-15 09:00:12 +00:00
< / div >
< / div >
2018-07-25 18:28:13 +00:00
{% endif %}
2018-07-25 18:46:48 +00:00
< div class = "col-sm-6 {% if solde_activated %}col-md-4{% else %}col-md-6{% endif %}" >
2018-07-25 18:43:28 +00:00
{% if nb_machines %}
< div class = "panel panel-info" >
2018-12-30 14:36:15 +00:00
< div class = "panel-heading dashboard" data-parent = "#accordion" data-toggle = "collapse"
data-target="#machines">
2019-11-20 00:52:11 +00:00
< i class = "fa fa-desktop" > < / i > {% trans "Machines" %} < span class = "badge" > {{ nb_machines }}< / span >
2018-07-25 18:28:13 +00:00
< / div >
2018-07-25 18:43:28 +00:00
< div class = "panel-body dashboard" >
< a class = "btn btn-primary btn-sm" role = "button" href = "{% url 'machines:new-machine' users.id %}" >
2019-11-20 00:52:11 +00:00
< i class = "fa fa-desktop" > < / i > {% trans "Add a machine" %}
2018-07-25 18:43:28 +00:00
< / a >
2018-07-25 18:28:13 +00:00
< / div >
2018-06-15 09:00:12 +00:00
< / div >
2018-07-25 18:43:28 +00:00
{% else %}
< div class = "panel panel-warning" >
2018-12-30 14:36:15 +00:00
< div class = "panel-heading dashboard" data-parent = "#accordion" data-toggle = "collapse"
data-target="#machines">
{% trans "No machine" %}
< / div >
2018-07-25 18:43:28 +00:00
< div class = "panel-body dashboard" >
< a class = "btn btn-warning btn-sm" role = "button" href = "{% url 'machines:new-machine' users.id %}" >
2019-11-20 00:52:11 +00:00
< i class = "fa fa-desktop" > < / i > {% trans "Add a machine" %}
2018-07-25 18:43:28 +00:00
< / a >
< / div >
< / div >
{% endif %}
2018-06-15 09:00:12 +00:00
< / div >
2018-08-14 08:11:53 +00:00
< / div >
2018-06-15 09:00:12 +00:00
< / div >
2019-07-10 08:28:16 +00:00
2018-01-27 20:58:31 +00:00
< div class = "panel-group" id = "accordion" >
2018-03-17 22:52:01 +00:00
< div class = "panel panel-default" >
2018-12-30 11:06:20 +00:00
< div class = "panel-heading clearfix profil" data-parent = "#accordion" data-toggle = "collapse"
2018-12-30 14:36:15 +00:00
data-target="#information">
2018-12-30 11:06:20 +00:00
< h3 class = "panel-title pull-left" >
2019-11-20 00:52:11 +00:00
< i class = "fa fa-user" > < / i > {% trans "Detailed information" %}
2018-01-27 16:35:33 +00:00
< / h3 >
2018-03-29 21:43:43 +00:00
< / div >
2018-12-30 14:36:15 +00:00
< div class = "panel-collapse collapse collapse-default" id = "information" >
2018-12-30 11:06:20 +00:00
< div class = "panel-body" >
< a class = "btn btn-primary btn-sm" role = "button" href = "{% url 'users:edit-info' users.id %}" >
< i class = "fa fa-edit" > < / i >
{% trans "Edit" %}
< / a >
< a class = "btn btn-primary btn-sm" role = "button" href = "{% url 'users:password' users.id %}" >
< i class = "fa fa-lock" > < / i >
{% trans "Change the password" %}
< / a >
{% can_change User state %}
< a class = "btn btn-primary btn-sm" role = "button" href = "{% url 'users:state' users.id %}" >
< i class = "fa fa-id-badge" > < / i >
{% trans "Change the state" %}
< / a >
{% acl_end %}
{% can_change User groups %}
< a class = "btn btn-primary btn-sm" role = "button" href = "{% url 'users:groups' users.id %}" >
< i class = "fa fa-check" > < / i >
{% trans "Edit the groups" %}
< / a >
{% acl_end %}
2020-04-25 10:31:18 +00:00
{% history_button users text=True %}
2018-01-27 20:58:31 +00:00
< / ul >
< / div >
2018-07-19 10:30:15 +00:00
< div class = "panel-body" >
2018-12-30 11:06:20 +00:00
< dl class = "dl-horizontal row profile-info" >
< div class = "col-md-6" >
2018-08-15 17:15:26 +00:00
{% if users.is_class_club %}
2018-12-30 11:06:20 +00:00
< dt > {% trans "Mailing" %}< / dt >
{% if users.club.mailing %}
< dd > {{ users.pseudo }}(-admin)< / dd >
{% else %}
< dd > {% trans "Mailing disabled" %}< / dd >
{% endif %}
{% else %}
2019-01-08 23:40:59 +00:00
< dt > {% trans "First name" %}< / dt >
2018-12-30 11:06:20 +00:00
< dd > {{ users.name }}< / dd >
{% endif %}
< / div >
< div class = "col-md-6" >
< dt > {% trans "Surname" %}< / dt >
< dd > {{ users.surname }}< / dd >
< / div >
< div class = "col-md-6" >
< dt > {% trans "Username" %}< / dt >
< dd > {{ users.pseudo }}< / dd >
< / div >
2020-05-17 10:51:05 +00:00
{% if users.image_url %}
< div class = "col-md-6" >
< dt > {% trans "Profile picture" %}< / dt >
< dd > < img src = "{{ users.image_url }}" height = "42" width = "42" / > < / dd >
< / div >
{% endif %}
2018-12-30 11:06:20 +00:00
< div class = "col-md-6" >
< dt > {% trans "Email address" %}< / dt >
2020-04-17 16:16:53 +00:00
< dd > < a href = "mailto:{{ users.email }}" > {{ users.email }}< / a > {% if users.email_state != users.EMAIL_STATE_VERIFIED %}< br / > < i class = "text-warning" > {% trans "Pending confirmation..." %}< / i > {% endif %}< / dd >
2018-12-30 11:06:20 +00:00
< / div >
< div class = "col-md-6" >
< dt > {% trans "Room" %}< / dt >
< dd >
2019-09-20 19:45:48 +00:00
{{ users.room }} {% if users.room.port_set.all %}{% can_view_all Port %}/
{{ users.room.port_set.all|join:", " }} {% acl_else %}
< i class = "text-success" > {% trans "Connected" %}< / i > {% acl_end %}
{% else %}{% if users.room %}< i class = "text-danger" > {% trans "Pending connection..." %}< / i > {% endif %}
{% endif %}
< / dd >
2018-12-30 11:06:20 +00:00
< / div >
< div class = "col-md-6" >
< dt > {% trans "Telephone number" %}< / dt >
< dd > {{ users.telephone }}< / dd >
< / div >
< div class = "col-md-6" >
< dt > {% trans "School" %}< / dt >
< dd > {{ users.school }}< / dd >
< / div >
< div class = "col-md-6" >
< dt > {% trans "Comment" %}< / dt >
< dd > {{ users.comment }}< / dd >
< / div >
< div class = "col-md-6" >
< dt > {% trans "Registration date" %}< / dt >
< dd > {{ users.registered }}< / dd >
< / div >
< div class = "col-md-6" >
< dt > {% trans "Last login" %}< / dt >
< dd > {{ users.last_login }}< / dd >
< / div >
< div class = "col-md-6" >
< dt > {% trans "End of membership" %}< / dt >
2018-08-15 17:15:26 +00:00
{% if users.end_adhesion != None %}
2018-12-30 11:06:20 +00:00
< dd > < i class = "text-success" > {{ users.end_adhesion }}< / i > < / dd >
2018-08-15 17:15:26 +00:00
{% else %}
2019-11-20 00:52:11 +00:00
< dd > < i class = "text-danger" > {% trans "Not a member" %}< / i > < / dd >
2018-08-15 17:15:26 +00:00
{% endif %}
2018-12-30 11:06:20 +00:00
< / div >
< div class = "col-md-6" >
< dt > {% trans "Whitelist" %}< / dt >
2018-08-15 17:15:26 +00:00
{% if users.end_whitelist != None %}
2018-12-30 11:06:20 +00:00
< dd > < i class = "text-success" > {{ users.end_whitelist }}< / i > < / dd >
2018-08-15 17:15:26 +00:00
{% else %}
2018-12-30 11:06:20 +00:00
< dd > < i class = "text-warning" > {% trans "None" %}< / i > < / dd >
2018-08-15 17:15:26 +00:00
{% endif %}
2018-12-30 11:06:20 +00:00
< / div >
< div class = "col-md-6" >
< dt > {% trans "Ban" %}< / dt >
2018-08-15 17:15:26 +00:00
{% if users.end_ban != None %}
2018-12-30 11:06:20 +00:00
< dd > < i class = "text-danger" > {{ users.end_ban }}< / i > < / dd >
2018-08-15 17:15:26 +00:00
{% else %}
2018-12-30 11:06:20 +00:00
< dd > < i class = "text-success" > {% trans "Not banned" %}< / i > < / dd >
2018-08-15 17:15:26 +00:00
{% endif %}
2018-12-30 11:06:20 +00:00
< / div >
< div class = "col-md-6" >
< dt > {% trans "State" %}< / dt >
2018-08-15 17:15:26 +00:00
{% if users.state == 0 %}
2018-12-30 11:06:20 +00:00
< dd > < i class = "text-success" > {% trans "Active" %}< / i > < / dd >
2018-08-15 17:15:26 +00:00
{% elif users.state == 1 %}
2018-12-30 11:06:20 +00:00
< dd > < i class = "text-warning" > {% trans "Disabled" %}< / i > < / dd >
2018-08-30 15:25:15 +00:00
{% elif users.state == 2 %}
2018-12-30 11:06:20 +00:00
< dd > < i class = "text-danger" > {% trans "Archived" %}< / i > < / dd >
2018-08-30 15:25:15 +00:00
{% elif users.state == 3 %}
2019-11-20 00:52:11 +00:00
< dd > < i class = "text-danger" > {% trans "Not yet active" %}< / i > < / dd >
2019-03-17 02:00:28 +00:00
{% elif users.state == 4 %}
2019-11-20 00:52:11 +00:00
< dd > < i class = "text-danger" > {% trans "Fully archived" %}< / i > < / dd >
2018-08-15 17:15:26 +00:00
{% endif %}
2018-12-30 11:06:20 +00:00
< / div >
< div class = "col-md-6" >
< dt > {% trans "Internet access" %}< / dt >
2018-08-15 17:15:26 +00:00
{% if users.has_access == True %}
2018-12-30 11:06:20 +00:00
< dd > < i class = "text-success" >
2019-01-08 23:40:59 +00:00
{% blocktrans with end_access=users.end_access %}Active (until {{ end_access }}){% endblocktrans %}< / i > < / dd >
2018-08-15 17:15:26 +00:00
{% else %}
2018-12-30 11:06:20 +00:00
< dd > < i class = "text-danger" > {% trans "Disabled" %}< / i > < / dd >
2018-08-15 17:15:26 +00:00
{% endif %}
2018-12-30 11:06:20 +00:00
< / div >
< div class = "col-md-6" >
< dt > {% trans "Groups of rights" %}< / dt >
2018-08-15 17:15:26 +00:00
{% if users.groups.all %}
2018-12-30 11:06:20 +00:00
< dd > {{ users.groups.all|join:", " }}< / dd >
2018-08-15 17:15:26 +00:00
{% else %}
2018-12-30 11:06:20 +00:00
< dd > {% trans "None" %}< / dd >
2018-08-15 17:15:26 +00:00
{% endif %}
2018-12-30 11:06:20 +00:00
< / div >
< div class = "col-md-6" >
< dt > {% trans "Balance" %}< / dt >
< dd >
{{ users.solde }} €
{% if user_solde %}
< a class = "btn btn-primary btn-sm" style = 'float:right' role = "button"
href="{% url 'cotisations:credit-solde' users.pk %}">
< i class = "fa fa-eur" > < / i >
{% trans "Refill" %}
< / a >
{% endif %}
< / dd >
< / div >
2018-12-30 11:35:41 +00:00
{% if users.adherent.gpg_fingerprint %}
< div class = "col-md-6 col-xs-12" >
2018-12-30 11:06:20 +00:00
< dt > {% trans "GPG fingerprint" %}< / dt >
< dd > {{ users.adherent.gpg_fingerprint }}< / dd >
2018-12-30 11:35:41 +00:00
< / div >
{% endif %}
2018-12-30 11:06:20 +00:00
2018-12-30 11:35:41 +00:00
{% if users.shell %}
< div class = "col-md-6 col-xs-12" >
2018-12-30 11:06:20 +00:00
< dt > {% trans "Shell" %}< / dt >
< dd > {{ users.shell }}< / dd >
2018-12-30 11:35:41 +00:00
< / div >
{% endif %}
2019-09-20 12:48:37 +00:00
< div class = "col-md-6 col-xs-12" >
< dt > {% trans "Shortcuts enabled" %}< / dt >
< dd > {{ users.shortcuts_enabled | tick }}< / dd >
< / div >
2018-12-30 11:06:20 +00:00
< / dl >
2018-01-27 16:35:33 +00:00
< / div >
< / div >
< / div >
2017-12-29 17:32:57 +00:00
{% if users.is_class_club %}
2018-01-27 16:35:33 +00:00
< div class = "panel panel-default" >
2019-01-12 07:18:57 +00:00
< div class = "panel-heading clearfix profil" data-parent = "#accordion" data-toggle = "collapse" data-target = "#club" >
2018-01-27 20:58:31 +00:00
< h3 class = "panel-title pull-left" >
2019-11-20 00:52:11 +00:00
< i class = "fa fa-users" > < / i > {% trans "Manage the club" %}
2018-01-27 16:35:33 +00:00
< / h3 >
2018-01-27 20:58:31 +00:00
< / div >
2018-12-30 14:36:15 +00:00
< div class = "panel-collapse collapse" id = "club" >
2018-01-27 20:58:31 +00:00
< div class = "panel-body" >
2019-01-12 07:18:57 +00:00
< a class = "btn btn-primary btn-sm" role = "button"
href="{% url 'users:edit-club-admin-members' users.club.id %}">
2018-03-29 21:43:43 +00:00
< i class = "fa fa-lock" > < / i >
2019-01-12 07:18:57 +00:00
{% trans "Manage the admins and members" %}
< / a >
2018-03-29 21:43:43 +00:00
< / div >
2018-08-15 17:15:26 +00:00
< div class = "panel-body" >
< h4 > {% trans "Club admins" %}< / h4 >
2018-03-17 23:09:57 +00:00
< div class = "table-responsive" >
2018-07-19 10:30:15 +00:00
< table class = "table table-striped" >
< thead >
< tr >
2018-08-15 17:15:26 +00:00
< th > {% trans "Surname" %}< / th >
< th > {% trans "First name" %}< / th >
< th > {% trans "Username" %}< / th >
2018-07-19 10:30:15 +00:00
< / tr >
< / thead >
{% for admin in users.club.administrators.all %}
2018-01-27 16:35:33 +00:00
< tr >
2018-07-19 10:30:15 +00:00
< td > {{ admin.surname }}< / td >
< td > {{ admin.name }}< / td >
< td > {{ admin.pseudo }}< / td >
2018-01-27 16:35:33 +00:00
< / tr >
2018-07-19 10:30:15 +00:00
{% endfor %}
< / table >
2018-03-17 23:09:57 +00:00
< / div >
2018-08-15 17:15:26 +00:00
< h4 > {% trans "Members" %}< / h4 >
2018-03-17 23:09:57 +00:00
< div class = "table-responsive" >
2018-07-19 10:30:15 +00:00
< table class = "table table-striped" >
< thead >
< tr >
2018-08-15 17:15:26 +00:00
< th > {% trans "Surname" %}< / th >
< th > {% trans "First name" %}< / th >
< th > {% trans "Username" %}< / th >
2018-07-19 10:30:15 +00:00
< / tr >
< / thead >
{% for admin in users.club.members.all %}
2018-01-27 16:35:33 +00:00
< tr >
2018-07-19 10:30:15 +00:00
< td > {{ admin.surname }}< / td >
< td > {{ admin.name }}< / td >
< td > {{ admin.pseudo }}< / td >
2018-01-27 16:35:33 +00:00
< / tr >
2018-07-19 10:30:15 +00:00
{% endfor %}
< / table >
2018-03-17 23:09:57 +00:00
< / div >
2018-01-27 16:35:33 +00:00
< / div >
< / div >
< / div >
2016-07-04 18:04:11 +00:00
{% endif %}
2018-01-27 16:35:33 +00:00
< div class = "panel panel-default" >
2018-12-30 14:36:15 +00:00
< div class = "panel-heading clearfix profil" data-parent = "#accordion" data-toggle = "collapse"
data-target="#machines">
2018-01-27 20:58:31 +00:00
< h3 class = "panel-title pull-left" >
2018-03-17 22:53:03 +00:00
< i class = "fa fa-desktop" > < / i >
2018-08-15 17:15:26 +00:00
{% trans "Machines" %}
2019-01-08 23:40:59 +00:00
< span class = "badge" > {{ nb_machines }}< / span >
2018-01-27 16:35:33 +00:00
< / h3 >
2018-07-19 10:30:15 +00:00
< / div >
2018-12-30 14:36:15 +00:00
< div id = "machines" class = "panel-collapse collapse" >
2018-03-29 21:43:43 +00:00
< div class = "panel-body" >
2018-08-15 17:15:26 +00:00
< a class = "btn btn-primary btn-sm" role = "button" href = "{% url 'machines:new-machine' users.id %}" >
< i class = "fa fa-desktop" > < / i >
{% trans "Add a machine" %}
2018-03-17 22:52:01 +00:00
< / a >
< / div >
2018-01-27 16:35:33 +00:00
< div class = "panel-body" >
{% if machines_list %}
2019-01-08 23:40:59 +00:00
{% include 'machines/aff_machines.html' with machines_list=machines_list %}
2018-01-27 16:35:33 +00:00
{% else %}
2018-08-15 17:15:26 +00:00
< p > {% trans "No machine" %}< / p >
2018-01-27 16:35:33 +00:00
{% endif %}
< / div >
< / div >
< / div >
< div class = "panel panel-default" >
2018-12-30 14:36:15 +00:00
< div class = "panel-heading clearfix profil" data-parent = "#accordion" data-toggle = "collapse"
data-target="#subscriptions">
2018-01-27 20:58:31 +00:00
< h3 class = "panel-title pull-left" >
2018-09-19 15:11:52 +00:00
< i class = "fa fa-eur" > < / i >
2018-08-15 17:15:26 +00:00
{% trans "Subscriptions" %}
2018-01-27 16:35:33 +00:00
< / h3 >
2018-03-29 21:43:43 +00:00
< / div >
2018-12-30 14:36:15 +00:00
< div id = "subscriptions" class = "panel-collapse collapse" >
2018-03-29 21:43:43 +00:00
< div class = "panel-body" >
{% can_create Facture %}
< a class = "btn btn-primary btn-sm" role = "button" href = "{% url 'cotisations:new-facture' users.id %}" >
2018-09-19 15:11:52 +00:00
< i class = "fa fa-eur" > < / i >
2019-01-08 23:40:59 +00:00
{% trans "Add a subscription" %}
2018-01-27 20:58:31 +00:00
< / a >
{% if user_solde %}
2018-03-29 21:43:43 +00:00
< a class = "btn btn-primary btn-sm" role = "button" href = "{% url 'cotisations:credit-solde' users.id %}" >
2018-09-19 15:11:52 +00:00
< i class = "fa fa-eur" > < / i >
2018-08-15 17:15:26 +00:00
{% trans "Edit the balance" %}
2018-03-29 21:43:43 +00:00
< / a >
2018-07-13 20:23:32 +00:00
{% endif%}
2018-06-17 15:33:49 +00:00
{% acl_end %}
2018-01-27 20:58:31 +00:00
< / div >
2018-01-27 16:35:33 +00:00
< div class = "panel-body" >
{% if facture_list %}
2019-01-08 23:40:59 +00:00
{% include 'cotisations/aff_cotisations.html' with facture_list=facture_list %}
2018-01-27 16:35:33 +00:00
{% else %}
2018-08-15 17:15:26 +00:00
< p > {% trans "No invoice" %}< / p >
2018-01-27 16:35:33 +00:00
{% endif %}
< / div >
< / div >
< / div >
< div class = "panel panel-default" >
2018-12-30 14:36:15 +00:00
< div class = "panel-heading clearfix profil" data-parent = "#accordion" data-toggle = "collapse" data-target = "#bans" >
2018-01-27 20:58:31 +00:00
< h3 class = "panel-title pull-left" >
2018-03-17 22:53:03 +00:00
< i class = "fa fa-ban" > < / i >
2018-08-15 17:15:26 +00:00
{% trans "Bans" %}
2018-01-27 16:35:33 +00:00
< / h3 >
2018-07-19 10:30:15 +00:00
< / div >
2018-12-30 14:36:15 +00:00
< div id = "bans" class = "panel-collapse collapse" >
2018-08-15 17:15:26 +00:00
< div class = "panel-body" >
{% can_create Ban %}
< a class = "btn btn-primary btn-sm" role = "button" href = "{% url 'users:add-ban' users.id %}" >
< i class = "fa fa-ban" > < / i >
{% trans "Add a ban" %}
2018-03-17 22:52:01 +00:00
< / a >
2018-03-29 21:43:43 +00:00
{% acl_end %}
2018-01-27 20:58:31 +00:00
< / div >
2018-01-27 16:35:33 +00:00
< div class = "panel-body" >
{% if ban_list %}
2019-01-08 23:40:59 +00:00
{% include 'users/aff_bans.html' with ban_list=ban_list %}
2018-01-27 16:35:33 +00:00
{% else %}
2018-08-15 17:15:26 +00:00
< p > {% trans "No ban" %}< / p >
2018-01-27 16:35:33 +00:00
{% endif %}
< / div >
< / div >
< / div >
< div class = "panel panel-default" >
2018-12-30 14:36:15 +00:00
< div class = "panel-heading clearfix profil" data-parent = "#accordion" data-toggle = "collapse" data-target = "#whitelists" >
2018-01-27 20:58:31 +00:00
< h3 class = "panel-title pull-left" >
2018-03-17 22:53:03 +00:00
< i class = "fa fa-check-circle" > < / i >
2018-08-15 17:15:26 +00:00
{% trans "Whitelists" %}
2018-01-27 16:35:33 +00:00
< / h3 >
2018-03-29 21:43:43 +00:00
< / div >
2018-12-30 14:36:15 +00:00
< div id = "whitelists" class = "panel-collapse collapse" >
2018-07-19 10:30:15 +00:00
< div class = "panel-body" >
2018-03-17 22:52:01 +00:00
{% can_create Whitelist %}
2018-08-15 17:15:26 +00:00
< a class = "btn btn-primary btn-sm" role = "button" href = "{% url 'users:add-whitelist' users.id %}" >
< i class = "fa fa-check-circle" > < / i >
{% trans "Grant a whitelist" %}
< / a >
2018-01-27 20:58:31 +00:00
{% acl_end %}
< / div >
2018-01-27 16:35:33 +00:00
< div class = "panel-body" >
{% if white_list %}
2019-01-08 23:40:59 +00:00
{% include 'users/aff_whitelists.html' with white_list=white_list %}
2018-01-27 16:35:33 +00:00
{% else %}
2018-08-15 17:15:26 +00:00
< p > {% trans "No whitelist" %}< / p >
2018-01-27 16:35:33 +00:00
{% endif %}
< / div >
< / div >
< / div >
2018-06-27 21:13:43 +00:00
< div class = "panel panel-default" >
2018-12-30 14:36:15 +00:00
< div class = "panel-heading clearfix profil" data-parent = "#accordion" data-toggle = "collapse" data-target = "#email" >
2018-08-14 10:21:58 +00:00
< h3 class = "panel-title pull-left" >
2019-11-20 00:52:11 +00:00
< i class = "fa fa-envelope" > < / i > {% trans "Email settings" %}
2018-08-14 10:21:58 +00:00
< / h3 >
2018-06-27 21:13:43 +00:00
< / div >
2018-12-30 14:36:15 +00:00
< div id = "email" class = "panel-collapse collapse" >
2018-06-27 21:13:43 +00:00
< div class = "panel-body" >
2018-06-30 12:46:35 +00:00
{% can_edit users %}
2018-07-30 15:00:41 +00:00
< a class = "btn btn-primary btn-sm" role = "button" href = "{% url 'users:edit-email-settings' users.id %}" >
2019-11-20 00:52:11 +00:00
< i class = "fa fa-pencil" > < / i > {% trans "Edit email settings" %}
2018-07-30 15:00:41 +00:00
< / a >
2018-06-27 21:13:43 +00:00
{% acl_end %}
2018-07-30 15:00:41 +00:00
< / div >
< div class = "panel-body" >
{% if local_email_accounts_enabled %}
< div class = "table-responsive" >
< table class = "table" >
< tr >
2018-08-15 17:15:26 +00:00
< th colspan = "2" > {% trans "Contact email address" %}< / th >
2018-08-14 10:21:58 +00:00
< td colspan = "2" > {{ users.get_mail }}< / td >
2018-07-30 15:00:41 +00:00
< / tr >
< tr >
2018-08-15 17:15:26 +00:00
< th > {% trans "Enable the local email account" %}< / th >
2018-07-30 15:00:41 +00:00
< td > {{ users.local_email_enabled | tick }}< / td >
2018-08-15 17:15:26 +00:00
< th > {% trans "Enable the local email redirection" %}< / th >
2018-08-14 10:21:58 +00:00
< td > {{ users.local_email_redirect | tick }}< / td >
< / tr >
< / table >
2019-11-20 00:52:11 +00:00
< p > {% trans "The contact email address is the email address to which we send emails to contact you. If you would like to use your external email address for that, you can either disable your local email address or enable the local email redirection." %}< / p >
2018-08-14 10:21:58 +00:00
< / div >
{% if users.local_email_enabled %}
2018-08-01 11:06:25 +00:00
{% can_create EMailAddress users.id %}
< a class = "btn btn-primary btn-sm" role = "button" href = "{% url 'users:add-emailaddress' users.id %}" >
2019-11-20 00:52:11 +00:00
< i class = "fa fa-plus-square" > < / i > {% trans "Add an email address" %}
2018-07-30 15:00:41 +00:00
< / a >
2018-06-27 21:13:43 +00:00
{% acl_end %}
2018-08-01 11:06:25 +00:00
{% if emailaddress_list %}
2019-01-08 23:40:59 +00:00
{% include 'users/aff_emailaddress.html' with emailaddress_list=emailaddress_list %}
2018-06-27 21:13:43 +00:00
{% endif %}
2018-07-30 15:00:41 +00:00
{% endif %}
{% else %}
< div class = "table-responsive" >
< table class = "table" >
< tr >
2018-08-15 17:15:26 +00:00
< th > {% trans "Contact email address" %}< / th >
2018-08-14 10:21:58 +00:00
< td > {{ users.get_mail }}< / td >
2018-07-30 15:00:41 +00:00
< / tr >
< / table >
< / div >
{% endif %}
< / div >
2018-06-27 21:13:43 +00:00
< / div >
< / div >
2019-07-25 14:44:40 +00:00
{% for template in optionnal_templates_list %}
{{ template }}
{% endfor %}
2018-01-27 16:35:33 +00:00
< / div >
2016-07-03 16:09:58 +00:00
{% endblock %}
2018-08-15 17:15:26 +00:00