blog phase 2
This commit is contained in:
parent
8ef0f72db7
commit
6cb59063f4
|
@ -31,12 +31,12 @@ class blog extends common {
|
|||
public static $actions = [
|
||||
'add' => self::GROUP_EDITOR,
|
||||
'comment' => self::GROUP_EDITOR,
|
||||
'commentApprove' => self::GROUP_EDITOR,
|
||||
'commentDelete' => self::GROUP_EDITOR,
|
||||
'commentDeleteAll' => self::GROUP_EDITOR,
|
||||
'commentApprove' => self::GROUP_MODERATOR,
|
||||
'commentDelete' => self::GROUP_MODERATOR,
|
||||
'commentDeleteAll' => self::GROUP_MODERATOR,
|
||||
'config' => self::GROUP_EDITOR,
|
||||
'texts' => self::GROUP_EDITOR,
|
||||
'delete' => self::GROUP_EDITOR,
|
||||
'texts' => self::GROUP_MODERATOR,
|
||||
'delete' => self::GROUP_MODERATOR,
|
||||
'edit' => self::GROUP_EDITOR,
|
||||
'index' => self::GROUP_VISITOR,
|
||||
'rss' => self::GROUP_VISITOR
|
||||
|
@ -317,7 +317,8 @@ class blog extends common {
|
|||
'class' => 'blogCommentDeleteAll buttonRed',
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/commentDeleteAll/' . $this->getUrl(2).'/' . $_SESSION['csrf'] ,
|
||||
'ico' => 'cancel',
|
||||
'value' => $text['blog']['comment'][0]
|
||||
'value' => $text['blog']['comment'][0],
|
||||
'disabled' => $this->getUser('group') >= self::GROUP_MODERATOR ? false : true
|
||||
]);
|
||||
// Dates suivant la langue d'administration
|
||||
setlocale(LC_TIME, 'fr_FR');
|
||||
|
@ -340,7 +341,8 @@ class blog extends common {
|
|||
$buttonApproval = template::button('blogCommentApproved' . $commentIds[$i], [
|
||||
'class' => $comment['approval'] === true ? 'blogCommentRejected buttonGreen' : 'blogCommentApproved buttonRed' ,
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/commentApprove/' . $this->getUrl(2) . '/' . $commentIds[$i] . '/' . $_SESSION['csrf'] ,
|
||||
'value' => $comment['approval'] === true ? 'A' : 'R'
|
||||
'value' => $comment['approval'] === true ? 'A' : 'R',
|
||||
'disabled' => $this->getUser('group') >= self::GROUP_MODERATOR ? false : true
|
||||
]);
|
||||
}
|
||||
self::$comments[] = [
|
||||
|
@ -353,7 +355,8 @@ class blog extends common {
|
|||
template::button('blogCommentDelete' . $commentIds[$i], [
|
||||
'class' => 'blogCommentDelete buttonRed',
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/commentDelete/' . $this->getUrl(2) . '/' . $commentIds[$i] . '/' . $_SESSION['csrf'] ,
|
||||
'value' => template::ico('cancel')
|
||||
'value' => template::ico('cancel'),
|
||||
'disabled' => $this->getUser('group') >= self::GROUP_MODERATOR ? false : true
|
||||
])
|
||||
];
|
||||
}
|
||||
|
@ -566,7 +569,8 @@ class blog extends common {
|
|||
template::button('blogConfigDelete' . $articleIds[$i], [
|
||||
'class' => 'blogConfigDelete buttonRed',
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/delete/' . $articleIds[$i] . '/' . $_SESSION['csrf'],
|
||||
'value' => template::ico('cancel')
|
||||
'value' => template::ico('cancel'),
|
||||
'disabled' => $this->getUser('group') >= self::GROUP_MODERATOR ? false : true
|
||||
])
|
||||
];
|
||||
}
|
||||
|
|
|
@ -106,7 +106,8 @@ echo template::formOpen('blogAddForm'); ?>
|
|||
<?php echo template::select('blogAddConsent', $articleConsent , [
|
||||
'label' => $text['blog_view']['add'][15],
|
||||
'selected' => $module::EDIT_ALL,
|
||||
'help' => $text['blog_view']['add'][16]
|
||||
'help' => $text['blog_view']['add'][16],
|
||||
'disabled' => $this->getUser('group') >= self::GROUP_MODERATOR ? false : true
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -13,7 +13,7 @@ include('./module/blog/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) .
|
|||
]); ?>
|
||||
</div>
|
||||
|
||||
<?php if($module::$comments): ?>
|
||||
<?php if($module::$comments ): ?>
|
||||
<div class="col2 offset8">
|
||||
<?php echo $module::$commentsDelete; ?>
|
||||
</div>
|
||||
|
|
|
@ -111,7 +111,8 @@ echo template::formOpen('blogEditForm'); ?>
|
|||
<?php echo template::select('blogEditConsent', $articleConsent , [
|
||||
'label' => $text['blog_view']['edit'][15],
|
||||
'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']),
|
||||
'help' => $text['blog_view']['edit'][16]
|
||||
'help' => $text['blog_view']['edit'][16],
|
||||
'disabled' => $this->getUser('group') >= self::GROUP_MODERATOR ? false : true
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue