{% extends 'users/sidebar.html' %} {% 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. 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 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 %} {% load acl %} {% load logs_extra %} {% load design %} {% load i18n %} {% block title %}{% trans "Profile" %}{% endblock %} {% block content %}
{% if user == users %}

{% blocktrans with name=users.name surname=users.surname %}Welcome {{ name }} {{ surname }}{% endblocktrans %}

{% else %}

{% blocktrans with name=users.name surname=users.surname %}Profile of {{ name }} {{ surname }}{% endblocktrans %}

{% endif %}
{% if users.email_state == users.EMAIL_STATE_PENDING %}
{% 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 %}
{% blocktrans %}Didn't receive the email?{% endblocktrans %}
{% elif users.email_state == users.EMAIL_STATE_UNVERIFIED %}
{% blocktrans %}Your account has been suspended, please confirm your email address.{% endblocktrans %}
{% endif %}
{% if users.is_ban%}
{% trans "Your account has been banned." %}
{% blocktrans with end_ban_date=users.end_ban|date:"SHORT_DATE_FORMAT" %}End of the ban: {{ end_ban_date }}{% endblocktrans %}
{% elif not users.has_access %}
{% trans "No connection" %}
{% if users.email_state == users.EMAIL_STATE_UNVERIFIED %} {% trans "Resend the email" %} {% else %} {% can_create Facture %} {% trans "Pay for a connection" %} {% acl_else %} {% trans "Ask someone with the appropriate rights to pay for a connection." %} {% acl_end %} {% endif %}
{% else %}
{% blocktrans with end_connection_date=users.end_access|date:"SHORT_DATE_FORMAT" %}Connection (until {{ end_connection_date }} ){% endblocktrans %}
{% can_create Facture %} {% trans "Extend the connection period" %} {% acl_end %}
{% endif %}
{% if solde_activated %} {% endif %}
{% if nb_machines %}
{% trans "Machines" %} {{ nb_machines }}
{% else %}
{% trans "No machine" %}
{% endif %}

{% trans "Detailed information" %}

{% trans "Edit" %} {% trans "Change the password" %} {% can_change User state %} {% trans "Change the state" %} {% acl_end %} {% can_change User groups %} {% trans "Edit the groups" %} {% acl_end %} {% trans "Change theme" %} {% history_button users text=True %}
{% if users.is_class_club %}
{% trans "Mailing" %}
{% if users.club.mailing %}
{{ users.pseudo }}(-admin)
{% else %}
{% trans "Mailing disabled" %}
{% endif %} {% else %}
{% trans "First name" %}
{{ users.name }}
{% endif %}
{% trans "Surname" %}
{{ users.surname }}
{% trans "Username" %}
{{ users.pseudo }}
{% if users.image_url %}
{% trans "Profile picture" %}
{% endif %}
{% trans "Email address" %}
{{ users.email }}{% if users.email_state != users.EMAIL_STATE_VERIFIED %}
{% trans "Pending confirmation..." %}{% endif %}
{% trans "Room" %}
{{ users.room }} {% if users.room.port_set.all %}{% can_view_all Port %}/ {{ users.room.port_set.all|join:", " }} {% acl_else %} {% trans "Connected" %}{% acl_end %} {% else %}{% if users.room %}{% trans "Pending connection..." %}{% endif %} {% endif %}
{% trans "Telephone number" %}
{{ users.telephone }}
{% trans "School" %}
{{ users.school }}
{% trans "Comment" %}
{{ users.comment }}
{% trans "Registration date" %}
{{ users.registered }}
{% trans "Last login" %}
{{ users.last_login }}
{% trans "End of membership" %}
{% if users.end_adhesion != None %}
{{ users.end_adhesion }}
{% else %}
{% trans "Not a member" %}
{% endif %}
{% trans "Whitelist" %}
{% if users.end_whitelist != None %}
{{ users.end_whitelist }}
{% else %}
{% trans "None" %}
{% endif %}
{% trans "Ban" %}
{% if users.end_ban != None %}
{{ users.end_ban }}
{% else %}
{% trans "Not banned" %}
{% endif %}
{% trans "State" %}
{% if users.state == 0 %}
{% trans "Active" %}
{% elif users.state == 1 %}
{% trans "Disabled" %}
{% elif users.state == 2 %}
{% trans "Archived" %}
{% elif users.state == 3 %}
{% trans "Not yet active" %}
{% elif users.state == 4 %}
{% trans "Fully archived" %}
{% endif %}
{% trans "Internet access" %}
{% if users.has_access == True %}
{% blocktrans with end_access=users.end_access %}Active (until {{ end_access }}){% endblocktrans %}
{% else %}
{% trans "Disabled" %}
{% endif %}
{% trans "Groups of rights" %}
{% if users.groups.all %}
{{ users.groups.all|join:", " }}
{% else %}
{% trans "None" %}
{% endif %}
{% trans "Balance" %}
{{ users.solde }} € {% if user_solde %} {% trans "Refill" %} {% endif %}
{% if users.adherent.gpg_fingerprint %}
{% trans "GPG fingerprint" %}
{{ users.adherent.gpg_fingerprint }}
{% endif %} {% if users.shell %}
{% trans "Shell" %}
{{ users.shell }}
{% endif %}
{% trans "Shortcuts enabled" %}
{{ users.shortcuts_enabled | tick }}
{% trans "Theme" %}
{{ request.user.theme_name }}
{% if users.is_class_club %}

{% trans "Manage the club" %}

{% trans "Club admins" %}

{% for admin in users.club.administrators.all %} {% endfor %}
{% trans "Surname" %} {% trans "First name" %} {% trans "Username" %}
{{ admin.surname }} {{ admin.name }} {{ admin.pseudo }}

{% trans "Members" %}

{% for admin in users.club.members.all %} {% endfor %}
{% trans "Surname" %} {% trans "First name" %} {% trans "Username" %}
{{ admin.surname }} {{ admin.name }} {{ admin.pseudo }}
{% endif %} {% for template in apps_templates_list %} {{ template }} {% endfor %}

{% trans "Bans" %}

{% can_create Ban %} {% trans "Add a ban" %} {% acl_end %}
{% if ban_list %} {% include 'users/aff_bans.html' with ban_list=ban_list %} {% else %}

{% trans "No ban" %}

{% endif %}

{% trans "Whitelists" %}

{% can_create Whitelist %} {% trans "Grant a whitelist" %} {% acl_end %}
{% if white_list %} {% include 'users/aff_whitelists.html' with white_list=white_list %} {% else %}

{% trans "No whitelist" %}

{% endif %}

{% trans "Email settings" %}

{% can_edit users %} {% trans "Edit email settings" %} {% acl_end %}
{% if local_email_accounts_enabled %}
{% trans "Contact email address" %} {{ users.get_mail }}
{% trans "Enable the local email account" %} {{ users.local_email_enabled | tick }} {% trans "Enable the local email redirection" %} {{ users.local_email_redirect | tick }}

{% 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." %}

{% if users.local_email_enabled %} {% can_create EMailAddress users.id %} {% trans "Add an email address" %} {% acl_end %} {% if emailaddress_list %} {% include 'users/aff_emailaddress.html' with emailaddress_list=emailaddress_list %} {% endif %} {% endif %} {% else %}
{% trans "Contact email address" %} {{ users.get_mail }}
{% endif %}
{% endblock %}