Présentation des commentaires

This commit is contained in:
fredtempez 2022-03-15 16:04:25 +01:00
parent 04413d3a83
commit 7ce41dad33
2 changed files with 33 additions and 27 deletions

View File

@ -66,15 +66,20 @@
<?php if($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'commentClose'])): ?>
<p>Cet article ne reçoit pas de commentaire.</p>
<?php else: ?>
<h4 id="comment">
<div class="row">
<div class="col12" id="comment">
<h3>
<?php
echo template::ico('comment', 'right');
if ($module::$nbCommentsApproved > 0) {
echo $module::$nbCommentsApproved . ' commentaire' . ($module::$nbCommentsApproved > 1 ? 's' : '');
} else {
echo 'Pas encore de commentaire';
}
?>
</h5>
</h3>
</div>
</div>
<?php echo template::formOpen('blogArticleForm'); ?>
<?php echo template::text('blogArticleCommentShow', [
'placeholder' => 'Rédiger un commentaire...',

View File

@ -22,7 +22,7 @@
</div>
</div>
<div class="row verticalAlignMiddle">
<div class="col12 blogDate">
<div class="col6 blogDate">
<!-- bloc signature et date -->
<?php echo $module->signature($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'userId']));?>
<?php echo ' - ';?>
@ -64,12 +64,12 @@
</a>
<?php endif; ?>
</div>
</div>
<div class="row">
<div class="col6 textAlignRight" id="comment">
<?php if($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'commentClose'])): ?>
<p>Cet article ne reçoit pas de commentaire.</p>
<?php else: ?>
<h3 id="comment">
<p>
<?php echo template::ico('comment', 'right'); ?>
<?php
if ($module::$comments[$articleId] > 0) {
echo '<a href="'. helper::baseUrl() . $this->getUrl(0) . '/' . $articleId .'">';
@ -79,9 +79,10 @@
echo 'Pas encore de commentaire';
}
?>
</h3>
</p>
<?php endif; ?>
</div>
</div>
<?php else: ?>
<div class="row rowArticle">
<div class="col3">