forked from ZwiiCMS-Team/ZwiiCampus
Blog 7.4 bouton de retour
This commit is contained in:
parent
667417c750
commit
cd0131e2d4
11
module/blog/blog.php
Normal file → Executable file
11
module/blog/blog.php
Normal file → Executable file
@ -16,7 +16,7 @@
|
|||||||
class blog extends common
|
class blog extends common
|
||||||
{
|
{
|
||||||
|
|
||||||
const VERSION = '7.3';
|
const VERSION = '7.4';
|
||||||
const REALNAME = 'Blog';
|
const REALNAME = 'Blog';
|
||||||
const DELETE = true;
|
const DELETE = true;
|
||||||
const UPDATE = '0.0';
|
const UPDATE = '0.0';
|
||||||
@ -174,11 +174,13 @@ class blog extends common
|
|||||||
$this->setData(['module', $this->getUrl(0), 'config', 'timeFormat', '%H:%M']);
|
$this->setData(['module', $this->getUrl(0), 'config', 'timeFormat', '%H:%M']);
|
||||||
$this->setData(['module', $this->getUrl(0), 'config', 'versionData', '6.5']);
|
$this->setData(['module', $this->getUrl(0), 'config', 'versionData', '6.5']);
|
||||||
}
|
}
|
||||||
|
// Version 7.4
|
||||||
|
if (version_compare($this->getData(['module', $this->getUrl(0), 'config', 'versionData']), '7.4', '<')) {
|
||||||
|
$this->setData(['module', $this->getUrl(0), 'config', 'buttonBack', true]);
|
||||||
|
$this->setData(['module', $this->getUrl(0), 'config', 'versionData', '7.4']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flux RSS
|
* Flux RSS
|
||||||
*/
|
*/
|
||||||
@ -574,6 +576,7 @@ class blog extends common
|
|||||||
'itemsperPage' => $this->getInput('blogOptionItemsperPage', helper::FILTER_INT, true),
|
'itemsperPage' => $this->getInput('blogOptionItemsperPage', helper::FILTER_INT, true),
|
||||||
'dateFormat' => $this->getInput('blogOptionDateFormat'),
|
'dateFormat' => $this->getInput('blogOptionDateFormat'),
|
||||||
'timeFormat' => $this->getInput('blogOptionTimeFormat'),
|
'timeFormat' => $this->getInput('blogOptionTimeFormat'),
|
||||||
|
'buttonBack' => $this->getInput('newsOptionButtonBack'),
|
||||||
'versionData' => $this->getData(['module', $this->getUrl(0), 'config', 'versionData']),
|
'versionData' => $this->getData(['module', $this->getUrl(0), 'config', 'versionData']),
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
2
module/blog/changes.md
Normal file → Executable file
2
module/blog/changes.md
Normal file → Executable file
@ -1,3 +1,5 @@
|
|||||||
|
# Version 7.4
|
||||||
|
- Bouton de retour dans les articles
|
||||||
# Version 7.3
|
# Version 7.3
|
||||||
- Termes des commandes de profils
|
- Termes des commandes de profils
|
||||||
# Version 7.2
|
# Version 7.2
|
||||||
|
47
module/blog/view/article/article.php
Normal file → Executable file
47
module/blog/view/article/article.php
Normal file → Executable file
@ -1,6 +1,6 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col12">
|
<div class="col12">
|
||||||
<?php $pictureSize = $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'pictureSize']) === null ? '100' : $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'pictureSize']); ?>
|
<?php $pictureSize = $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'pictureSize']) === null ? '100' : $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'pictureSize']); ?>
|
||||||
<?php if ($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'hidePicture']) == false) {
|
<?php if ($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'hidePicture']) == false) {
|
||||||
echo '<img class="blogArticlePicture blogArticlePicture' . $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'picturePosition']) .
|
echo '<img class="blogArticlePicture blogArticlePicture' . $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'picturePosition']) .
|
||||||
' pict' . $pictureSize . '" src="' . helper::baseUrl(false) . self::FILE_DIR . 'source/' . $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'picture']) .
|
' pict' . $pictureSize . '" src="' . helper::baseUrl(false) . self::FILE_DIR . 'source/' . $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'picture']) .
|
||||||
@ -10,7 +10,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row verticalAlignMiddle">
|
<div class="row verticalAlignMiddle">
|
||||||
<div class="col12 blogDate">
|
<div class="col6 textAlignLeft">
|
||||||
|
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'buttonBack'])): ?>
|
||||||
|
<a href="<?php echo helper::baseUrl() . $this->getUrl(0); ?>">
|
||||||
|
<?php echo template::ico('left') . helper::translate('Retour'); ?>
|
||||||
|
</a>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
<div class="col6 newsDate textAlignRight">
|
||||||
<!-- bloc signature et date -->
|
<!-- bloc signature et date -->
|
||||||
<?php echo template::ico('user'); ?>
|
<?php echo template::ico('user'); ?>
|
||||||
<?php echo $module::$articleSignature; ?>
|
<?php echo $module::$articleSignature; ?>
|
||||||
@ -18,35 +25,35 @@
|
|||||||
<?php echo helper::dateUTF8($module::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$siteContent) . ' - ' . helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$siteContent); ?>
|
<?php echo helper::dateUTF8($module::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$siteContent) . ' - ' . helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$siteContent); ?>
|
||||||
<!-- Bloc edition -->
|
<!-- Bloc edition -->
|
||||||
<?php if (
|
<?php if (
|
||||||
|
|
||||||
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
||||||
and
|
and
|
||||||
( // Propriétaire
|
( // Propriétaire
|
||||||
($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === $module::EDIT_OWNER
|
($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === $module::EDIT_OWNER
|
||||||
and ($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'userId']) === $this->getUser('id')
|
and ($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'userId']) === $this->getUser('id')
|
||||||
or $this->getUser('group') === self::GROUP_ADMIN)
|
or $this->getUser('group') === self::GROUP_ADMIN)
|
||||||
)
|
)
|
||||||
or (
|
or (
|
||||||
// Groupe
|
// Groupe
|
||||||
($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === self::GROUP_ADMIN
|
($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === self::GROUP_ADMIN
|
||||||
or $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === self::GROUP_EDITOR)
|
or $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === self::GROUP_EDITOR)
|
||||||
and $this->getUser('group') >= $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent'])
|
and $this->getUser('group') >= $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent'])
|
||||||
)
|
)
|
||||||
or (
|
or (
|
||||||
// Tout le monde
|
// Tout le monde
|
||||||
$this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === $module::EDIT_ALL
|
$this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === $module::EDIT_ALL
|
||||||
and $this->getUser('group') >= $module::$actions['config']
|
and $this->getUser('group') >= $module::$actions['config']
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
) : ?>
|
): ?>
|
||||||
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/edit/' . $this->getUrl(1); ?>">
|
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/edit/' . $this->getUrl(1); ?>">
|
||||||
<?php echo template::ico('pencil'); ?> Éditer
|
<?php echo template::ico('pencil'); ?> Éditer
|
||||||
</a>
|
</a>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<!-- Bloc RSS-->
|
<!-- Bloc RSS-->
|
||||||
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'feeds'])) : ?>
|
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'feeds'])): ?>
|
||||||
<div id="rssFeed">
|
<div id="rssFeed">
|
||||||
<a type="application/rss+xml" href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/rss'; ?>" target="_blank">
|
<a type="application/rss+xml" href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/rss'; ?>"
|
||||||
|
target="_blank">
|
||||||
<img src='module/blog/ressource/feed-icon-16.gif' />
|
<img src='module/blog/ressource/feed-icon-16.gif' />
|
||||||
<?php
|
<?php
|
||||||
echo '<p>' . $this->getData(['module', $this->getUrl(0), 'config', 'feedsLabel']) . '</p>';
|
echo '<p>' . $this->getData(['module', $this->getUrl(0), 'config', 'feedsLabel']) . '</p>';
|
||||||
@ -56,9 +63,9 @@
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php if ($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'commentClose'])) : ?>
|
<?php if ($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'commentClose'])): ?>
|
||||||
<p>Cet article ne reçoit pas de commentaire.</p>
|
<p>Cet article ne reçoit pas de commentaire.</p>
|
||||||
<?php else : ?>
|
<?php else: ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col12" id="comment">
|
<div class="col12" id="comment">
|
||||||
<h3>
|
<h3>
|
||||||
@ -67,7 +74,7 @@
|
|||||||
if ($module::$nbCommentsApproved > 0) {
|
if ($module::$nbCommentsApproved > 0) {
|
||||||
echo $module::$nbCommentsApproved . ' commentaire' . ($module::$nbCommentsApproved > 1 ? 's' : '');
|
echo $module::$nbCommentsApproved . ' commentaire' . ($module::$nbCommentsApproved > 1 ? 's' : '');
|
||||||
} else {
|
} else {
|
||||||
echo 'Pas encore de commentaire';
|
echo 'Pas encore de commentaire';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</h3>
|
</h3>
|
||||||
@ -79,7 +86,7 @@
|
|||||||
'readonly' => true
|
'readonly' => true
|
||||||
]); ?>
|
]); ?>
|
||||||
<div id="blogArticleCommentWrapper" class="displayNone">
|
<div id="blogArticleCommentWrapper" class="displayNone">
|
||||||
<?php if ($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')) : ?>
|
<?php if ($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')): ?>
|
||||||
<?php echo template::text('blogArticleUserName', [
|
<?php echo template::text('blogArticleUserName', [
|
||||||
'label' => 'Nom',
|
'label' => 'Nom',
|
||||||
'readonly' => true,
|
'readonly' => true,
|
||||||
@ -88,7 +95,7 @@
|
|||||||
<?php echo template::hidden('blogArticleUserId', [
|
<?php echo template::hidden('blogArticleUserId', [
|
||||||
'value' => $this->getUser('id')
|
'value' => $this->getUser('id')
|
||||||
]); ?>
|
]); ?>
|
||||||
<?php else : ?>
|
<?php else: ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col9">
|
<div class="col9">
|
||||||
<?php echo template::text('blogArticleAuthor', [
|
<?php echo template::text('blogArticleAuthor', [
|
||||||
@ -113,7 +120,7 @@
|
|||||||
'maxlength' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'commentMaxlength'])
|
'maxlength' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'commentMaxlength'])
|
||||||
]); ?>
|
]); ?>
|
||||||
<div id="blogArticleContentAlarm"> </div>
|
<div id="blogArticleContentAlarm"> </div>
|
||||||
<?php if ($this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')) : ?>
|
<?php if ($this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')): ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col12">
|
<div class="col12">
|
||||||
<?php echo template::captcha('blogArticleCaptcha', [
|
<?php echo template::captcha('blogArticleCaptcha', [
|
||||||
@ -141,7 +148,7 @@
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col12">
|
<div class="col12">
|
||||||
<?php foreach ($module::$comments as $commentId => $comment) : ?>
|
<?php foreach ($module::$comments as $commentId => $comment): ?>
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<h4>
|
<h4>
|
||||||
<?php echo template::ico('user'); ?>
|
<?php echo template::ico('user'); ?>
|
||||||
|
0
module/blog/view/index/index.php
Normal file → Executable file
0
module/blog/view/index/index.php
Normal file → Executable file
9
module/blog/view/option/option.php
Normal file → Executable file
9
module/blog/view/option/option.php
Normal file → Executable file
@ -50,12 +50,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col8">
|
<div class="col3">
|
||||||
<?php echo template::checkbox('blogOptionShowFeeds', true, 'Lien du flux RSS', [
|
<?php echo template::checkbox('blogOptionShowFeeds', true, 'Lien du flux RSS', [
|
||||||
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'feeds']),
|
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'feeds']),
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col4">
|
<div class="col3">
|
||||||
|
<?php echo template::checkbox('newsOptionButtonBack', true, 'Bouton de retour', [
|
||||||
|
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'buttonBack'])
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
<div class="col6">
|
||||||
<?php echo template::text('blogOptionFeedslabel', [
|
<?php echo template::text('blogOptionFeedslabel', [
|
||||||
'label' => 'Texte de l\'étiquette',
|
'label' => 'Texte de l\'étiquette',
|
||||||
'value' => $this->getData(['module', $this->getUrl(0), 'config', 'feedsLabel'])
|
'value' => $this->getData(['module', $this->getUrl(0), 'config', 'feedsLabel'])
|
||||||
|
Loading…
Reference in New Issue
Block a user