2022-03-18 07:50:13 +01:00
< ? php
// Lexique
$text = [];
$val = $this -> getData ([ 'config' , 'i18n' , 'langAdmin' ]);
switch ( $val ) {
case 'fr' :
$text [ 0 ] = 'Retour' ;
$text [ 1 ] = 'Enregistrer en brouillon' ;
$text [ 2 ] = 'Publier' ;
$text [ 3 ] = 'Informations générales' ;
$text [ 4 ] = 'Titre' ;
$text [ 5 ] = 'Taille optimale de l\'image de couverture : ' ;
$text [ 6 ] = 'Image de couverture' ;
$text [ 7 ] = 'Largeur de l\'image' ;
$text [ 8 ] = 'Position' ;
$text [ 9 ] = 'Le texte de l\'article est adapté autour de l\'image' ;
$text [ 10 ] = 'Masquer l\'image dans l\'article' ;
$text [ 11 ] = 'Options de publication' ;
$text [ 12 ] = 'Auteur' ;
$text [ 13 ] = 'L\'article n\'est visible qu\'après la date de publication prévue.' ;
$text [ 14 ] = 'Date de publication' ;
$text [ 15 ] = 'Edition / Suppression' ;
$text [ 16 ] = 'Les utilisateurs des groupes supérieurs accèdent à l\'article sans restriction' ;
$text [ 17 ] = 'Commentaires' ;
$text [ 18 ] = 'Fermer les commentaires' ;
$text [ 19 ] = 'Approbation par un modérateur' ;
$text [ 20 ] = 'Choix du nombre maximum de caractères pour chaque commentaire de l\'article, mise en forme html comprise.' ;
$text [ 21 ] = 'Caractères par commentaire' ;
$text [ 22 ] = 'Notification par email' ;
$pictureSizes = $module :: $pictureSizes ;
$picturePositions = $module :: $picturePositions ;
$articleConsent = $module :: $articleConsent ;
break ;
case 'en' :
$text [ 0 ] = 'Back' ;
$text [ 1 ] = 'Save as draft' ;
$text [ 2 ] = 'Publish' ;
$text [ 3 ] = 'General information' ;
$text [ 4 ] = 'Title' ;
$text [ 5 ] = 'Optimal size of cover image : ' ;
$text [ 6 ] = 'Cover image' ;
$text [ 7 ] = 'Width of image' ;
$text [ 8 ] = 'Position' ;
$text [ 9 ] = 'The text of the article is adapted around the image' ;
$text [ 10 ] = 'Hide image in article' ;
$text [ 11 ] = 'Publication options' ;
$text [ 12 ] = 'Author' ;
$text [ 13 ] = 'The article is not visible until after the scheduled publication date' ;
$text [ 14 ] = 'Date of publication' ;
$text [ 15 ] = 'Edit / Delete' ;
$text [ 16 ] = 'Users in higher groups have unrestricted access to the article' ;
$text [ 17 ] = 'Comments' ;
$text [ 18 ] = 'Close comments' ;
$text [ 19 ] = 'Moderator approval' ;
$text [ 20 ] = 'Choice of maximum number of characters for each comment in the article, including html formatting' ;
$text [ 21 ] = 'Characters per comment' ;
$text [ 22 ] = 'Email notification' ;
$pictureSizes = $module :: $pictureSizes_en ;
$picturePositions = $module :: $picturePositions_en ;
$articleConsent = $module :: $articleConsent_en ;
break ;
}
?>
2022-01-31 09:10:49 +01:00
< ? php echo template :: formOpen ( 'blogAddForm' ); ?>
< div class = " row " >
< div class = " col2 " >
< ? php echo template :: button ( 'blogAddBack' , [
'class' => 'buttonGrey' ,
'href' => helper :: baseUrl () . $this -> getUrl ( 0 ) . '/config' ,
'ico' => 'left' ,
2022-03-18 07:50:13 +01:00
'value' => $text [ 0 ]
2022-01-31 09:10:49 +01:00
]); ?>
</ div >
< div class = " col3 offset5 " >
< ? php echo template :: button ( 'blogAddDraft' , [
'uniqueSubmission' => true ,
2022-03-18 07:50:13 +01:00
'value' => $text [ 1 ]
2022-01-31 09:10:49 +01:00
]); ?>
< ? php echo template :: hidden ( 'blogAddState' , [
'value' => true
]); ?>
</ div >
< div class = " col2 " >
< ? php echo template :: submit ( 'blogAddPublish' , [
2022-03-18 07:50:13 +01:00
'value' => $text [ 2 ],
2022-01-31 09:10:49 +01:00
'uniqueSubmission' => true
]); ?>
</ div >
</ div >
< div class = " row " >
< div class = " col12 " >
< div class = " block " >
2022-03-18 07:50:13 +01:00
< h4 >< ? php echo $text [ 3 ]; ?> </h4>
2022-01-31 09:10:49 +01:00
< div class = " row " >
< div class = " col12 " >
< ? php echo template :: text ( 'blogAddTitle' , [
2022-03-18 07:50:13 +01:00
'label' => $text [ 4 ]
2022-01-31 09:10:49 +01:00
]); ?>
</ div >
</ div >
< div class = " row " >
< div class = " col4 " >
2022-03-18 07:50:13 +01:00
< ? php $help = '' ;
if ( $this -> getData ([ 'theme' , 'site' , 'width' ]) !== '100%' ) $help = $text [ 5 ] . (( int ) substr ( $this -> getData ([ 'theme' , 'site' , 'width' ]), 0 , - 2 ) - ( 20 * 2 )) . ' x 350 pixels.' ;
echo template :: file ( 'blogAddPicture' , [
'help' => $help ,
'label' => $text [ 6 ],
2022-01-31 09:10:49 +01:00
'type' => 1
]); ?>
</ div >
< div class = " col4 " >
2022-03-18 07:50:13 +01:00
< ? php echo template :: select ( 'blogAddPictureSize' , $pictureSizes , [
'label' => $text [ 7 ]
2022-01-31 09:10:49 +01:00
]); ?>
</ div >
< div class = " col4 " >
2022-03-18 07:50:13 +01:00
< ? php echo template :: select ( 'blogAddPicturePosition' , $picturePositions , [
'label' => $text [ 8 ],
'help' => $text [ 9 ]
2022-01-31 09:10:49 +01:00
]); ?>
</ div >
</ div >
< div class = " row " >
< div class = " col12 " >
2022-03-18 07:50:13 +01:00
< ? php echo template :: checkbox ( 'blogAddHidePicture' , true , $text [ 10 ], [
2022-01-31 09:10:49 +01:00
'checked' => $this -> getData ([ 'module' , $this -> getUrl ( 0 ), 'posts' , $this -> getUrl ( 2 ), 'hidePicture' ])
]); ?>
</ div >
</ div >
</ div >
</ div >
</ div >
< ? php echo template :: textarea ( 'blogAddContent' , [
'class' => 'editorWysiwyg'
]); ?>
< div class = " row " >
< div class = " col12 " >
< div class = " block " >
2022-03-18 07:50:13 +01:00
< h4 >< ? php echo $text [ 11 ]; ?> </h4>
2022-01-31 09:10:49 +01:00
< div class = " row " >
< div class = " col4 " >
< ? php echo template :: select ( 'blogAddUserId' , $module :: $users , [
2022-03-18 07:50:13 +01:00
'label' => $text [ 12 ],
2022-01-31 09:10:49 +01:00
'selected' => $this -> getUser ( 'id' ),
'disabled' => $this -> getUser ( 'group' ) !== self :: GROUP_ADMIN ? true : false
]); ?>
</ div >
< div class = " col4 " >
< ? php echo template :: date ( 'blogAddPublishedOn' , [
2022-03-18 07:50:13 +01:00
'help' => $text [ 13 ],
'label' => $text [ 14 ],
2022-01-31 09:10:49 +01:00
'value' => time ()
]); ?>
</ div >
< div class = " col4 " >
2022-03-18 07:50:13 +01:00
< ? php echo template :: select ( 'blogAddConsent' , $articleConsent , [
'label' => $text [ 15 ],
2022-01-31 09:10:49 +01:00
'selected' => $module :: EDIT_ALL ,
2022-03-18 07:50:13 +01:00
'help' => $text [ 16 ]
2022-01-31 09:10:49 +01:00
]); ?>
</ div >
</ div >
</ div >
</ div >
</ div >
< div class = " row " >
< div class = " col12 " >
< div class = " block " >
2022-03-18 07:50:13 +01:00
< h4 >< ? php echo $text [ 17 ]; ?> </h4>
2022-01-31 09:10:49 +01:00
< div class = " row " >
< div class = " col4 " >
2022-03-18 07:50:13 +01:00
< ? php echo template :: checkbox ( 'blogAddCommentClose' , true , $text [ 18 ]); ?>
2022-01-31 09:10:49 +01:00
</ div >
< div class = " col4 commentOptionsWrapper " >
2022-03-18 07:50:13 +01:00
< ? php echo template :: checkbox ( 'blogAddCommentApproved' , true , $text [ 19 ]); ?>
2022-01-31 09:10:49 +01:00
</ div >
< div class = " col4 commentOptionsWrapper " >
< ? php echo template :: select ( 'blogAddCommentMaxlength' , $module :: $commentLength ,[
2022-03-18 07:50:13 +01:00
'help' => $text [ 20 ],
'label' => $text [ 21 ]
2022-01-31 09:10:49 +01:00
]); ?>
</ div >
</ div >
< div class = " row " >
< div class = " col3 commentOptionsWrapper offset2 " >
2022-03-18 07:50:13 +01:00
< ? php echo template :: checkbox ( 'blogAddCommentNotification' , true , $text [ 22 ]); ?>
2022-01-31 09:10:49 +01:00
</ div >
< div class = " col4 commentOptionsWrapper " >
< ? php echo template :: select ( 'blogAddCommentGroupNotification' , $module :: $groupNews ); ?>
</ div >
</ div >
</ div >
</ div >
</ div >
< ? php echo template :: formClose (); ?>