2018-04-02 08:29:19 +02:00
|
|
|
<?php echo template::formOpen('blogEditForm'); ?>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col2">
|
|
|
|
<?php echo template::button('blogEditBack', [
|
|
|
|
'class' => 'buttonGrey',
|
|
|
|
'href' => helper::baseUrl() . $this->getUrl(0) . '/config',
|
|
|
|
'ico' => 'left',
|
|
|
|
'value' => 'Retour'
|
|
|
|
]); ?>
|
|
|
|
</div>
|
2021-04-11 19:24:50 +02:00
|
|
|
<div class="col3 offset3">
|
2018-04-02 08:29:19 +02:00
|
|
|
<?php echo template::button('blogEditDraft', [
|
|
|
|
'uniqueSubmission' => true,
|
|
|
|
'value' => 'Enregistrer en brouillon'
|
|
|
|
]); ?>
|
|
|
|
<?php echo template::hidden('blogEditState', [
|
|
|
|
'value' => true
|
|
|
|
]); ?>
|
|
|
|
</div>
|
|
|
|
<div class="col2">
|
|
|
|
<?php echo template::submit('blogEditSubmit', [
|
|
|
|
'value' => 'Publier'
|
|
|
|
]); ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col12">
|
|
|
|
<div class="block">
|
|
|
|
<h4>Informations générales</h4>
|
|
|
|
<div class="row">
|
2020-04-23 19:55:47 +02:00
|
|
|
<div class="col12">
|
2018-04-02 08:29:19 +02:00
|
|
|
<?php echo template::text('blogEditTitle', [
|
|
|
|
'label' => 'Titre',
|
2020-11-17 08:52:32 +01:00
|
|
|
'value' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'title'])
|
2018-04-02 08:29:19 +02:00
|
|
|
]); ?>
|
|
|
|
</div>
|
2020-04-23 19:55:47 +02:00
|
|
|
</div>
|
|
|
|
<div class="row">
|
2020-08-12 09:21:40 +02:00
|
|
|
<div class="col6">
|
2018-04-02 08:29:19 +02:00
|
|
|
<?php echo template::file('blogEditPicture', [
|
|
|
|
'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,
|
2020-11-17 08:52:32 +01:00
|
|
|
'value' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'picture'])
|
2018-04-02 08:29:19 +02:00
|
|
|
]); ?>
|
|
|
|
</div>
|
2020-08-12 09:21:40 +02:00
|
|
|
<div class="col3">
|
2020-04-23 19:55:47 +02:00
|
|
|
<?php echo template::select('blogEditPictureSize', $module::$pictureSizes, [
|
|
|
|
'label' => 'Largeur de l\'image',
|
2020-11-17 08:52:32 +01:00
|
|
|
'selected' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'pictureSize'])
|
2020-04-23 19:55:47 +02:00
|
|
|
]); ?>
|
2018-11-25 17:01:28 +01:00
|
|
|
</div>
|
2020-08-12 09:21:40 +02:00
|
|
|
<div class="col3">
|
2020-04-23 19:55:47 +02:00
|
|
|
<?php echo template::select('blogEditPicturePosition', $module::$picturePositions, [
|
|
|
|
'label' => 'Position',
|
2020-11-17 08:52:32 +01:00
|
|
|
'selected' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'picturePosition']),
|
2020-04-23 19:55:47 +02:00
|
|
|
'help' => 'Le texte de l\'article est adapté autour de l\'image'
|
|
|
|
]); ?>
|
2020-06-10 16:32:33 +02:00
|
|
|
</div>
|
2020-04-23 19:55:47 +02:00
|
|
|
</div>
|
|
|
|
<div class="row">
|
2020-06-10 16:32:33 +02:00
|
|
|
<div class="col6">
|
2018-11-25 17:01:28 +01:00
|
|
|
<?php echo template::checkbox('blogEditHidePicture', true, 'Masquer l\'image dans l\'article', [
|
2020-11-17 08:52:32 +01:00
|
|
|
'checked' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'hidePicture'])
|
2018-11-25 17:01:28 +01:00
|
|
|
]); ?>
|
2020-06-10 16:32:33 +02:00
|
|
|
</div>
|
2018-04-02 08:29:19 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php echo template::textarea('blogEditContent', [
|
|
|
|
'class' => 'editorWysiwyg',
|
2020-11-17 08:52:32 +01:00
|
|
|
'value' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'content'])
|
2018-04-02 08:29:19 +02:00
|
|
|
]); ?>
|
|
|
|
<div class="row">
|
2020-07-11 20:00:31 +02:00
|
|
|
<div class="col12">
|
|
|
|
<div class="block">
|
2020-07-16 18:50:57 +02:00
|
|
|
<h4>Options de publication</h4>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col4">
|
|
|
|
<?php echo template::select('blogEditUserId', $module::$users, [
|
|
|
|
'label' => 'Auteur',
|
|
|
|
'selected' => $this->getUser('id'),
|
|
|
|
'disabled' => $this->getUser('group') !== self::GROUP_ADMIN ? true : false
|
|
|
|
]); ?>
|
|
|
|
</div>
|
|
|
|
<div class="col4">
|
|
|
|
<?php echo template::date('blogEditPublishedOn', [
|
|
|
|
'help' => 'L\'article n\'est visible qu\'après la date de publication prévue.',
|
|
|
|
'label' => 'Date de publication',
|
2020-10-11 18:36:20 +02:00
|
|
|
'value' => time()
|
|
|
|
]); ?>
|
|
|
|
</div>
|
|
|
|
<div class="col4">
|
|
|
|
<?php echo template::select('blogEditConsent', $module::$articleConsent , [
|
|
|
|
'label' => 'Edition / Suppression',
|
2020-11-18 21:45:14 +01:00
|
|
|
'selected' => is_numeric($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'editConsent'])) ? $module::EDIT_GROUP : $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'editConsent']),
|
2020-10-11 18:36:20 +02:00
|
|
|
'help' => 'Les utilisateurs des groupes supérieurs accèdent à l\'article sans restriction'
|
2020-07-16 18:50:57 +02:00
|
|
|
]); ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-07-11 20:00:31 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
2020-10-11 18:36:20 +02:00
|
|
|
<div class="col12">
|
2018-04-02 08:29:19 +02:00
|
|
|
<div class="block">
|
2020-07-11 20:00:31 +02:00
|
|
|
<h4>Commentaires</h4>
|
2020-10-11 18:36:20 +02:00
|
|
|
<div class="row">
|
|
|
|
<div class="col4 ">
|
|
|
|
<?php echo template::checkbox('blogEditCommentClose', true, 'Fermer les commentaires', [
|
2020-11-18 21:45:14 +01:00
|
|
|
'checked' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'commentClose'])
|
2020-10-11 18:36:20 +02:00
|
|
|
]); ?>
|
2020-07-11 20:00:31 +02:00
|
|
|
</div>
|
2020-10-11 18:36:20 +02:00
|
|
|
<div class="col4 commentOptionsWrapper ">
|
2020-10-15 21:13:48 +02:00
|
|
|
<?php echo template::checkbox('blogEditCommentApproved', true, 'Approbation par un modérateur', [
|
2020-11-18 21:45:14 +01:00
|
|
|
'checked' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'commentApproved']),
|
2020-10-11 18:36:20 +02:00
|
|
|
''
|
|
|
|
]); ?>
|
|
|
|
</div>
|
|
|
|
<div class="col4 commentOptionsWrapper">
|
|
|
|
<?php echo template::select('blogEditCommentMaxlength', $module::$commentLength,[
|
|
|
|
'help' => 'Choix du nombre maximum de caractères pour chaque commentaire de l\'article, mise en forme html comprise.',
|
|
|
|
'label' => 'Caractères par commentaire',
|
2020-11-18 21:45:14 +01:00
|
|
|
'selected' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'commentMaxlength'])
|
2020-10-11 18:36:20 +02:00
|
|
|
]); ?>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col3 commentOptionsWrapper offset2">
|
|
|
|
<?php echo template::checkbox('blogEditCommentNotification', true, 'Notification par email', [
|
2020-11-18 21:45:14 +01:00
|
|
|
'checked' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'commentNotification']),
|
2020-10-11 18:36:20 +02:00
|
|
|
]); ?>
|
|
|
|
</div>
|
|
|
|
<div class="col4 commentOptionsWrapper">
|
|
|
|
<?php echo template::select('blogEditCommentGroupNotification', $module::$groupNews, [
|
2020-11-18 21:45:14 +01:00
|
|
|
'selected' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'commentGroupNotification']),
|
2020-10-11 18:36:20 +02:00
|
|
|
'help' => 'Editeurs = éditeurs + administrateurs<br/> Membres = membres + éditeurs + administrateurs'
|
|
|
|
]); ?>
|
2020-07-11 19:44:02 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-04-02 08:29:19 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-07-02 19:48:47 +02:00
|
|
|
<?php echo template::formClose(); ?>
|