Fix templates

This commit is contained in:
Ludovic Stephan 2021-02-18 17:58:08 +01:00
parent 4e758fbba0
commit a421bec625
2 changed files with 13 additions and 25 deletions

View file

@ -35,20 +35,16 @@
{% block main %}
<div class="table-responsive">
<table
class="table table-hover table-condensed sortable"
{# Initial sort: [(trigramme,asc)] #}
data-sortlist="[[0,0]]">
<table class="table table-hover table-condensed sortable" {# Initial sort: [(trigramme,asc)] #}
data-sortlist="[[0,0]]">
<thead>
<tr>
<td class="text-center">Tri.</td>
<td>Nom</td>
<td class="text-right">Balance</td>
<td class="text-right">Réelle</td>
<td data-sorter="shortDate">Début</td>
<td>Découvert autorisé</td>
<td data-sorter="shortDate">Jusqu'au</td>
<td>Balance offset</td>
</tr>
</thead>
<tbody>
@ -61,11 +57,6 @@
</td>
<td>{{ neg.account.name }}</td>
<td class="text-right">{{ neg.account.balance|floatformat:2 }}€</td>
<td class="text-right">
{% if neg.balance_offset %}
{{ neg.account.real_balance|floatformat:2 }}€
{% endif %}
</td>
<td title="{{ neg.start }}">
{{ neg.start|date:'d/m/Y H:i'}}
</td>
@ -73,11 +64,10 @@
<td title="{{ neg.authz_overdraft_until }}">
{{ neg.authz_overdraft_until|date:'d/m/Y H:i' }}
</td>
<td>{{ neg.balance_offset|default_if_none:'' }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}
{% endblock %}

View file

@ -39,7 +39,8 @@
<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>
<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 %}
@ -54,9 +55,6 @@
{% 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>
@ -89,20 +87,20 @@
{% endif %}
<script type="text/javascript">
$( function() {
$(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');
tabs_buttons.click(function () {
tabs_buttons.removeClass('focus');
$(this).addClass('focus');
});
// Delete button
$('#button-delete').click(function() {
$('#button-delete').click(function () {
$.confirm({
title: 'Confirmer la suppression',
content: `
@ -115,10 +113,10 @@ $( function() {
animation: 'top',
closeAnimation: 'bottom',
keyboardEnabled: true,
confirm: function() {
confirm: function () {
$('#account-delete-form').submit();
}
})
})
});
</script>
});
</script>