From d7d2d674800648ba16ff99b813438078d7c6e5eb Mon Sep 17 00:00:00 2001 From: fredtempez Date: Wed, 8 Sep 2021 06:27:32 +0200 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20module=20Download?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/download/download.php | 7 +------ module/download/view/edit/edit.php | 3 ++- module/download/view/item/item.js.php | 7 +++++++ module/download/view/item/item.php | 8 ++------ 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/module/download/download.php b/module/download/download.php index 730607ca..63ee2d6a 100644 --- a/module/download/download.php +++ b/module/download/download.php @@ -14,7 +14,7 @@ class download extends common { - const VERSION = '2.2'; + const VERSION = '2.4'; const REALNAME = 'Téléchargement'; const DELETE = true; const UPDATE = '0.0'; @@ -946,11 +946,6 @@ class download extends common { $this->addOutput([ 'display' => self::DISPLAY_RAW ]); - // Valeurs en sortie - $this->addOutput([ - 'title' => 'Configuration', - 'view' => 'index' - ]); } else { // Valeurs en sortie $this->addOutput([ diff --git a/module/download/view/edit/edit.php b/module/download/view/edit/edit.php index 9d048b0f..62315fdb 100644 --- a/module/download/view/edit/edit.php +++ b/module/download/view/edit/edit.php @@ -64,7 +64,8 @@
'Catégorie' + 'label' => 'Catégorie', + 'selected' => $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(2), 'category']) ]); } else { echo template::select('downloadEditCategorie', [''=>''], [ diff --git a/module/download/view/item/item.js.php b/module/download/view/item/item.js.php index cb07dcd2..33bc0c81 100644 --- a/module/download/view/item/item.js.php +++ b/module/download/view/item/item.js.php @@ -10,6 +10,13 @@ * @link http://zwiicms.fr/ */ +/** + * Incrément les stats + */ + $('#downloadItemFile').click(function() { + $('#downloadStats').html(function(i, val) { return val*1+1 }); +}); + /** * Affiche le bloc pour rédiger un commentaire */ diff --git a/module/download/view/item/item.php b/module/download/view/item/item.php index 97c06af5..acf7c575 100644 --- a/module/download/view/item/item.php +++ b/module/download/view/item/item.php @@ -20,19 +20,17 @@ switch ($this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'ressourceType'])) { case 'file': $href = helper::baseUrl() . $this->getUrl(0) . '/downloadFile/' . $this->getUrl(1) . '/' . $_SESSION['csrf']; - $value = 'Télécharger'; $target = '_self'; break; case 'url' : $href = $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'url']); - $value = 'Visiter'; $target = '_blank'; break; } ?> $href, - 'value' => $value, + 'value' => 'Télécharger', 'target'=> $target ]); ?> @@ -74,9 +72,7 @@ getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'file'])): ?>
- Téléchargements : - - + Téléchargements : '?>