Mise à jour module Download
This commit is contained in:
parent
0f0ae30621
commit
d7d2d67480
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
class download extends common {
|
class download extends common {
|
||||||
|
|
||||||
const VERSION = '2.2';
|
const VERSION = '2.4';
|
||||||
const REALNAME = 'Téléchargement';
|
const REALNAME = 'Téléchargement';
|
||||||
const DELETE = true;
|
const DELETE = true;
|
||||||
const UPDATE = '0.0';
|
const UPDATE = '0.0';
|
||||||
|
@ -946,11 +946,6 @@ class download extends common {
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'display' => self::DISPLAY_RAW
|
'display' => self::DISPLAY_RAW
|
||||||
]);
|
]);
|
||||||
// Valeurs en sortie
|
|
||||||
$this->addOutput([
|
|
||||||
'title' => 'Configuration',
|
|
||||||
'view' => 'index'
|
|
||||||
]);
|
|
||||||
} else {
|
} else {
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
|
|
|
@ -64,7 +64,8 @@
|
||||||
<div class="col3">
|
<div class="col3">
|
||||||
<?php if ($module::$categories) {
|
<?php if ($module::$categories) {
|
||||||
echo template::select('downloadEditCategorie', $module::$categories, [
|
echo template::select('downloadEditCategorie', $module::$categories, [
|
||||||
'label' => 'Catégorie'
|
'label' => 'Catégorie',
|
||||||
|
'selected' => $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(2), 'category'])
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
echo template::select('downloadEditCategorie', [''=>''], [
|
echo template::select('downloadEditCategorie', [''=>''], [
|
||||||
|
|
|
@ -10,6 +10,13 @@
|
||||||
* @link http://zwiicms.fr/
|
* @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
|
* Affiche le bloc pour rédiger un commentaire
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -20,19 +20,17 @@
|
||||||
switch ($this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'ressourceType'])) {
|
switch ($this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'ressourceType'])) {
|
||||||
case 'file':
|
case 'file':
|
||||||
$href = helper::baseUrl() . $this->getUrl(0) . '/downloadFile/' . $this->getUrl(1) . '/' . $_SESSION['csrf'];
|
$href = helper::baseUrl() . $this->getUrl(0) . '/downloadFile/' . $this->getUrl(1) . '/' . $_SESSION['csrf'];
|
||||||
$value = 'Télécharger';
|
|
||||||
$target = '_self';
|
$target = '_self';
|
||||||
break;
|
break;
|
||||||
case 'url' :
|
case 'url' :
|
||||||
$href = $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'url']);
|
$href = $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'url']);
|
||||||
$value = 'Visiter';
|
|
||||||
$target = '_blank';
|
$target = '_blank';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<?php echo template::button('downloadItemFile', [
|
<?php echo template::button('downloadItemFile', [
|
||||||
'href' => $href,
|
'href' => $href,
|
||||||
'value' => $value,
|
'value' => 'Télécharger',
|
||||||
'target'=> $target
|
'target'=> $target
|
||||||
]);
|
]);
|
||||||
?>
|
?>
|
||||||
|
@ -74,9 +72,7 @@
|
||||||
<?php if ($this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'file'])): ?>
|
<?php if ($this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'file'])): ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col12 textAlignCenter">
|
<div class="col12 textAlignCenter">
|
||||||
<span>Téléchargements :
|
<span>Téléchargements : <span id="downloadStats"><?php echo $module::$statSum;'<span>'?></span>
|
||||||
<?php echo $module::$statSum; ?>
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
Loading…
Reference in New Issue