Streamline layout of all multi-views

Fix small inconsistencies between layout of downtime, comment, service and host multi-views.
This commit is contained in:
Matthias Jentsch 2015-05-18 17:13:46 +02:00
parent 52d1cb8c8f
commit 94555d7998
14 changed files with 40 additions and 49 deletions

View File

@ -55,8 +55,8 @@ class Monitoring_CommentsController extends Controller
'title' => $this->translate(
'Display detailed information about multiple comments.'
),
'icon' => 'comment',
'label' => $this->translate('Comments'),
'icon' => 'comment',
'label' => $this->translate('Comments') . sprintf(' (%d)', count($this->comments)),
'url' =>'monitoring/comments/show'
)
)->activate('comments');

View File

@ -75,8 +75,8 @@ class Monitoring_DowntimesController extends Controller
'title' => $this->translate(
'Display detailed information about multiple downtimes.'
),
'icon' => 'plug',
'label' => $this->translate('Downtimes'),
'icon' => 'plug',
'label' => $this->translate('Downtimes') . sprintf(' (%d)', count($this->downtimes)),
'url' =>'monitoring/downtimes/show'
)
)->activate('downtimes');

View File

@ -41,7 +41,7 @@ class Monitoring_HostsController extends Controller
$this->translate('Show summarized information for %u hosts'),
count($this->hostList)
),
'label' => sprintf($this->translate('Hosts (%d)'), count($this->hostList)),
'label' => $this->translate('Hosts') . sprintf(' (%d)', count($this->hostList)),
'url' => Url::fromRequest(),
'icon' => 'host'
)

View File

@ -40,7 +40,7 @@ class Monitoring_ServicesController extends Controller
$this->translate('Show summarized information for %u services'),
count($this->serviceList)
),
'label' => sprintf($this->translate('Services (%d)'), count($this->serviceList)),
'label' => $this->translate('Services') . sprintf(' (%d)', count($this->serviceList)),
'url' => Url::fromRequest(),
'icon' => 'services'
)

View File

@ -8,15 +8,8 @@
</div>
</div>
<div class="content">
<div class="content multi-commands">
<h3><?= $this->icon('reschedule') ?> <?= $this->translate('Commands') ?> </h3>
<p>
<?= sprintf(
$this->translate('Issue commands to all %s selected comments.'),
'<b>' . count($comments) . '</b>'
)
?>
<div>
<?= $this->qlink(
sprintf(
$this->translate('Remove %d comments'),
@ -29,6 +22,4 @@
'title' => $this->translate('Remove all selected comments.')
)
) ?>
</div>
</p>
</div>

View File

@ -7,15 +7,8 @@
<?= $this->render('partials/downtime/downtimes-header.phtml'); ?>
</p>
</div>
<div class="content">
<h3><?= $this->icon('reschedule') ?> <?= $this->translate('Commands') ?> </h3>
<p>
<?= sprintf(
$this->translate('Issue commands to all %s selected downtimes.'),
'<b>' . count($downtimes) . '</b>'
)
?>
<div>
<div class="content multi-commands">
<h3><?= $this->icon('reschedule') ?> <?= $this->translate('Commands') ?> </h3>
<?= $this->qlink(
sprintf(
$this->translate('Remove all %d scheduled downtimes'),
@ -28,6 +21,4 @@
'title' => $this->translate('Remove all selected downtimes.')
)
) ?>
</div>
</p>
</div>

View File

@ -8,7 +8,7 @@
</div>
<div class="content no-padding-top">
<div class="content multi-commands">
<h3>
<?= $this->icon('reschedule') ?>
<?= $this->translate('Commands') ?>
@ -165,7 +165,7 @@
$acknowledgedCount
),
'<b>' . $acknowledgedCount . '</b>'
); ?></p>
); ?>
<?= $removeAckForm ?>
</div>

View File

@ -18,13 +18,15 @@
</table>
<p>
<?php if ($i > 5): ?>
<?= $this->qlink(
sprintf($this->translate('List all %d comments …'), count($comments)),
sprintf($this->translate('show all %d comments'), $i),
$listAllLink,
null,
array(
'title' => $this->translate('List all'),
'icon' => $i > 5 ? 'down-open' : '',
'data-base-target' => "_next"
)
) ?>
<?php endif ?>
</p>

View File

@ -80,13 +80,15 @@
</table>
<p>
<?php if ($i > 5): ?>
<?= $this->qlink(
sprintf($this->translate('List all %d downtimes …'), count($downtimes)),
sprintf($this->translate('show all %d downtimes'), $i),
$listAllLink,
null,
array(
'title' => $this->translate('List all'),
'icon' => $i > 5 ? 'down-open' : '',
'data-base-target' => "_next"
)
) ?>
<?php endif ?>
</p>

View File

@ -25,15 +25,20 @@ $i = 0;
<?php endforeach ?>
</tbody>
</table>
<div class="hbox-item">
<div class="hbox-item multi-commands">
<?php if ($i > 5): ?>
<?=
$this->qlink(
sprintf($this->translate('list all %d hosts ...'), $i),
sprintf($this->translate('show all %d hosts'), $i),
$listAllLink,
null,
array('data-base-target' => '_next')
array(
'icon' => 'down-open',
'data-base-target' => '_next'
)
);
?>
<?php endif ?>
</div>
<?php endif ?>

View File

@ -27,14 +27,18 @@ $i = 0;
<?php endforeach ?>
</tbody>
</table>
<div class="hbox-item">
<?php
echo $this->qlink(
sprintf($this->translate('List all %d services ...'), $i),
<div class="hbox-item multi-commands">
<?php if ($i > 5): ?>
<?= $this->qlink(
sprintf($this->translate('show all %d services'), $i),
$listAllLink,
null,
array('data-base-target' => '_next')
array(
'icon' => 'down-open',
'data-base-target' => '_next'
)
);
?>
<?php endif ?>
</div>
<?php endif ?>

View File

@ -8,7 +8,7 @@
<?= $this->render('partials/service/objects-header.phtml'); ?>
</div>
<div class="content no-padding-top">
<div class="content multi-commands">
<h3>
<?= $this->icon('reschedule') ?>
<?= $this->translate('Commands') ?>

View File

@ -373,6 +373,7 @@ html {
width: 1px;
}
.no-padding-top {
.multi-commands {
padding-top: 0em;
font-size: 0.9em;
}

View File

@ -933,11 +933,6 @@ table.statesummary {
width: auto;
border-collapse: separate;
td {
padding: 0em 0.4em 0em 0.4em;
line-height: 1.2em;
}
tr.state td.state {
width: auto;
font-weight: bold;