Add proper titles to the host multi selection view

refs #8458
This commit is contained in:
Johannes Meyer 2015-02-23 17:22:07 +01:00
parent 371f895188
commit 96c7b22c16

View File

@ -1,174 +1,129 @@
<div class="controls"> <div class="controls">
<?= $this->render('partials/host/objects-header.phtml') ?> <?= $this->render('partials/host/objects-header.phtml'); ?>
</div> </div>
<div class="content"> <div class="content">
<?php if (($hostCount = count($objects)) === 0): ?> <?php if (($hostCount = count($objects)) === 0): ?>
<?= $this->translate('No hosts matching the filter') ?> <?= $this->translate('No hosts matching the filter'); ?>
<?php else: ?> <?php else: ?>
<h3> <h3><?= sprintf($this->translatePlural('%u Host', '%u Hosts', $hostCount), $hostCount); ?></h3>
<?= sprintf( <div><?= $this->qlink(
$this->translatePlural( sprintf($this->translate('List all %u hosts'), $hostCount),
'%u Host', $listAllLink
'%u Hosts', ); ?></div>
$hostCount <div>
), <?= $checkNowForm; ?>
</div>
<div><?= $this->qlink(
$this->icon('reschedule') . ' ' . sprintf(
$this->translate('Reschedule the next check for all %u hosts'),
$hostCount $hostCount
) ?> ),
</h3> $rescheduleAllLink,
null,
<div> null,
<a href="<?= $listAllLink ?>" title="<?= sprintf( false
$this->translate('List all %u hosts'), ); ?></div>
<div><?= $this->qlink(
$this->icon('plug') . ' ' . sprintf($this->translate('Schedule a downtime for all %u hosts'), $hostCount),
$downtimeAllLink,
null,
null,
false
); ?></div>
<div><?= $this->qlink(
$this->icon('reply') . ' ' . sprintf(
$this->translate('Submit a passive check result for all %u hosts'),
$hostCount $hostCount
); ?>"> ),
<?= $this->translate('List all') ?> $processCheckResultAllLink,
</a> null,
</div> null,
false
); ?></div>
<?php if (($unhandledCount = count($unhandledObjects)) > 0): ?>
<div> <div>
<?= $checkNowForm ?> <h3><?= sprintf(
</div>
<div>
<a href="<?= $rescheduleAllLink ?>">
<?= $this->icon('reschedule'); ?>
<?= $this->translate('Reschedule host checks') ?>
</a>
</div>
<div>
<a href="<?= $downtimeAllLink ?>">
<?= $this->icon('plug'); ?>
<?= $this->translate('Schedule host downtimes') ?>
</a>
</div>
<div>
<a href="<?= $processCheckResultAllLink; ?>">
<?= $this->icon('reply'); ?>
<?= $this->translate('Submit passive check results'); ?>
</a>
</div>
<?php if (! empty($unhandledObjects)): ?>
<h3>
<?php $unhandledCount = count($unhandledObjects) ?>
<?= sprintf(
$this->translatePlural( $this->translatePlural(
'%u Unhandled Host Problem', '%u Unhandled Host Problem',
'%u Unhandled Host Problems', '%u Unhandled Host Problems',
$unhandledCount $unhandledCount
), ),
$unhandledCount $unhandledCount
) ?> ); ?></h3>
</h3> <div><?= $this->qlink(
<div> $this->icon('plug') . ' ' . sprintf(
<a href="<?= $downtimeUnhandledLink ?>" title="<?= sprintf(
$this->translatePlural(
'Schedule downtime for %u unhandled host problem',
'Schedule downtimes for %u unhandled host problems',
$unhandledCount
),
$unhandledCount
) ?>">
<?= $this->icon('plug'); ?>
<?= sprintf(
$this->translatePlural( $this->translatePlural(
'Schedule downtime for unhandled host problem', 'Schedule a downtime for %u unhandled host problem',
'Schedule downtimes for unhandled host problems', 'Schedule a downtime for %u unhandled host problems',
$unhandledCount $unhandledCount
), ),
$unhandledCount $unhandledCount
) ?>
</a>
</div>
<div>
<a href="<?= $acknowledgeUnhandledLink ?>" title="<?= sprintf(
$this->translatePlural(
'Acknowledge %u unhandled host problem',
'Acknowledge %u unhandled host problems',
$unhandledCount
), ),
$unhandledCount $downtimeUnhandledLink,
) ?>"> null,
<?= $this->icon('ok'); ?> null,
<?= sprintf( false
); ?></div>
<div><?= $this->qlink(
$this->icon('ok') . ' ' . sprintf(
$this->translatePlural( $this->translatePlural(
'Acknowledge unhandled host problem', 'Acknowledge %u unhandled host problem',
'Acknowledge unhandled host problems', 'Acknowledge %u unhandled host problems',
$unhandledCount $unhandledCount
), ),
$unhandledCount $unhandledCount
) ?> ),
</a> $acknowledgeUnhandledLink,
null,
null,
false
); ?></div>
</div> </div>
<?php endif ?> <?php endif ?>
<?php if (($acknowledgedCount = count($acknowledgedObjects)) > 0): ?>
<?php if (! empty($acknowledgedObjects)): ?> <div>
<h2> <h2><?= sprintf(
<?php $acknowledgedCount = count($acknowledgedObjects) ?> $this->translatePlural(
<?= sprintf( '%u Acknowledged Host Problem',
$this->translatePlural( '%u Acknowledged Host Problems',
'%u Acknowledged Host Problem',
'%u Acknowledged Host Problems',
$acknowledgedCount
),
$acknowledgedCount $acknowledgedCount
) ?> ),
</h2> $acknowledgedCount
<div> ); ?></h2>
<?= $removeAckForm ?> <?= $removeAckForm ?>
</div> </div>
<?php endif ?> <?php endif ?>
<?php if (($inDowntimeCount = count($objectsInDowntime)) > 0): ?>
<?php if (! empty($objectsInDowntime)): ?> <h2><?= $this->qlink(
<h2> $this->icon('plug') . ' ' . sprintf(
<?php $inDowntimeCount = count($objectsInDowntime) ?> $this->translatePlural(
<a href="<?= $inDowntimeLink ?>" 'List %u host currently in downtime',
title="<?= sprintf( 'List %u hosts currently in downtime',
$this->translatePlural( $inDowntimeCount
'List %u host which is in downtime', ),
'List %u hosts which are in downtime', $inDowntimeCount
$inDowntimeCount ),
), $inDowntimeLink,
$inDowntimeCount null,
) ?>"> null,
<?= $this->icon('plug'); ?> false
<?= sprintf( ); ?></h2>
$this->translatePlural( <?php endif ?>
'List %u host currently in downtime', <?php if (($commentCount = count($objects->getComments())) > 0): ?>
'List %u hosts currently downtime', <h2><?= $this->qlink(
$inDowntimeCount $this->icon('comment') . ' ' . sprintf(
), $this->translatePlural(
$inDowntimeCount 'List %u host comment',
) ?> 'List %u host comments',
</a> $commentCount
</h2> ),
<?php endif ?> $commentCount
),
<?php $commentCount = count($objects->getComments()) ?> $commentsLink,
<?php if ($commentCount): ?> null,
<h2> null,
<a href="<?= $commentsLink ?>" false
title="<?= sprintf( ); ?></h2>
$this->translatePlural( <?php endif ?>
'List %u host comment',
'List %u host comments',
$commentCount
),
$commentCount
) ?>">
<?= $this->icon('comment'); ?>
<?= sprintf(
$this->translatePlural(
'List %u host comment',
'List %u host comments',
$commentCount
),
$commentCount
) ?>
</a>
</h2>
<?php endif ?>
<?php endif ?> <?php endif ?>
</div> </div>