Add proper titles to service multi selection view

refs #8458
This commit is contained in:
Johannes Meyer 2015-02-23 17:29:50 +01:00
parent 8991b7ed83
commit 32e048693a

View File

@ -1,159 +1,129 @@
<div class="controls"> <div class="controls">
<?= $this->render('partials/service/objects-header.phtml') ?> <?= $this->render('partials/service/objects-header.phtml'); ?>
</div> </div>
<div class="content"> <div class="content">
<?php if (($serviceCount = count($objects)) === 0): ?> <?php if (($serviceCount = count($objects)) === 0): ?>
<?= $this->translate('No services matching the filter') ?> <?= $this->translate('No services matching the filter'); ?>
<?php else: ?> <?php else: ?>
<h3><?= sprintf($this->translatePlural('%u Service', '%u Services', $serviceCount), $serviceCount); ?></h3>
<div><?= $this->qlink(
sprintf($this->translate('List all %u services'), $serviceCount),
$listAllLink
); ?></div>
<div> <div>
<a href="<?= $listAllLink ?>" title="<?= sprintf($this->translate('List all %u services'), $serviceCount) ?>"> <?= $checkNowForm; ?>
<?= $this->translate('List all') ?>
</a>
</div> </div>
<div><?= $this->qlink(
$this->icon('reschedule') . ' ' . sprintf(
$this->translate('Reschedule the next check for all %u services'),
$serviceCount
),
$rescheduleAllLink,
null,
null,
false
); ?></div>
<div><?= $this->qlink(
$this->icon('plug') . ' ' . sprintf($this->translate('Schedule a downtime for all %u services'), $serviceCount),
$downtimeAllLink,
null,
null,
false
); ?></div>
<div><?= $this->qlink(
$this->icon('reply') . ' ' . sprintf(
$this->translate('Submit a passive check result for all %u services'),
$serviceCount
),
$processCheckResultAllLink,
null,
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 service checks') ?>
</a>
</div>
<div>
<a href="<?= $downtimeAllLink ?>">
<?= $this->icon('plug'); ?>
<?= $this->translate('Schedule service 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 Service Problem', '%u Unhandled Service Problem',
'%u Unhandled Service Problems', '%u Unhandled Service 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 service problem',
'Schedule downtimes for %u unhandled service problems',
$unhandledCount
),
$unhandledCount
) ?>">
<?= $this->icon('plug'); ?>
<?= sprintf(
$this->translatePlural( $this->translatePlural(
'Schedule downtime for unhandled service problem', 'Schedule a downtime for %u unhandled service problem',
'Schedule downtimes for unhandled service problems', 'Schedule a downtime for %u unhandled service problems',
$unhandledCount $unhandledCount
), ),
$unhandledCount $unhandledCount
) ?>
</a>
</div>
<div>
<a href="<?= $acknowledgeUnhandledLink ?>" title="<?= sprintf(
$this->translatePlural(
'Acknowledge %u unhandled service problem',
'Acknowledge %u unhandled service 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 service problem', 'Acknowledge %u unhandled service problem',
'Acknowledge unhandled service problems', 'Acknowledge %u unhandled service 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 Service Problem',
$this->translatePlural( '%u Acknowledged Service Problems',
'%u Acknowledged Service Problem',
'%u Acknowledged Service 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 ?>" title="<?= sprintf( 'List %u service currently in downtime',
$this->translatePlural( 'List %u services currently in downtime',
'List %u service currently in downtime', $inDowntimeCount
'List %u services currently in downtime', ),
$inDowntimeCount $inDowntimeCount
), ),
$inDowntimeCount) ?>"> $inDowntimeLink,
<?= $this->icon('plug'); ?> null,
<?= sprintf( null,
$this->translatePlural( false
'List %u service currently in downtime', ); ?></h2>
'List %u services currently in downtime', <?php endif ?>
$inDowntimeCount <?php if (($commentCount = count($objects->getComments())) > 0): ?>
), <h2><?= $this->qlink(
$inDowntimeCount $this->icon('comment') . ' ' . sprintf(
) ?> $this->translatePlural(
</a> 'List %u service comment',
</h2> 'List %u service comments',
<?php endif ?>
<?php $commentCount = count($objects->getComments()) ?>
<?php if ($commentCount): ?>
<h2>
<a href="<?= $commentsLink ?>" title="<?= sprintf(
$this->translatePlural(
'List %u service comment',
'List %u service comments',
$commentCount
),
$commentCount $commentCount
) ?>"> ),
<?= $this->icon('comment'); ?> $commentCount
<?= sprintf( ),
$this->translatePlural( $commentsLink,
'List %u service comment', null,
'List %u service comments', null,
$commentCount false
), ); ?></h2>
$commentCount <?php endif ?>
) ?>
</a>
</h2>
<?php endif ?>
<?php endif ?> <?php endif ?>
</div> </div>