From c4661d4ef0537c67789cf624ae1223a5a1f6a34c Mon Sep 17 00:00:00 2001 From: Florian Strohmaier Date: Wed, 9 Aug 2017 10:10:13 +0200 Subject: [PATCH] WIP --- .../views/scripts/show/components/comments.phtml | 12 +++++++----- .../views/scripts/show/components/downtime.phtml | 14 +++++++------- .../scripts/show/components/notifications.phtml | 2 +- modules/monitoring/public/css/module.less | 2 +- public/css/icinga/forms.less | 1 + public/css/icinga/main.less | 11 ++++++++++- 6 files changed, 27 insertions(+), 15 deletions(-) diff --git a/modules/monitoring/application/views/scripts/show/components/comments.phtml b/modules/monitoring/application/views/scripts/show/components/comments.phtml index d8cbdc910..4e116c2c5 100644 --- a/modules/monitoring/application/views/scripts/show/components/comments.phtml +++ b/modules/monitoring/application/views/scripts/show/components/comments.phtml @@ -35,14 +35,12 @@ if (empty($object->comments) && ! $addLink) { translate('Comments'); - if (! empty($object->comments) && $addLink) { - echo '
' . $addLink; - } ?> - comments)): + + endif ?> + comments)): ?>
comments as $comment): ?>
@@ -72,6 +70,10 @@ if (empty($object->comments) && ! $addLink) {
+ translate('No comments have been sent for this issue.'); + echo '

' . $msg . '

'; + ?> diff --git a/modules/monitoring/application/views/scripts/show/components/downtime.phtml b/modules/monitoring/application/views/scripts/show/components/downtime.phtml index fdc1b54aa..7aa90e33e 100644 --- a/modules/monitoring/application/views/scripts/show/components/downtime.phtml +++ b/modules/monitoring/application/views/scripts/show/components/downtime.phtml @@ -39,14 +39,10 @@ if (empty($object->comments) && ! $addLink) { translate('Downtimes'); - if (! empty($object->downtimes) && $addLink) { - echo '
' . $addLink; - } ?> - downtimes)): - echo $addLink; - else: ?> + + downtimes)): ?>
downtimes as $downtime): if ((bool) $downtime->is_in_effect) { @@ -112,6 +108,10 @@ if (empty($object->comments) && ! $addLink) {
- + translate('No downtimes have been scheduled for this issue.'); + echo '

' . $msg . '

'; + endif; + ?> diff --git a/modules/monitoring/application/views/scripts/show/components/notifications.phtml b/modules/monitoring/application/views/scripts/show/components/notifications.phtml index 3e8c66584..57ffc1ce5 100644 --- a/modules/monitoring/application/views/scripts/show/components/notifications.phtml +++ b/modules/monitoring/application/views/scripts/show/components/notifications.phtml @@ -61,7 +61,7 @@ } else { $msg = $this->translate('No notification has been sent for this issue.'); } - echo $msg; + echo '

' . $msg . '

'; } ?> diff --git a/modules/monitoring/public/css/module.less b/modules/monitoring/public/css/module.less index 5ce6c93e9..d44e2a6b6 100644 --- a/modules/monitoring/public/css/module.less +++ b/modules/monitoring/public/css/module.less @@ -518,7 +518,7 @@ form.instance-features span.description, form.object-features span.description { .object-features { .control-label-group { - text-align: left; + text-align: right; padding: @table-column-padding; padding-left: 0; width: @name-value-table-name-width; diff --git a/public/css/icinga/forms.less b/public/css/icinga/forms.less index e363a8c28..c5e77dec4 100644 --- a/public/css/icinga/forms.less +++ b/public/css/icinga/forms.less @@ -111,6 +111,7 @@ label { padding-right: @horizontal-padding; text-align: right; width: 10em; + vertical-align: top; } .control-group { diff --git a/public/css/icinga/main.less b/public/css/icinga/main.less index 98b8adabb..90e541821 100644 --- a/public/css/icinga/main.less +++ b/public/css/icinga/main.less @@ -49,6 +49,10 @@ } } +.empty { + color: @gray-light; +} + .section { margin-bottom: 2em; } @@ -172,6 +176,10 @@ a:hover > .icon-cancel { .name-value-table { width: 100%; + + p.empty { + margin-bottom: 0; + } } .name-value-table > tbody > tr > th { @@ -179,7 +187,8 @@ a:hover > .icon-cancel { // Reset default font-weight font-weight: normal; padding-left: 0; - text-align: left; + padding-right: 1em; + text-align: right; vertical-align: top; width: @name-value-table-name-width; }