diff --git a/application/controllers/ChannelsController.php b/application/controllers/ChannelsController.php index 1e87254a..7f7c2605 100644 --- a/application/controllers/ChannelsController.php +++ b/application/controllers/ChannelsController.php @@ -85,7 +85,7 @@ public function indexAction() $this->addControl($searchBar); $this->addContent( (new ButtonLink( - t('Add Channel'), + t('New Channel'), Url::fromPath('notifications/channels/add'), 'plus' ))->setBaseTarget('_next') @@ -101,7 +101,7 @@ public function indexAction() public function addAction() { - $this->addTitleTab(t('Add Channel')); + $this->addTitleTab(t('New Channel')); $form = (new ChannelForm($this->db)) ->on(ChannelForm::ON_SUCCESS, function (ChannelForm $form) { Notification::success( diff --git a/application/controllers/ContactsController.php b/application/controllers/ContactsController.php index de794f78..d4599442 100644 --- a/application/controllers/ContactsController.php +++ b/application/controllers/ContactsController.php @@ -88,7 +88,7 @@ public function indexAction() $this->addControl($searchBar); $this->addContent( (new ButtonLink( - t('Add Contact'), + t('New Contact'), 'notifications/contacts/add', 'plus' ))->setBaseTarget('_next') @@ -109,7 +109,7 @@ public function indexAction() public function addAction() { - $this->addTitleTab(t('Add Contact')); + $this->addTitleTab(t('New Contact')); $form = (new ContactForm($this->db)) ->on(ContactForm::ON_SUCCESS, function (ContactForm $form) { diff --git a/application/controllers/EventRulesController.php b/application/controllers/EventRulesController.php index 47899613..37f24132 100644 --- a/application/controllers/EventRulesController.php +++ b/application/controllers/EventRulesController.php @@ -89,9 +89,10 @@ public function indexAction(): void 'notifications/event-rules/add', 'plus' ))->setBaseTarget('_next') - ->addAttributes(['class' => 'new-event-rule']) + ->addAttributes(['class' => 'add-new-component']) ); + $this->content->getAttributes()->add(['class' => 'full-width']); $this->addContent(new EventRuleList($eventRules)); if (! $searchBar->hasBeenSubmitted() && $searchBar->hasBeenSent()) { @@ -104,7 +105,7 @@ public function indexAction(): void public function addAction(): void { - $this->addTitleTab(t('Add Event Rule')); + $this->addTitleTab(t('New Event Rule')); $this->getTabs()->setRefreshUrl(Url::fromPath('notifications/event-rules/add')); $this->controls->addAttributes(['class' => 'event-rule-detail']); diff --git a/application/controllers/EventsController.php b/application/controllers/EventsController.php index 2b2e76a4..3aa040b4 100644 --- a/application/controllers/EventsController.php +++ b/application/controllers/EventsController.php @@ -90,6 +90,7 @@ public function indexAction(): void $eventList->setPageNumber($page); } + $this->content->getAttributes()->add(['class' => 'full-width']); if ($compact && $page > 1) { $this->document->addFrom($eventList); } else { diff --git a/application/controllers/IncidentsController.php b/application/controllers/IncidentsController.php index 94cd61fc..0ce41946 100644 --- a/application/controllers/IncidentsController.php +++ b/application/controllers/IncidentsController.php @@ -62,6 +62,7 @@ public function indexAction(): void $this->addControl($limitControl); $this->addControl($searchBar); + $this->content->getAttributes()->add(['class' => 'full-width']); $this->addContent(new IncidentList($incidents)); if (! $searchBar->hasBeenSubmitted() && $searchBar->hasBeenSent()) { diff --git a/application/forms/ChannelForm.php b/application/forms/ChannelForm.php index a8a31dec..37a38d2b 100644 --- a/application/forms/ChannelForm.php +++ b/application/forms/ChannelForm.php @@ -156,7 +156,7 @@ protected function assemble() 'submit', [ 'label' => $this->channelId === null ? - $this->translate('Add Channel') : + $this->translate('Create Channel') : $this->translate('Save Changes') ] ); @@ -167,7 +167,7 @@ protected function assemble() 'submit', 'delete', [ - 'label' => $this->translate('Delete'), + 'label' => $this->translate('Delete Channel'), 'class' => 'btn-remove', 'formnovalidate' => true ] diff --git a/application/forms/EntryForm.php b/application/forms/EntryForm.php index 59f14469..b34fcae7 100644 --- a/application/forms/EntryForm.php +++ b/application/forms/EntryForm.php @@ -285,17 +285,9 @@ protected function assemble() ]); $additionalButtons = []; - $cancelBtn = $this->createElement('submit', 'cancel', [ - 'label' => $this->translate('Cancel'), - 'class' => 'btn-cancel', - 'formnovalidate' => true - ]); - $this->registerElement($cancelBtn); - $additionalButtons[] = $cancelBtn; - if ($this->showRemoveButton) { $removeBtn = $this->createElement('submit', 'remove', [ - 'label' => $this->translate('Remove'), + 'label' => $this->translate('Remove Entry'), 'class' => 'btn-remove', 'formnovalidate' => true ]); @@ -303,6 +295,14 @@ protected function assemble() $additionalButtons[] = $removeBtn; } + $cancelBtn = $this->createElement('submit', 'cancel', [ + 'label' => $this->translate('Cancel'), + 'class' => 'btn-cancel btn-default', + 'formnovalidate' => true + ]); + $this->registerElement($cancelBtn); + $additionalButtons[] = $cancelBtn; + $this->getElement('submit')->prependWrapper((new HtmlDocument())->setHtmlContent(...$additionalButtons)); $this->addElement($this->createCsrfCounterMeasure(Session::getSession()->getId())); diff --git a/application/forms/SaveEventRuleForm.php b/application/forms/SaveEventRuleForm.php index 0e5a0626..7e6ff1c9 100644 --- a/application/forms/SaveEventRuleForm.php +++ b/application/forms/SaveEventRuleForm.php @@ -113,7 +113,7 @@ public function setSubmitLabel(string $label): self */ public function getSubmitLabel(): string { - return $this->submitLabel ?? t('Add Event Rule'); + return $this->submitLabel ?? t('Create Event Rule'); } /** diff --git a/application/forms/ScheduleForm.php b/application/forms/ScheduleForm.php index 233fe950..24e2f901 100644 --- a/application/forms/ScheduleForm.php +++ b/application/forms/ScheduleForm.php @@ -122,17 +122,9 @@ protected function assemble() ]); $additionalButtons = []; - $cancelBtn = $this->createElement('submit', 'cancel', [ - 'label' => $this->translate('Cancel'), - 'class' => 'btn-cancel', - 'formnovalidate' => true - ]); - $this->registerElement($cancelBtn); - $additionalButtons[] = $cancelBtn; - if ($this->showRemoveButton) { $removeBtn = $this->createElement('submit', 'remove', [ - 'label' => $this->translate('Remove'), + 'label' => $this->translate('Delete Schedule'), 'class' => 'btn-remove', 'formnovalidate' => true ]); @@ -140,6 +132,14 @@ protected function assemble() $additionalButtons[] = $removeBtn; } + $cancelBtn = $this->createElement('submit', 'cancel', [ + 'label' => $this->translate('Cancel'), + 'class' => 'btn-cancel btn-default', + 'formnovalidate' => true + ]); + $this->registerElement($cancelBtn); + $additionalButtons[] = $cancelBtn; + $this->getElement('submit')->prependWrapper((new HtmlDocument())->setHtmlContent(...$additionalButtons)); $this->addElement($this->createCsrfCounterMeasure(Session::getSession()->getId())); diff --git a/library/Notifications/Web/Form/ContactForm.php b/library/Notifications/Web/Form/ContactForm.php index c70bce7e..3cef308b 100644 --- a/library/Notifications/Web/Form/ContactForm.php +++ b/library/Notifications/Web/Form/ContactForm.php @@ -156,7 +156,7 @@ protected function assemble() 'submit', [ 'label' => $this->contactId === null ? - $this->translate('Add Contact') : + $this->translate('Create Contact') : $this->translate('Save Changes') ] ); @@ -166,7 +166,7 @@ protected function assemble() 'submit', 'delete', [ - 'label' => $this->translate('Delete'), + 'label' => $this->translate('Delete Contact'), 'class' => 'btn-remove', 'formnovalidate' => true ] diff --git a/library/Notifications/Widget/ItemList/EventListItem.php b/library/Notifications/Widget/ItemList/EventListItem.php index 2b3dfeeb..cffa019c 100644 --- a/library/Notifications/Widget/ItemList/EventListItem.php +++ b/library/Notifications/Widget/ItemList/EventListItem.php @@ -133,6 +133,5 @@ protected function assembleMain(BaseHtmlElement $main): void { $main->add($this->createHeader()); $main->add($this->createCaption()); - $main->add($this->createFooter()); } } diff --git a/library/Notifications/Widget/Schedule.php b/library/Notifications/Widget/Schedule.php index 13bbed38..83b1354f 100644 --- a/library/Notifications/Widget/Schedule.php +++ b/library/Notifications/Widget/Schedule.php @@ -118,7 +118,7 @@ public function assemble() new Link( [ new Icon('plus'), - t('Add new entry') + t('Add Entry') ], Url::fromPath('notifications/schedule/add-entry', ['schedule' => $this->schedule->id]), ['class' => 'button-link'] diff --git a/public/css/calendar.less b/public/css/calendar.less index c653f2f1..98ac5633 100644 --- a/public/css/calendar.less +++ b/public/css/calendar.less @@ -90,10 +90,6 @@ column-gap: .5em; overflow: hidden; - time { - margin-right: .5em; - } - .attendee { word-break: break-word; } diff --git a/public/css/common.less b/public/css/common.less index b9fa4e10..23d04981 100644 --- a/public/css/common.less +++ b/public/css/common.less @@ -25,6 +25,13 @@ display: block; .box-shadow(0, 0, 0, 1px, @gray-lighter); } + + .item-list .list-item { + .main, .visual { + padding-top: 0; + padding-bottom: 0; + } + } } .source-icon { diff --git a/public/css/detail/event-rule-detail.less b/public/css/detail/event-rule-detail.less index 6f85b48d..9a437f5e 100644 --- a/public/css/detail/event-rule-detail.less +++ b/public/css/detail/event-rule-detail.less @@ -66,6 +66,10 @@ &:first-child:before { content: ""; display: block; + top: 50%; + } + + &:first-child:last-child:before { top: calc(~"50% - 1em"); } @@ -202,7 +206,7 @@ } .cache-notice { - margin: 1em; + margin: 1em 0; padding: 1em; background-color: @gray-lighter; text-align: center; @@ -358,10 +362,6 @@ width: 14.5em; } -.new-event-rule { - margin-bottom: 1em; -} - .event-rule-and-save-forms { display: flex; flex-wrap: wrap; @@ -402,10 +402,11 @@ margin-left: 1em; &:disabled { - background: @gray-light; + background: @gray-lighter; color: @disabled-gray; cursor: not-allowed; border-color: transparent; + opacity: .5; } &.btn-remove { @@ -428,9 +429,10 @@ .remove-escalation-form { button[disabled] { &:disabled { - background: @gray-light; + background: @gray-lighter; color: @disabled-gray; cursor: not-allowed; + opacity: .5; } } } diff --git a/public/css/event-source-badge.less b/public/css/event-source-badge.less index 513347a8..b0d4b9a0 100644 --- a/public/css/event-source-badge.less +++ b/public/css/event-source-badge.less @@ -6,16 +6,15 @@ } .name { - position: relative; display: inline-block; height: 2em; + line-height: 2 - 2 * @ball-pad; border-bottom-right-radius: 1em; border-top-right-radius: 1em; - z-index: -99; padding: @ball-pad .5em @ball-pad 1.5em; margin-left: 1em; - background-color: @gray; - color: @text-color-inverted; + background-color: @gray-lighter; + color: @text-color; } } diff --git a/public/css/form.less b/public/css/form.less index d78d99e2..cb77defa 100644 --- a/public/css/form.less +++ b/public/css/form.less @@ -15,6 +15,14 @@ border-radius: 0; border: none; } + + .form-controls { + margin-top: 2em; + + .btn-remove { + margin-right: auto; + } + } } .entry-form { @@ -77,3 +85,21 @@ content: "\f0c0"; } } + +.icinga-form { + .form-controls { + .btn-remove:not(:hover) { + border-color: transparent; + } + + .btn-default { + background: @low-sat-blue; + color: @icinga-blue; + border-color: transparent; + + &:hover { + background: @low-sat-blue-dark; + } + } + } +} diff --git a/public/css/list/list-item.less b/public/css/list/list-item.less index 5d75d4ea..9e954118 100644 --- a/public/css/list/list-item.less +++ b/public/css/list/list-item.less @@ -61,4 +61,8 @@ line-height: 1.5*.857em; } } + + .meta { + white-space: nowrap; + } }