Méthode initialisation
This commit is contained in:
parent
485407f405
commit
2b22e0ddb6
@ -17,9 +17,8 @@
|
||||
class geogallery extends common
|
||||
{
|
||||
|
||||
|
||||
const VERSION = '0.3';
|
||||
const REALNAME = 'Géo galerie';
|
||||
const VERSION = '0.4';
|
||||
const REALNAME = 'Géogalerie';
|
||||
const DATADIRECTORY = self::DATA_DIR . 'geogallery/';
|
||||
|
||||
const SORT_ASC = 'SORT_ASC';
|
||||
@ -338,14 +337,8 @@ class geogallery extends common
|
||||
|
||||
// Liste des galeries
|
||||
if (is_null($this->getData(['module', $this->getUrl(0), 'content']))) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . $this->getUrl(0) . '/config',
|
||||
'notification' => helper::translate('Paramétres'),
|
||||
'state' => true
|
||||
]);
|
||||
} else {
|
||||
|
||||
$this->setData(['module', $this->getUrl(0), 'content', []]);
|
||||
} elseif (!empty($locations)) {
|
||||
$galleries = array_keys($this->getData(['module', $this->getUrl(0), 'content']));
|
||||
foreach ($galleries as $key => $gallery) {
|
||||
$directory = $this->getData(['module', $this->getUrl(0), 'content', $gallery, 'config', 'directory']);
|
||||
@ -431,17 +424,14 @@ class geogallery extends common
|
||||
);
|
||||
}
|
||||
|
||||
// Affichage du template
|
||||
if (self::$galleries) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'showBarEditButton' => true,
|
||||
'view' => 'index',
|
||||
'vendor' => [
|
||||
'leaflet'
|
||||
],
|
||||
]);
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'showBarEditButton' => true,
|
||||
'view' => 'index',
|
||||
'vendor' => [
|
||||
'leaflet'
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
|
@ -19,7 +19,7 @@ class geolocation extends common
|
||||
|
||||
|
||||
const VERSION = '0.1';
|
||||
const REALNAME = 'Géo Evénements';
|
||||
const REALNAME = 'GéoLocalisation';
|
||||
const DATADIRECTORY = self::DATA_DIR . 'geolocation/';
|
||||
|
||||
const SORT_ASC = 'SORT_ASC';
|
||||
@ -224,13 +224,8 @@ class geolocation extends common
|
||||
|
||||
// Affichage du template si les données sont disponibles sinon redirection vers la configuration
|
||||
if (is_null($locations)) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . $this->getUrl(0) . '/add',
|
||||
'notification' => helper::translate('Paramétres'),
|
||||
'state' => true
|
||||
]);
|
||||
} else {
|
||||
$this->setData(['module', $this->getUrl(0), 'content', []]);
|
||||
} elseif (!empty($locations)) {
|
||||
// Lecture des données
|
||||
foreach ($locations as $locationsId => $datas) {
|
||||
self::$locations[] = $datas;
|
||||
@ -272,11 +267,9 @@ class geolocation extends common
|
||||
'long' => $centerLong,
|
||||
'zoom' => $zoomLevel
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'showBarEditButton' => true,
|
||||
|
@ -41,7 +41,7 @@
|
||||
<div class="col12">
|
||||
<?php echo template::textarea('locationAddDescription', [
|
||||
'label' => 'Description',
|
||||
'class' => 'editorWysiwyg'
|
||||
'class' => 'editorWysiwygComment'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -45,7 +45,7 @@
|
||||
<?php echo template::textarea('locationEditDescription', [
|
||||
'label' => 'Description',
|
||||
'value' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'description']),
|
||||
'class' => 'editorWysiwyg'
|
||||
'class' => 'editorWysiwyComment'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php if ($module::$locations): ?>
|
||||
<div id="map"></div>
|
||||
<?php else: ?>
|
||||
<?php echo template::speech('PAs d\'événement à afficher'); ?>
|
||||
<?php echo template::speech('Rien à afficher'); ?>
|
||||
<?php endif; ?>
|
Loading…
Reference in New Issue
Block a user