Deltacms/module/agenda/view/config/config.php

224 lines
7.3 KiB
PHP
Raw Normal View History

2022-01-31 09:10:49 +01:00
<!-- Configuration du module agenda -->
<?php
2022-03-18 07:50:13 +01:00
// Lexique
2022-09-11 09:42:42 +02:00
include('./module/agenda/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_agenda.php');
2022-01-31 09:10:49 +01:00
if(! is_dir($module::DATAMODULE.'data/'.$this->getUrl(0))){ $readonly = true;}else{ $readonly = false;}
2022-09-11 09:42:42 +02:00
echo template::formOpen('configuration'); ?>
2022-01-31 09:10:49 +01:00
<div class="row">
<div class="col2">
<?php echo template::button('config_retour', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . $this->getUrl(0),
'ico' => 'left',
2022-09-11 09:42:42 +02:00
'value' => $text['agenda_view']['config'][0]
2022-01-31 09:10:49 +01:00
]); ?>
</div>
2022-12-04 16:04:35 +01:00
<div class="col2">
<?php echo template::button('agendaIndexHelp', [
'class' => 'buttonHelp',
'ico' => 'help',
'value' => $text['agenda_view']['config'][36]
]); ?>
</div>
<div class="col2 offset4">
2022-01-31 09:10:49 +01:00
<?php echo template::button('config_gestion_categorie', [
'class' => 'buttonBlue',
'href' => helper::baseUrl() . $this->getUrl(0).'/categories/',
'ico' => 'cogs',
2022-09-11 09:42:42 +02:00
'value' => $text['agenda_view']['config'][1]
2022-01-31 09:10:49 +01:00
]); ?>
</div>
<div class="col2">
<?php echo template::submit('config_enregistrer',[
2022-09-11 09:42:42 +02:00
'value' => $text['agenda_view']['config'][2]
2022-01-31 09:10:49 +01:00
]); ?>
</div>
</div>
2022-12-04 16:04:35 +01:00
<!-- Aide à propos de la configuration de agenda, view config -->
<div class="helpDisplayContent">
<?php echo file_get_contents( $text['agenda_view']['config'][37]) ;?>
</div>
2022-12-04 08:19:08 +01:00
2022-11-07 17:22:52 +01:00
<?php
if($this->getUser('group') < self::GROUP_MODERATOR) {
echo '<div class="displayNone">';
}
else {
echo '<div class="block">';
}
?>
2022-12-04 08:19:08 +01:00
<div class="blockTitle"><?php echo $text['agenda_view']['config'][3]; ?></div>
2022-01-31 09:10:49 +01:00
<div class="col6">
2022-03-18 07:50:13 +01:00
<?php echo template::select('config_droit_creation', $groupe, [
2022-09-11 09:42:42 +02:00
'help' => $text['agenda_view']['config'][6],
2022-01-31 09:10:49 +01:00
'id' => 'config_droit_creation',
'disabled' => $readonly,
2022-09-11 09:42:42 +02:00
'label' => $text['agenda_view']['config'][7],
2022-01-31 09:10:49 +01:00
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'droit_creation'])
2022-12-04 08:19:08 +01:00
]); ?>
2022-01-31 09:10:49 +01:00
</div>
<div class="col6">
2022-09-11 09:42:42 +02:00
<?php echo template::checkbox('config_droit_limite', true, $text['agenda_view']['config'][8], [
2022-01-31 09:10:49 +01:00
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'droit_limite']),
'disabled' => $readonly,
2022-09-11 09:42:42 +02:00
'help' => $text['agenda_view']['config'][9]
2022-01-31 09:10:49 +01:00
]); ?>
</div>
2022-11-07 17:22:52 +01:00
</div> <!-- Conditionnel -->
2022-01-31 09:10:49 +01:00
<div class="block">
2022-12-04 08:19:08 +01:00
<div class="blockTitle"><?php echo $text['agenda_view']['config'][4]; ?></div>
2023-12-21 10:51:33 +01:00
<div class="col3">
2022-09-11 09:42:42 +02:00
<?php echo template::select('config_MaxiWidth', $maxwidth,[
'help' => $text['agenda_view']['config'][10],
'label' => $text['agenda_view']['config'][11],
2022-01-31 09:10:49 +01:00
'selected' => $this->getData(['module', $this->getUrl(0),'config', 'maxiWidth'])
2022-12-04 08:19:08 +01:00
]); ?>
2022-01-31 09:10:49 +01:00
</div>
2023-12-21 10:51:33 +01:00
<div class="col3 offset3">
<?php echo template::text('config_gridColor', [
'class' => 'colorPicker',
2023-12-21 11:12:29 +01:00
'help' => $text['agenda_view']['config'][38],
'label' => $text['agenda_view']['config'][39],
2023-12-21 10:51:33 +01:00
'value' => $this->getData(['module', $this->getUrl(0),'config', 'gridColor'])
]); ?>
</div>
2022-01-31 09:10:49 +01:00
</div>
<div class="block">
2022-12-04 08:19:08 +01:00
<div class="blockTitle"><?php echo $text['agenda_view']['config'][5]; ?></div>
<div class="row">
2022-01-31 09:10:49 +01:00
<!--Sauvegarder l'agenda actuel-->
<div class="col6">
<?php
echo template::text('config_sauve', [
2022-09-11 09:42:42 +02:00
'help' => $text['agenda_view']['config'][12],
2022-01-31 09:10:49 +01:00
'disabled' => $readonly,
'id' => 'config_sauvegarde',
2022-09-11 09:42:42 +02:00
'label' => $text['agenda_view']['config'][13]
2022-01-31 09:10:49 +01:00
]);
2022-12-04 08:19:08 +01:00
?>
2022-01-31 09:10:49 +01:00
</div>
2022-12-04 08:19:08 +01:00
2022-01-31 09:10:49 +01:00
<!--Sélection d'un fichier de sauvegarde-->
2022-11-07 17:22:52 +01:00
<?php
if($this->getUser('group') >= self::GROUP_MODERATOR) {
echo '<div class="col6">';
echo template::select('config_restaure', $module::$savedFiles, [
2022-09-11 09:42:42 +02:00
'help' => $text['agenda_view']['config'][14],
2022-01-31 09:10:49 +01:00
'id' => 'config_restauration',
'disabled' => $readonly,
2022-09-11 09:42:42 +02:00
'label' => $text['agenda_view']['config'][15]
2022-11-07 17:22:52 +01:00
]);
echo '</div>';
} ?>
2022-01-31 09:10:49 +01:00
</div>
2022-12-04 08:19:08 +01:00
2022-01-31 09:10:49 +01:00
</div>
<!--Tout supprimer-->
2022-11-07 16:37:05 +01:00
<?php if($this->getUser('group') >= self::GROUP_MODERATOR) { ?>
<div class="block">
2022-12-04 08:19:08 +01:00
<div class="blockTitle"><?php echo $text['agenda_view']['config'][16]; ?></div>
2022-11-07 16:37:05 +01:00
<div class="col4">
<?php echo template::button('config_suptout', [
'class' => 'configSup buttonRed',
'disabled' => $readonly,
'help' => $text['agenda_view']['config'][20],
'href' => helper::baseUrl() . $this->getUrl(0).'/deleteall',
'ico' => 'cancel',
'value' => $text['agenda_view']['config'][21]
]); ?>
</div>
</div>
2022-12-04 08:19:08 +01:00
<?php } ?>
2022-01-31 09:10:49 +01:00
<!-- Sélection d'un fichier ics depuis le dossier site/file/source/agenda/ics -->
<div class="block">
2022-12-04 08:19:08 +01:00
<div class="blockTitle"><?php echo $text['agenda_view']['config'][17]; ?></div>
2022-01-31 09:10:49 +01:00
<div class="row">
<div class="col6">
<!-- Sélection d'un fichier ics -->
<?php echo template::select('config_fichier_ics', $module::$icsFiles, [
2022-09-11 09:42:42 +02:00
'help' => $text['agenda_view']['config'][22],
2022-01-31 09:10:49 +01:00
'id' => 'config_fichier_ics',
2022-09-11 09:42:42 +02:00
'label' => $text['agenda_view']['config'][23]
2022-01-31 09:10:49 +01:00
]); ?>
</div>
</div>
</div>
<!-- Sélection d'un carnet d'adresses au format txt ou csv avec séparateur virgule -->
<div class="block">
2022-12-04 08:19:08 +01:00
<div class="blockTitle"><?php echo $text['agenda_view']['config'][18]; ?></div>
2022-01-31 09:10:49 +01:00
<div class="row">
<div class="col6">
<!-- Sélection d'un fichier csv ou txt -->
<?php echo template::select('config_fichier_csv_txt', $module::$csvFiles, [
2022-09-11 09:42:42 +02:00
'help' => $text['agenda_view']['config'][24],
2022-01-31 09:10:49 +01:00
'id' => 'config_fichier_csv_txt',
2022-09-11 09:42:42 +02:00
'label' => $text['agenda_view']['config'][25]
2022-01-31 09:10:49 +01:00
]); ?>
</div>
</div>
</div>
2022-03-18 07:50:13 +01:00
<!-- Textes pour la vue des évènements par un visiteur -->
2022-03-21 08:32:27 +01:00
<?php
2022-09-11 09:42:42 +02:00
if( null === $this->getData(['module', $this->getUrl(0), 'texts', 'configTextButtonBack'])) $this->setData(['module', $this->getUrl(0), 'texts', 'configTextButtonBack', $text['agenda_view']['config'][0]]);
if( null === $this->getData(['module', $this->getUrl(0), 'texts', 'configTextDateStart'])) $this->setData(['module', $this->getUrl(0), 'texts', 'configTextDateStart', $text['agenda_view']['config'][33]]);
if( null === $this->getData(['module', $this->getUrl(0), 'texts', 'configTextDateEnd'])) $this->setData(['module', $this->getUrl(0), 'texts', 'configTextDateEnd', $text['agenda_view']['config'][34]]);
2022-03-21 08:32:27 +01:00
?>
2022-03-18 07:50:13 +01:00
<div class="block">
2022-12-04 08:19:08 +01:00
<div class="blockTitle"><?php echo $text['agenda_view']['config'][26]; ?></div>
2022-03-18 07:50:13 +01:00
<div class="row">
<div class="col4">
<?php echo template::text('configTextButtonBack', [
2022-09-11 09:42:42 +02:00
'help' => $text['agenda_view']['config'][27],
2022-03-18 07:50:13 +01:00
'disabled' => $readonly,
2022-09-11 09:42:42 +02:00
'label' => $text['agenda_view']['config'][28],
2022-03-18 07:50:13 +01:00
'value' => $this->getData(['module', $this->getUrl(0), 'texts', 'configTextButtonBack'])
]);
2022-12-04 08:19:08 +01:00
?>
2022-03-18 07:50:13 +01:00
</div>
<div class="col4">
<?php echo template::text('configTextDateStart', [
2022-09-11 09:42:42 +02:00
'help' => $text['agenda_view']['config'][29],
2022-03-18 07:50:13 +01:00
'disabled' => $readonly,
2022-09-11 09:42:42 +02:00
'label' => $text['agenda_view']['config'][30],
2022-03-18 07:50:13 +01:00
'value' => $this->getData(['module', $this->getUrl(0), 'texts', 'configTextDateStart'])
]);
2022-12-04 08:19:08 +01:00
?>
2022-03-18 07:50:13 +01:00
</div>
<div class="col4">
<?php echo template::text('configTextDateEnd', [
2022-09-11 09:42:42 +02:00
'help' => $text['agenda_view']['config'][31],
2022-03-18 07:50:13 +01:00
'disabled' => $readonly,
2022-09-11 09:42:42 +02:00
'label' => $text['agenda_view']['config'][32],
2022-03-18 07:50:13 +01:00
'value' => $this->getData(['module', $this->getUrl(0), 'texts', 'configTextDateEnd'])
]);
2022-12-04 08:19:08 +01:00
?>
2022-03-18 07:50:13 +01:00
</div>
</div>
</div>
2022-12-04 08:19:08 +01:00
<!-- Fin du formulaire principal à la mode Deltacms -->
2022-01-31 09:10:49 +01:00
<?php echo template::formClose(); ?>
2022-03-18 07:50:13 +01:00
<div class="moduleVersion">
2022-09-11 09:42:42 +02:00
<?php echo $text['agenda_view']['config'][19]; echo $module::VERSION; ?>
2022-01-31 09:10:49 +01:00
</div>
2022-09-11 09:42:42 +02:00
<script>
var textConfirm = <?php echo '"'.$text['agenda_view']['config'][35].'"'; ?>;
</script>
2022-01-31 09:10:49 +01:00