forked from ZwiiCMS-Team/ZwiiCMS
Aide sur les boutons d'icônes
This commit is contained in:
parent
e094a79a24
commit
4a0848c003
@ -302,15 +302,18 @@ class addon extends common {
|
||||
// Module non installé
|
||||
$ico = template::ico('download');
|
||||
$class = '';
|
||||
$help = 'Installer le module';
|
||||
// Le module est installé
|
||||
if (array_key_exists($key,$infoModules) === true) {
|
||||
$class = 'buttonGreen';
|
||||
$ico = template::ico('update');
|
||||
$help = 'Mettre à jour ce module';
|
||||
}
|
||||
// Le module est installé et utilisé
|
||||
if (in_array($key,$inPages) === true) {
|
||||
$class = 'buttonRed';
|
||||
$ico = template::ico('update');
|
||||
$help = 'Mettre à jour le module';
|
||||
}
|
||||
self::$storeList [] = [
|
||||
$store[$key]['category'],
|
||||
@ -323,7 +326,8 @@ class addon extends common {
|
||||
template::button('moduleExport' . $key, [
|
||||
'class' => $class,
|
||||
'href' => helper::baseUrl(). $this->getUrl(0) . '/uploadItem/' . $key.'/' . $_SESSION['csrf'],// appel de fonction vaut exécution, utiliser un paramètre
|
||||
'value' => $ico
|
||||
'value' => $ico,
|
||||
'help' => $help
|
||||
])
|
||||
];
|
||||
}
|
||||
@ -380,19 +384,22 @@ class addon extends common {
|
||||
? template::button('moduleDelete' . $key, [
|
||||
'class' => 'moduleDelete buttonRed',
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/delete/' . $key . '/' . $_SESSION['csrf'],
|
||||
'value' => template::ico('cancel')
|
||||
'value' => template::ico('cancel'),
|
||||
'help' => 'Supprimer le module '. $key
|
||||
])
|
||||
: '',
|
||||
implode(', ',array_keys($inPages,$key)) !== ''
|
||||
? template::button('moduleExport' . $key, [
|
||||
'href' => helper::baseUrl(). $this->getUrl(0) . '/export/' . $key . '/' . $_SESSION['csrf'],// appel de fonction vaut exécution, utiliser un paramètre
|
||||
'value' => template::ico('download')
|
||||
'value' => template::ico('download'),
|
||||
'help' => 'Exporter les données du module avec sa page'
|
||||
])
|
||||
: '',
|
||||
implode(', ',array_keys($inPages,$key)) === ''
|
||||
? template::button('moduleExport' . $key, [
|
||||
'href' => helper::baseUrl(). $this->getUrl(0) . '/import/' . $key . '/' . $_SESSION['csrf'],// appel de fonction vaut exécution, utiliser un paramètre
|
||||
'value' => template::ico('upload')
|
||||
'value' => template::ico('upload'),
|
||||
'help' => 'Importer les données du module avec sa page'
|
||||
])
|
||||
: ''
|
||||
];
|
||||
|
@ -8,7 +8,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php if($module::$storeList): ?>
|
||||
<?php echo template::table([2, 2, 1, 2, 2, 2, 1], $module::$storeList, ['Catégorie', 'Module', 'Version', 'Date', 'Pages', 'Télécharger ou <br> Mettre à jour']); ?>
|
||||
<?php echo template::table([2, 2, 1, 2, 2, 2, 1], $module::$storeList, ['Catégorie', 'Module', 'Version', 'Date', 'Pages', 'Obtenir']); ?>
|
||||
<?php else: ?>
|
||||
<?php echo template::speech('Le catalogue est vide.'); ?>
|
||||
<?php endif; ?>
|
@ -21,7 +21,7 @@
|
||||
'href' => helper::baseUrl() . 'translate/copy',
|
||||
'value' => template::ico('cogs'),
|
||||
'disabled' => $module::$siteTranslate,
|
||||
'help' => 'Utilitaire de copie de site inter-langues'
|
||||
'help' => 'Copie de sites inter-langues'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
|
@ -346,12 +346,14 @@ class user extends common {
|
||||
self::$groups[$this->getData(['user', $userId, 'group'])],
|
||||
template::button('userEdit' . $userId, [
|
||||
'href' => helper::baseUrl() . 'user/edit/' . $userId . '/back/'. $_SESSION['csrf'],
|
||||
'value' => template::ico('pencil')
|
||||
'value' => template::ico('pencil'),
|
||||
'help' => 'Editer ' . $userId
|
||||
]),
|
||||
template::button('userDelete' . $userId, [
|
||||
'class' => 'userDelete buttonRed',
|
||||
'href' => helper::baseUrl() . 'user/delete/' . $userId. '/' . $_SESSION['csrf'],
|
||||
'value' => template::ico('cancel')
|
||||
'value' => template::ico('cancel'),
|
||||
'help' => 'Supprimer ' . $userId
|
||||
])
|
||||
];
|
||||
}
|
||||
|
81
core/vendor/tippy/init.js
vendored
81
core/vendor/tippy/init.js
vendored
@ -1,38 +1,49 @@
|
||||
/**
|
||||
* Initialisation de Tippy
|
||||
*/
|
||||
$(document).ready(function() {
|
||||
// Tooltip des aides
|
||||
tippy(".helpButton", {
|
||||
arrow: true,
|
||||
arrowType: "round",
|
||||
placement: "top"
|
||||
});
|
||||
// Tooltip des attributs title
|
||||
tippy("[data-tippy-content]", {
|
||||
arrow: true,
|
||||
placement: "top"
|
||||
});
|
||||
// Pour les images map, pas de flèche, bulle haut suivant le curseur
|
||||
|
||||
tippy('img[title], a[title], area[title]', {
|
||||
|
||||
content(reference) {
|
||||
const title = reference.getAttribute('title')
|
||||
reference.removeAttribute('title')
|
||||
return title
|
||||
},
|
||||
|
||||
placement: "top",
|
||||
followCursor: true,
|
||||
animation: "fade",
|
||||
animateFill: true
|
||||
});
|
||||
// Pour les images map, pas de flèche, bulle haut suivant le curseur
|
||||
tippy("#image-map", {
|
||||
placement: "top",
|
||||
followCursor: true,
|
||||
animation: "fade",
|
||||
animateFill: true
|
||||
});
|
||||
});
|
||||
$(document).ready(function () {
|
||||
|
||||
// Tooltip des attributs title
|
||||
tippy("[data-tippy-content]", {
|
||||
arrow: true,
|
||||
placement: "top"
|
||||
});
|
||||
|
||||
// Pour les images map, pas de flèche, bulle haut suivant le curseur
|
||||
tippy('img[title], a[title]:not(.button), area[title]', {
|
||||
|
||||
content(reference) {
|
||||
const title = reference.getAttribute('title')
|
||||
reference.removeAttribute('title')
|
||||
return title
|
||||
},
|
||||
|
||||
placement: "top",
|
||||
followCursor: true,
|
||||
animation: "fade",
|
||||
animateFill: true
|
||||
});
|
||||
|
||||
// Tooltip des aides
|
||||
tippy('a.button[title]', {
|
||||
content(reference) {
|
||||
const title = reference.getAttribute('title')
|
||||
reference.removeAttribute('title')
|
||||
return title
|
||||
},
|
||||
delay: [1000,250],
|
||||
placement: "bottom",
|
||||
followCursor: false,
|
||||
arrow: true,
|
||||
animateFill: true,
|
||||
arrowType: "round",
|
||||
});
|
||||
|
||||
// Pour les images map, pas de flèche, bulle haut suivant le curseur
|
||||
tippy("#image-map", {
|
||||
placement: "top",
|
||||
followCursor: true,
|
||||
animation: "fade",
|
||||
animateFill: true
|
||||
});
|
||||
});
|
@ -462,16 +462,19 @@ class blog extends common {
|
||||
template::button('blogConfigComment' . $articleIds[$i], [
|
||||
'class' => ($toApprove || $approved ) > 0 ? '' : 'buttonGrey' ,
|
||||
'href' => ($toApprove || $approved ) > 0 ? helper::baseUrl() . $this->getUrl(0) . '/comment/' . $articleIds[$i] : '',
|
||||
'value' => $toApprove > 0 ? $toApprove . '/' . $approved : $approved
|
||||
'value' => $toApprove > 0 ? $toApprove . '/' . $approved : $approved,
|
||||
'help' => ($toApprove || $approved ) > 0 ? 'Editer / Approuver les commentaires' : ''
|
||||
]),
|
||||
template::button('blogConfigEdit' . $articleIds[$i], [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $articleIds[$i] . '/' . $_SESSION['csrf'],
|
||||
'value' => template::ico('pencil')
|
||||
'value' => template::ico('pencil'),
|
||||
'help' => 'Editer l\'article'
|
||||
]),
|
||||
template::button('blogConfigDelete' . $articleIds[$i], [
|
||||
'class' => 'blogConfigDelete buttonRed',
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/delete/' . $articleIds[$i] . '/' . $_SESSION['csrf'],
|
||||
'value' => template::ico('cancel')
|
||||
'value' => template::ico('cancel'),
|
||||
'help' => 'Effacer l\'article'
|
||||
])
|
||||
];
|
||||
}
|
||||
|
@ -10,14 +10,16 @@
|
||||
<div class="col1 offset9">
|
||||
<?php echo template::button('blogConfigOption', [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/option',
|
||||
'value' => template::ico('cogs')
|
||||
'value' => template::ico('cogs'),
|
||||
'help' => 'Options de configuration'
|
||||
]); ?>
|
||||
|
||||
</div>
|
||||
<div class="col1">
|
||||
<?php echo template::button('blogConfigAdd', [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/add',
|
||||
'value' => template::ico('plus')
|
||||
'value' => template::ico('plus'),
|
||||
'help' => 'Rédiger un article'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -60,13 +60,15 @@
|
||||
<div class="col1 offset7">
|
||||
<?php echo template::button('formConfigData', [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/data',
|
||||
'value' => template::ico('code')
|
||||
'value' => template::ico('code'),
|
||||
'help' => 'Voir et exporter les données du formulaire'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col1">
|
||||
<?php echo template::button('formConfigLayout', [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/option',
|
||||
'value' => template::ico('cogs')
|
||||
'value' => template::ico('cogs'),
|
||||
'help' => 'Options de configuration'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
|
@ -1,25 +1,24 @@
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<div class="col1">
|
||||
<?php echo template::button('formDataBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/config',
|
||||
'ico' => 'left',
|
||||
'value' => 'Retour'
|
||||
'value' => template::ico('left')
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2 offset6">
|
||||
<div class="col1 offset9">
|
||||
<?php echo template::button('formDataDeleteAll', [
|
||||
'class' => 'formDataDeleteAll buttonRed',
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/deleteall' . '/' . $_SESSION['csrf'],
|
||||
'ico' => 'cancel',
|
||||
'value' => 'Tout effacer'
|
||||
'value' => template::ico('cancel'),
|
||||
'help' => 'Effacer toutes les données'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<div class="col1">
|
||||
<?php echo template::button('formDataBack', [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/export2csv' . '/' . $_SESSION['csrf'],
|
||||
'ico' => 'download',
|
||||
'value' => 'Export CSV'
|
||||
'value' => template::ico('download'),
|
||||
'help' => 'Exporter toutes les données'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,14 +1,13 @@
|
||||
<?php echo template::formOpen('formOptionForm'); ?>
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<div class="col1">
|
||||
<?php echo template::button('formOptionBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/config',
|
||||
'ico' => 'left',
|
||||
'value' => 'Retour'
|
||||
'value' => template::ico('left')
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2 offset8">
|
||||
<div class="col2 offset9">
|
||||
<?php echo template::submit('formOptionSubmit'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -346,12 +346,14 @@ class gallery extends common {
|
||||
$gallery['config']['directory'],
|
||||
template::button('galleryConfigEdit' . $galleryId , [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $galleryId . '/' . $_SESSION['csrf'],
|
||||
'value' => template::ico('pencil')
|
||||
'value' => template::ico('pencil'),
|
||||
'help' => 'Configuration de la galerie '
|
||||
]),
|
||||
template::button('galleryConfigDelete' . $galleryId, [
|
||||
'class' => 'galleryConfigDelete buttonRed',
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/delete/' . $galleryId . '/' . $_SESSION['csrf'],
|
||||
'value' => template::ico('cancel')
|
||||
'value' => template::ico('cancel'),
|
||||
'help' => 'Supprimer cette galerie'
|
||||
])
|
||||
];
|
||||
// Tableau des id des galleries pour le drag and drop
|
||||
|
@ -10,7 +10,8 @@
|
||||
<div class="col1 offset10">
|
||||
<?php echo template::button('galleryConfigBack', [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/theme/' . $_SESSION['csrf'],
|
||||
'value' => template::ico('brush')
|
||||
'value' => template::ico('brush'),
|
||||
'help' => 'Thème de cette galerie'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,10 +1,9 @@
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<div class="col1">
|
||||
<?php echo template::button('galleryGalleryBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . $this->getUrl(0),
|
||||
'ico' => 'left',
|
||||
'value' => 'Retour'
|
||||
'value' => template::ico('left')
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<?php echo template::button('galleryThemeBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/config',
|
||||
'value' => template::ico('cancel')
|
||||
'value' => template::ico('left')
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2 offset9">
|
||||
|
@ -8,15 +8,17 @@
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col1 offset9">
|
||||
<?php echo template::button('newsConfigAdd', [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/add',
|
||||
'value' => template::ico('plus')
|
||||
<?php echo template::button('newsConfigLayout', [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/option',
|
||||
'value' => template::ico('cogs'),
|
||||
'help' => 'Options de configuration'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col1">
|
||||
<?php echo template::button('newsConfigLayout', [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/option',
|
||||
'value' => template::ico('brush')
|
||||
<?php echo template::button('newsConfigAdd', [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/add',
|
||||
'value' => template::ico('plus'),
|
||||
'help' => 'Rédiger une news'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user