From b9d75450832e6eaaef5d50685d57e57ed4968976 Mon Sep 17 00:00:00 2001 From: Okhin Date: Thu, 10 Jan 2019 11:28:52 +0100 Subject: [PATCH] =?UTF-8?q?Utilisation=20d'un=20historique=20tri=C3=A9=20c?= =?UTF-8?q?omplet=20aulieu=20de=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/perso.php | 11 +++++++++++ app/view/user/perso.html | 18 +----------------- www/static/css/layouts.css | 4 ---- 3 files changed, 12 insertions(+), 21 deletions(-) diff --git a/app/controller/perso.php b/app/controller/perso.php index ca2e079..8d16a00 100644 --- a/app/controller/perso.php +++ b/app/controller/perso.php @@ -30,6 +30,7 @@ class Perso extends Controller $this->get_contreparties($f3); $this->get_dons($f3); $this->get_recurrents($f3); + $this->compute_history($f3); if ($f3->exists('GET.validate')) { $f3->set('modal_counterparts', '1'); $f3->clear('GET.validate'); @@ -84,6 +85,16 @@ class Perso extends Controller $f3->set('dons_recurrents', $dons); } + public function compute_history($f3) + { + $history = array(); + $history = array_merge($f3->get('dons'), $f3->get('dons_recurrents')); + usort($history, function ($a, $b) { + return strtotime($a['datec']) - strtotime($b['datec']); + }); + $f3->set('historique', $history); + } + public function login($f3, $args) { $f3->set('form_visible', 'login'); diff --git a/app/view/user/perso.html b/app/view/user/perso.html index 496af24..68c1e2d 100644 --- a/app/view/user/perso.html +++ b/app/view/user/perso.html @@ -141,7 +141,7 @@ {{ _("Récurent") }} {{ _("Piplome") }} - + {{ @don.datec }} {{ @don.somme }} @@ -156,22 +156,6 @@ - - - {{ @don.datec }} - {{ @don.somme }} - {{ _("Non")}} - - - {{ _("Générer") }} - - {{ @pdfs[@don.pdf].decimale }}.pdf - - - - - - diff --git a/www/static/css/layouts.css b/www/static/css/layouts.css index 7c4af47..c24637f 100644 --- a/www/static/css/layouts.css +++ b/www/static/css/layouts.css @@ -509,10 +509,6 @@ h4 { color: #3B68B0; } -.panel-body { - height: 100%; -} - .panel-body > div { vertical-align: middle; display: inline-block; -- GitLab