Deltacms/module/news/view/config/config.php

174 lines
5.5 KiB
PHP

<?php
// Lexique
$text = [];
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Retour';
$text[1] = 'News';
$text[2] = 'Enregistrer';
$text[3] = 'Paramètres du module';
$text[4] = 'Lien du flux RSS';
$text[5] = 'Flux limité aux articles de la première page.';
$text[6] = 'Etiquette RSS';
$text[7] = 'Nombre de colonnes';
$text[8] = 'Articles par page';
$text[9] = 'Abrégé de l\'article';
$text[10] = 'Thème du module';
$text[11] = 'Bordure';
$text[12] = 'Epaisseur';
$text[13] = 'Couleur visible en l\'absence d\'une image.<br />Le curseur horizontal règle le niveau de transparence.';
$text[14] = 'Couleur de la bordure';
$text[15] = 'Couleur du fond';
$text[16] = 'Titre';
$text[17] = 'Publication';
$text[18] = 'Dépublication';
$text[19] = 'Etat';
$text[20] = 'Aucune news.';
$text[21] = 'Version n°';
$columns = $module::$columns;
$height = $module::$height;
$borderStyle = $module::$borderStyle;
$borderWidth = $module::$borderWidth;
break;
case 'en' :
$text[0] = 'Back';
$text[1] = 'News';
$text[2] = 'Submit';
$text[3] = 'Module parameters';
$text[4] = 'RSS feed link';
$text[5] = 'Feed limited to articles on the first page.';
$text[6] = 'RSS tag';
$text[7] = 'Number of columns';
$text[8] = 'Articles per page';
$text[9] = 'Article abstract';
$text[10] = 'Module theme';
$text[11] = 'Bordure';
$text[12] = 'Thickness';
$text[13] = 'Colour visible in the absence of an image. The horizontal slider sets the level of transparency';
$text[14] = 'Border colour';
$text[15] = 'Background colour';
$text[16] = 'Title';
$text[17] = 'Publication';
$text[18] = 'Depublication';
$text[19] = 'State';
$text[20] = 'No news';
$text[21] = 'Version no.';
$columns = $module::$columns_en;
$height = $module::$height_en;
$borderStyle = $module::$borderStyle_en;
$borderWidth = $module::$borderWidth_en;
break;
}
?>
<?php echo template::formOpen('newsConfig'); ?>
<div class="row">
<div class="col2">
<?php echo template::button('newsConfigBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'page/edit/' . $this->getUrl(0),'posts',
'ico' => 'left',
'value' => $text[0]
]); ?>
</div>
<div class="col2 offset6">
<?php echo template::button('newsConfigAdd', [
'href' => helper::baseUrl() . $this->getUrl(0) . '/add',
'ico' => 'plus',
'value' => $text[1]
]); ?>
</div>
<div class="col2">
<?php echo template::submit('newsConfigSubmit',[
'value' => $text[2]
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4><?php echo $text[3]; ?></h4>
<div class="row">
<div class="col6">
<?php echo template::checkbox('newsConfigShowFeeds', true, $text[4], [
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'feeds']),
'help' => $text[5]
]); ?>
</div>
<div class="col6">
<?php echo template::text('newsConfigFeedslabel', [
'label' => $text[6],
'value' => $this->getData(['module', $this->getUrl(0), 'config', 'feedsLabel'])
]); ?>
</div>
</div>
<div class="row">
<div class="col4">
<?php echo template::select('newsConfigItemsperCol', $columns, [
'label' => $text[7],
'selected' => $this->getData(['module', $this->getUrl(0),'config', 'itemsperCol'])
]); ?>
</div>
<div class="col4">
<?php echo template::select('newsConfigItemsperPage', $module::$itemsList, [
'label' => $text[8],
'selected' => $this->getData(['module', $this->getUrl(0),'config', 'itemsperPage'])
]); ?>
</div>
<div class="col4">
<?php echo template::select('newsConfigHeight', $height, [
'label' => $text[9],
'selected' => $this->getData(['module', $this->getUrl(0),'config', 'height'])
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4><?php echo $text[10]; ?></h4>
<div class="row">
<div class="col3">
<?php echo template::select('newsThemeBorderStyle', $borderStyle, [
'label' => $text[11],
'selected' => $this->getData(['module', $this->getUrl(0),'theme', 'borderStyle'])
]); ?>
</div>
<div class="col3">
<?php echo template::select('newsThemeBorderWidth', $borderWidth, [
'label' => $text[12],
'selected' => $this->getData(['module', $this->getUrl(0),'theme', 'borderWidth'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('newsThemeBorderColor', [
'class' => 'colorPicker',
'help' => $text[13],
'label' => $text[14],
'value' => $this->getData(['module', $this->getUrl(0),'theme', 'borderColor'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('newsThemeBackgroundColor', [
'class' => 'colorPicker',
'help' => $text[13],
'label' => $text[15],
'value' => $this->getData(['module', $this->getUrl(0),'theme', 'backgroundColor'])
]); ?>
</div>
</div>
</div>
</div>
</div>
<?php if($module::$news): ?>
<?php echo template::table([4, 2, 2, 2, 1, 1], $module::$news, [$text[16], $text[17], $text[18], $text[19], '', '']); ?>
<?php echo $module::$pages; ?>
<?php else: ?>
<?php echo template::speech($text[20]); ?>
<?php endif; ?>
<?php echo template::formClose(); ?>
<div class="moduleVersion"><?php echo $text[21]; ?>
<?php echo $module::VERSION; ?>
</div>