Blog 2.3 options à la création
This commit is contained in:
parent
30f72054ec
commit
db9bebe596
@ -51,7 +51,7 @@ class blog extends common {
|
||||
|
||||
public static $users = [];
|
||||
|
||||
const BLOG_VERSION = '2.01';
|
||||
const BLOG_VERSION = '2.02';
|
||||
|
||||
/**
|
||||
* Édition
|
||||
@ -66,12 +66,14 @@ class blog extends common {
|
||||
// Crée l'article
|
||||
$this->setData(['module', $this->getUrl(0), $articleId, [
|
||||
'closeComment' => $this->getInput('blogAddCloseComment', helper::FILTER_BOOLEAN),
|
||||
'mailNotification' => $this->getInput('blogEditMailNotification', helper::FILTER_BOOLEAN),
|
||||
'groupNotification' => $this->getInput('blogEditGroupNotification', helper::FILTER_INT),
|
||||
'mailNotification' => $this->getInput('blogAddMailNotification', helper::FILTER_BOOLEAN),
|
||||
'groupNotification' => $this->getInput('blogAddGroupNotification', helper::FILTER_INT),
|
||||
'comment' => [],
|
||||
'content' => $this->getInput('blogAddContent', null),
|
||||
'picture' => $this->getInput('blogAddPicture', helper::FILTER_STRING_SHORT, true),
|
||||
'hidePicture' => $this->getInput('blogAddHidePicture', helper::FILTER_BOOLEAN),
|
||||
'pictureSize' => $this->getInput('blogAddPictureSize', helper::FILTER_STRING_SHORT),
|
||||
'picturePosition' => $this->getInput('blogAddPicturePosition', helper::FILTER_STRING_SHORT),
|
||||
'publishedOn' => $this->getInput('blogAddPublishedOn', helper::FILTER_DATETIME, true),
|
||||
'state' => $this->getInput('blogAddState', helper::FILTER_BOOLEAN),
|
||||
'title' => $this->getInput('blogAddTitle', helper::FILTER_STRING_SHORT, true),
|
||||
|
@ -28,25 +28,38 @@
|
||||
<div class="block">
|
||||
<h4>Informations générales</h4>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<div class="col12">
|
||||
<?php echo template::text('blogAddTitle', [
|
||||
'label' => 'Titre'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<?php echo template::file('blogAddPicture', [
|
||||
'help' => 'Taille optimale de l\'image de couverture : ' . ((int) substr($this->getData(['theme', 'site', 'width']), 0, -2) - (20 * 2)) . ' x 350 pixels.',
|
||||
'label' => 'Image de couverture',
|
||||
'type' => 1
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<div class="col4">
|
||||
<?php echo template::select('blogAddPictureSize', $module::$pictureSizes, [
|
||||
'label' => 'Largeur de l\'image'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<div class="col4">
|
||||
<?php echo template::select('blogAddPicturePosition', $module::$picturePositions, [
|
||||
'label' => 'Position',
|
||||
'help' => 'Le texte de l\'article est adapté autour de l\'image'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo template::checkbox('blogAddHidePicture', true, 'Masquer l\'image dans l\'article', [
|
||||
'checked' => $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'hidePicture'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -72,7 +85,13 @@
|
||||
<div class="col6">
|
||||
<div class="block">
|
||||
<h4>Options avancées</h4>
|
||||
<?php echo template::checkbox('blogAddCloseComment', true, 'Fermer les commentaires'); ?>
|
||||
<?php echo template::checkbox('blogAddCloseComment', true, 'Fermer les commentaires' ); ?>
|
||||
<?php echo template::checkbox('blogAddMailNotification', true, 'Notifier le commentaire aux groupes à partir de :', [
|
||||
'help' => 'Editeurs = éditeurs + administrateurs<br/> Membres = membres + éditeurs + administrateurs'
|
||||
]); ?>
|
||||
<?php echo template::select('blogAddGroupNotification', $module::$groupNews, [
|
||||
'label' => ''
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -23,13 +23,10 @@
|
||||
} ?>
|
||||
|
||||
<?php echo $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'content']); ?>
|
||||
<!-- <h4 class="textAlignRight"> -->
|
||||
<p class="signature">
|
||||
<p class="clearBoth signature">
|
||||
<?php echo $this->getData(['user', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'userId']), 'firstname']); ?>
|
||||
<?php echo $this->getData(['user', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'userId']), 'lastname']); ?>
|
||||
<!-- </h4> -->
|
||||
</p>
|
||||
<div class="clearBoth"></div>
|
||||
<?php if($this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'closeComment'])): ?>
|
||||
<p>Cet article ne reçoit pas de commentaire.</p>
|
||||
<?php else: ?>
|
||||
|
@ -56,14 +56,14 @@
|
||||
'selected' => $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'picturePosition']),
|
||||
'help' => 'Le texte de l\'article est adapté autour de l\'image'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('blogEditHidePicture', true, 'Masquer l\'image dans l\'article', [
|
||||
'checked' => $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'hidePicture'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -99,9 +99,9 @@
|
||||
|
||||
]); ?>
|
||||
<?php echo template::select('blogEditGroupNotification', $module::$groupNews, [
|
||||
'label' => '',
|
||||
'selected' => $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'groupNotification'])
|
||||
]); ?>
|
||||
'label' => '',
|
||||
'selected' => $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'groupNotification'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user