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( 'title' => $this->translate(
'Display detailed information about multiple comments.' 'Display detailed information about multiple comments.'
), ),
'icon' => 'comment', 'icon' => 'comment',
'label' => $this->translate('Comments'), 'label' => $this->translate('Comments') . sprintf(' (%d)', count($this->comments)),
'url' =>'monitoring/comments/show' 'url' =>'monitoring/comments/show'
) )
)->activate('comments'); )->activate('comments');

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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