From 3d0e63fcb9585124e1f7585270be8edf2d3f3577 Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Tue, 29 Sep 2015 10:37:32 +0200 Subject: [PATCH] Turn contact and contactgroup view into list refs #5543 --- .../views/scripts/list/contactgroups.phtml | 78 +++++++------ .../views/scripts/list/contacts.phtml | 108 ++++++++++-------- 2 files changed, 99 insertions(+), 87 deletions(-) diff --git a/modules/monitoring/application/views/scripts/list/contactgroups.phtml b/modules/monitoring/application/views/scripts/list/contactgroups.phtml index 099db39791..6176feea8e 100644 --- a/modules/monitoring/application/views/scripts/list/contactgroups.phtml +++ b/modules/monitoring/application/views/scripts/list/contactgroups.phtml @@ -1,4 +1,7 @@ -compact): ?> +compact): ?>
tabs; ?> sortBox; ?> @@ -15,41 +18,40 @@ if (count($groupData) === 0) { return; } ?> -
- $groupInfo): ?> -
-
-

- -

- -
-
- -
- img('static/gravatar', array('email' => $c->contact_email)); ?> - qlink( - $c->contact_alias, - 'monitoring/show/contact', - array('contact_name' => $c->contact_name), - array('title' => sprintf( - $this->translate('Show detailed information about %s'), - $c->contact_alias - )) - ); ?> -

-contact_email): ?> - contact_email; ?> -contact_pager): ?> -
- contact_pager; ?> - -

-
- -
-
- -
+ + + + + + + + + + + + $groupInfo): ?> + + + + + + + +
translate('Hostgroup') ?>translate('Alias') ?>
+ + + qlink( + $groupName, + 'monitoring/list/contacts', + array('contactgroup' => $groupName), + array('title' => sprintf( + $this->translate('Show detailed information about %s'), + $groupName + )) + ); ?> + + + + +
diff --git a/modules/monitoring/application/views/scripts/list/contacts.phtml b/modules/monitoring/application/views/scripts/list/contacts.phtml index 4cb32101d8..851a539800 100644 --- a/modules/monitoring/application/views/scripts/list/contacts.phtml +++ b/modules/monitoring/application/views/scripts/list/contacts.phtml @@ -7,62 +7,72 @@ filterEditor; ?> -
+ + + + + + + + + + peekAhead($this->compact) as $contact): ?> -
- img('static/gravatar', array('email' => $contact->contact_email)); ?> - qlink( +
+ + + + + contact_notify_service_timeperiod): ?> + + + + contact_notify_host_timeperiod): ?> + + + + + +
translate('Name') ?>translate('Email') ?>translate('Pager') ?>
+ qlink( $contact->contact_name, 'monitoring/show/contact', array('contact_name' => $contact->contact_name), array('title' => sprintf( $this->translate('Show detailed information about %s'), $contact->contact_alias - )) - ); ?> (contact_alias; ?>) -
- translate('Email'); ?>: - escape($contact->contact_email); ?> - -
+ ), 'class' => 'rowaction') + ); ?> +
+ translate('Email'); ?>: + + escape($contact->contact_email); ?> + + contact_pager): ?> -
- translate('Pager') ?>: - escape($contact->contact_pager) ?> -
- -
-
- contact_notify_service_timeperiod): ?> -
- translate('Service notification period') ?>: - escape($contact->contact_notify_service_timeperiod) ?> -
- - contact_notify_host_timeperiod): ?>
- translate('Host notification period') ?>: - escape($contact->contact_notify_host_timeperiod) ?> + escape($contact->contact_pager) ?>
- -
- - -
- - hasResult()): ?> - translate('No contacts found matching the filter'); ?> - hasMore()): ?> - qlink( - $this->translate('Show More'), - $this->url()->without(array('view', 'limit')), - null, - array( - 'data-base-target' => '_next', - 'class' => 'pull-right show-more' - ) - ); ?> - - + +
+ escape($contact->contact_notify_service_timeperiod) ?> + + escape($contact->contact_notify_host_timeperiod) ?> +
+ +hasResult()): ?> + translate('No contacts found matching the filter'); ?> +hasMore()): ?> + qlink( + $this->translate('Show More'), + $this->url()->without(array('view', 'limit')), + null, + array( + 'data-base-target' => '_next', + 'class' => 'pull-right show-more' + ) + ); ?> + +