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'])): ?> <?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: ?>
<h4 id="comment"> <div class="row">
<?php <div class="col12" id="comment">
if ($module::$nbCommentsApproved > 0) { <h3>
echo $module::$nbCommentsApproved . ' commentaire' . ($module::$nbCommentsApproved > 1 ? 's' : ''); <?php
} else { echo template::ico('comment', 'right');
echo 'Pas encore de commentaire'; if ($module::$nbCommentsApproved > 0) {
} echo $module::$nbCommentsApproved . ' commentaire' . ($module::$nbCommentsApproved > 1 ? 's' : '');
?> } else {
</h5> echo 'Pas encore de commentaire';
}
?>
</h3>
</div>
</div>
<?php echo template::formOpen('blogArticleForm'); ?> <?php echo template::formOpen('blogArticleForm'); ?>
<?php echo template::text('blogArticleCommentShow', [ <?php echo template::text('blogArticleCommentShow', [
'placeholder' => 'Rédiger un commentaire...', 'placeholder' => 'Rédiger un commentaire...',

View File

@ -22,7 +22,7 @@
</div> </div>
</div> </div>
<div class="row verticalAlignMiddle"> <div class="row verticalAlignMiddle">
<div class="col12 blogDate"> <div class="col6 blogDate">
<!-- bloc signature et date --> <!-- bloc signature et date -->
<?php echo $module->signature($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'userId']));?> <?php echo $module->signature($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'userId']));?>
<?php echo ' - ';?> <?php echo ' - ';?>
@ -64,23 +64,24 @@
</a> </a>
<?php endif; ?> <?php endif; ?>
</div> </div>
</div> <div class="col6 textAlignRight" id="comment">
<div class="row"> <?php if($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'commentClose'])): ?>
<?php if($this->getData(['module', $this->getUrl(0), 'posts', $articleId, '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: ?> <p>
<h3 id="comment"> <?php echo template::ico('comment', 'right'); ?>
<?php <?php
if ($module::$comments[$articleId] > 0) { if ($module::$comments[$articleId] > 0) {
echo '<a href="'. helper::baseUrl() . $this->getUrl(0) . '/' . $articleId .'">'; echo '<a href="'. helper::baseUrl() . $this->getUrl(0) . '/' . $articleId .'">';
echo $module::$comments[$articleId] . ' commentaire' . ($module::$comments[$articleId] > 1 ? 's' : ''); echo $module::$comments[$articleId] . ' commentaire' . ($module::$comments[$articleId] > 1 ? 's' : '');
echo '</a>'; echo '</a>';
} else { } else {
echo 'Pas encore de commentaire'; echo 'Pas encore de commentaire';
} }
?> ?>
</h3> </p>
<?php endif; ?> <?php endif; ?>
</div>
</div> </div>
<?php else: ?> <?php else: ?>
<div class="row rowArticle"> <div class="row rowArticle">