{% 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 Gabriel Détraz Copyright © 2017 Goulven Kermarec Copyright © 2017 Augustin Lemesle 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.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" %}
{% can_create Facture %} {% trans "Pay for a connection" %} {% acl_else %} {% trans "Ask for someone with the appropriate rights to pay for a connection." %} {% acl_end %}
{% 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 %} {% 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 }}
{% trans "Email address" %}
{{ users.email }}
{% trans "Room" %}
{{ users.room }} {% can_view_all Port %}{% if users.room.port_set.all %} / {{ users.room.port_set.all|join:", " }} {% endif %}{% acl_end %}
{% 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 member" %}
{% 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 %}
{% 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 %}

{% trans "Machines" %} {{ nb_machines }}

{% if machines_list %} {% include 'machines/aff_machines.html' with machines_list=machines_list %} {% else %}

{% trans "No machine" %}

{% endif %}

{% trans "Subscriptions" %}

{% can_create Facture %} {% trans "Add a subscription" %} {% if user_solde %} {% trans "Edit the balance" %} {% endif%} {% acl_end %}
{% if facture_list %} {% include 'cotisations/aff_cotisations.html' with facture_list=facture_list %} {% else %}

{% trans "No invoice" %}

{% endif %}

{% 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 where 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 %}