mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-05-28 04:36:06 -04:00
ShowMore: Use trait ipl\Web\Common\BaseTarget
This commit is contained in:
parent
a359add0a1
commit
8eaab649de
8 changed files with 10 additions and 7 deletions
|
|
@ -89,7 +89,7 @@ class CommentsController extends Controller
|
|||
if ($compact) {
|
||||
$this->addContent(
|
||||
(new ShowMore($results, Url::fromRequest()->without(['showCompact', 'limit'])))
|
||||
->setAttribute('data-base-target', '_next')
|
||||
->setBaseTarget('_next')
|
||||
->setAttribute('title', sprintf(
|
||||
t('Show all %d comments'),
|
||||
$comments->count()
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ class DowntimesController extends Controller
|
|||
if ($compact) {
|
||||
$this->addContent(
|
||||
(new ShowMore($results, Url::fromRequest()->without(['showCompact', 'limit'])))
|
||||
->setAttribute('data-base-target', '_next')
|
||||
->setBaseTarget('_next')
|
||||
->setAttribute('title', sprintf(
|
||||
t('Show all %d downtimes'),
|
||||
$downtimes->count()
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ class HostgroupsController extends Controller
|
|||
if ($compact) {
|
||||
$this->addContent(
|
||||
(new ShowMore($results, Url::fromRequest()->without(['showCompact', 'limit'])))
|
||||
->setAttribute('data-base-target', '_next')
|
||||
->setBaseTarget('_next')
|
||||
->setAttribute('title', sprintf(
|
||||
t('Show all %d hostgroups'),
|
||||
$hostgroups->count()
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ class HostsController extends Controller
|
|||
if ($compact) {
|
||||
$this->addContent(
|
||||
(new ShowMore($results, Url::fromRequest()->without(['showCompact', 'limit'])))
|
||||
->setAttribute('data-base-target', '_next')
|
||||
->setBaseTarget('_next')
|
||||
->setAttribute('title', sprintf(
|
||||
t('Show all %d hosts'),
|
||||
$hosts->count()
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ class NotificationsController extends Controller
|
|||
if ($compact) {
|
||||
$this->addContent(
|
||||
(new ShowMore($results, Url::fromRequest()->without(['showCompact', 'limit'])))
|
||||
->setAttribute('data-base-target', '_next')
|
||||
->setBaseTarget('_next')
|
||||
->setAttribute('title', sprintf(
|
||||
t('Show all %d notifications'),
|
||||
$notifications->count()
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ class ServicegroupsController extends Controller
|
|||
if ($compact) {
|
||||
$this->addContent(
|
||||
(new ShowMore($results, Url::fromRequest()->without(['showCompact', 'limit'])))
|
||||
->setAttribute('data-base-target', '_next')
|
||||
->setBaseTarget('_next')
|
||||
->setAttribute('title', sprintf(
|
||||
t('Show all %d servicegroups'),
|
||||
$servicegroups->count()
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ class ServicesController extends Controller
|
|||
if ($compact) {
|
||||
$this->addContent(
|
||||
(new ShowMore($results, Url::fromRequest()->without(['showCompact', 'limit'])))
|
||||
->setAttribute('data-base-target', '_next')
|
||||
->setBaseTarget('_next')
|
||||
->setAttribute('title', sprintf(
|
||||
t('Show all %d services'),
|
||||
$services->count()
|
||||
|
|
|
|||
|
|
@ -6,11 +6,14 @@ namespace Icinga\Module\Icingadb\Widget;
|
|||
|
||||
use ipl\Html\BaseHtmlElement;
|
||||
use ipl\Orm\ResultSet;
|
||||
use ipl\Web\Common\BaseTarget;
|
||||
use ipl\Web\Url;
|
||||
use ipl\Web\Widget\ActionLink;
|
||||
|
||||
class ShowMore extends BaseHtmlElement
|
||||
{
|
||||
use BaseTarget;
|
||||
|
||||
protected $defaultAttributes = ['class' => 'show-more'];
|
||||
|
||||
protected $tag = 'div';
|
||||
|
|
|
|||
Loading…
Reference in a new issue