monitoring: Count hosts having comments once in hosts/show.phtml
This commit is contained in:
parent
b82f4e5356
commit
56102a1e39
|
@ -123,12 +123,20 @@
|
|||
</h2>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (count($objects->getComments())): ?>
|
||||
<?php $havingCommentsCount = count($objects->getComments()) ?>
|
||||
<?php if ($havingCommentsCount): ?>
|
||||
<h2>
|
||||
<a href="<?= $havingCommentsLink ?>"
|
||||
title="<?= $this->translate('Comments') ?>">
|
||||
<?= $this->icon('comment') ?>
|
||||
<?= sprintf($this->translatePlural('%u comment', '%u comments', count($objects->getComments())), count($objects->getComments())) ?>
|
||||
<?= sprintf(
|
||||
$this->translatePlural(
|
||||
'%u comment',
|
||||
'%u comments',
|
||||
$havingCommentsCount
|
||||
),
|
||||
$havingCommentsCount
|
||||
) ?>
|
||||
</a>
|
||||
</h2>
|
||||
<?php endif ?>
|
||||
|
|
Loading…
Reference in New Issue