2016-08-20 23:31:30 +02:00
|
|
|
{% load kfet_tags %}
|
|
|
|
|
2017-06-12 01:51:10 +02:00
|
|
|
|
|
|
|
<aside class="aside {% if account.is_frozen %}frozen-account{% endif %}">
|
|
|
|
|
|
|
|
<div class="heading">
|
|
|
|
<div class="big">{{ account.trigramme }}</div>
|
|
|
|
<div class="toggle">
|
|
|
|
<span class="base">{{ account.balance_ukf }} UKF</span>
|
|
|
|
<span class="hover">{{ account.balance }} €</span>
|
2017-05-30 20:44:30 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-06-12 01:51:10 +02:00
|
|
|
|
|
|
|
<div class="buttons">
|
|
|
|
<a class="btn btn-default" href="{% url 'kfet.account.update' account.trigramme %}">
|
|
|
|
<span class="glyphicon glyphicon-cog"></span><span>Éditer</span>
|
|
|
|
</a>
|
|
|
|
<a class="btn btn-default" disabled>
|
|
|
|
<span class="glyphicon glyphicon-credit-card"></span><span>Créditer</span>
|
|
|
|
</a>
|
2019-05-24 14:30:00 +02:00
|
|
|
{% if perms.kfet.delete_account %}
|
|
|
|
<hr>
|
|
|
|
<button class="btn btn-default" id="button-delete">
|
|
|
|
<span class="glyphicon glyphicon-remove"></span><span>Supprimer</span>
|
|
|
|
</button>
|
|
|
|
<form method="post" action="{% url 'kfet.account.delete' account.trigramme %}" id="account-delete-form">
|
|
|
|
{% csrf_token %}
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
2017-06-12 01:51:10 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="text">
|
|
|
|
<h4>{{ account.name|title }}</h4>
|
|
|
|
<ul class="list-unstyled">
|
|
|
|
{% if perms.kfet.is_team %}
|
|
|
|
<li>{{ account.nickname }}</li>
|
2016-08-20 23:31:30 +02:00
|
|
|
{% endif %}
|
2017-06-12 01:51:10 +02:00
|
|
|
<li>{{ account.email|default:"Pas d'email!" }}</li>
|
|
|
|
<li>{{ account.departement }} {{ account.promo }}</li>
|
|
|
|
<li>
|
|
|
|
{% if account.is_cof %}
|
|
|
|
<span title="Réduction de {{ kfet_config.reduction_cof }} % sur tes commandes" data-toggle="tooltip" data-placement="right">Adhérent COF</span>
|
|
|
|
{% else %}
|
|
|
|
Non-COF
|
|
|
|
{% endif %}
|
|
|
|
</li>
|
|
|
|
</ul>
|
2016-08-20 23:31:30 +02:00
|
|
|
</div>
|
2017-06-12 01:51:10 +02:00
|
|
|
|
2017-05-30 20:44:30 +02:00
|
|
|
{% if account.negative %}
|
2017-06-12 01:51:10 +02:00
|
|
|
<div class="text">
|
|
|
|
<h4>Négatif</h4>
|
|
|
|
<ul class="list-unstyled">
|
|
|
|
{% if account.negative.start %}
|
|
|
|
<li>Depuis le <b>{{ account.negative.start|date:"d/m/Y à H:i" }}</b></li>
|
|
|
|
{% endif %}
|
|
|
|
{% if account.real_balance != account.balance %}
|
|
|
|
<li>Solde réel: {{ account.real_balance }} €</li>
|
|
|
|
{% endif %}
|
|
|
|
<li>
|
|
|
|
Plafond :
|
|
|
|
<b>{{ account.negative.authz_overdraft_amount|default:kfet_config.overdraft_amount }} €</b>
|
|
|
|
jusqu'au
|
|
|
|
<b>{{ account.negative.authz_overdraft_until|default:account.negative.until_default|date:"d/m/Y à H:i" }}</b>
|
|
|
|
</li>
|
|
|
|
</ul>
|
2016-08-20 23:31:30 +02:00
|
|
|
</div>
|
2017-04-07 17:17:36 +02:00
|
|
|
{% endif %}
|
2017-06-12 01:51:10 +02:00
|
|
|
|
|
|
|
</aside>
|
|
|
|
|
|
|
|
|
2017-05-30 20:44:30 +02:00
|
|
|
|
|
|
|
{% if account.user == request.user %}
|
2017-06-12 01:51:10 +02:00
|
|
|
<div class="buttons tabs-buttons">
|
|
|
|
<div>
|
|
|
|
<a class="btn btn-primary-w focus" data-toggle="pill" href="#tab_stats">
|
|
|
|
Statistiques
|
|
|
|
<span class="hidden-xs glyphicon glyphicon-chevron-right"></span>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<a class="btn btn-primary-w" data-toggle="pill" href="#tab_history">
|
|
|
|
Historique
|
|
|
|
<span class="hidden-xs glyphicon glyphicon-chevron-right"></span>
|
|
|
|
</a>
|
2017-05-30 20:44:30 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2017-06-12 01:51:10 +02:00
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
$( function() {
|
|
|
|
|
|
|
|
// Tooltips
|
|
|
|
$('[data-toggle="tooltip"]').tooltip();
|
|
|
|
|
|
|
|
// Opened tab button
|
|
|
|
let tabs_buttons = $('.tabs-buttons a');
|
|
|
|
tabs_buttons.click( function() {
|
|
|
|
tabs_buttons.removeClass('focus');
|
|
|
|
$(this).addClass('focus');
|
|
|
|
});
|
|
|
|
|
2019-05-24 14:30:00 +02:00
|
|
|
// Delete button
|
|
|
|
$('#button-delete').click(function() {
|
|
|
|
$.confirm({
|
|
|
|
title: 'Confirmer la suppression',
|
|
|
|
content: `
|
|
|
|
<div class="warning">
|
|
|
|
<span class='glyphicon glyphicon-warning-sign'></span><span>Cette opération est irréversible !</span>
|
|
|
|
</div>
|
|
|
|
<span>Toutes les données associées à ce compte seront anonymisées.</span>
|
|
|
|
`,
|
|
|
|
backgroundDismiss: true,
|
|
|
|
animation: 'top',
|
|
|
|
closeAnimation: 'bottom',
|
|
|
|
keyboardEnabled: true,
|
|
|
|
confirm: function() {
|
|
|
|
$('#account-delete-form').submit();
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
2017-06-12 01:51:10 +02:00
|
|
|
});
|
|
|
|
</script>
|