diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 11:46:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 11:46:43 +0000 |
commit | 3e02d5aff85babc3ffbfcf52313f2108e313aa23 (patch) | |
tree | b01f3923360c20a6a504aff42d45670c58af3ec5 /application/views/scripts/dashboard/settings.phtml | |
parent | Initial commit. (diff) | |
download | icingaweb2-upstream.tar.xz icingaweb2-upstream.zip |
Adding upstream version 2.12.1.upstream/2.12.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'application/views/scripts/dashboard/settings.phtml')
-rw-r--r-- | application/views/scripts/dashboard/settings.phtml | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/application/views/scripts/dashboard/settings.phtml b/application/views/scripts/dashboard/settings.phtml new file mode 100644 index 0000000..52d4f14 --- /dev/null +++ b/application/views/scripts/dashboard/settings.phtml @@ -0,0 +1,91 @@ +<div class="controls"> + <?= $this->tabs ?> +</div> +<div class="content"> + <h1><?= t('Dashboard Settings'); ?></h1> + + <table class="avp action" data-base-target="_next"> + <thead> + <tr> + <th> + <strong><?= t('Dashlet Name') ?></strong> + </th> + <th> + <strong><?= t('Url') ?></strong> + </th> + <th class="icon-col"> </th> + </tr> + </thead> + <tbody> + <?php foreach ($this->dashboard->getPanes() as $pane): ?> + <?php if ($pane->getDisabled()) continue; ?> + <tr> + <th colspan="2"> + <?php if ($pane->isUserWidget()): ?> + <?= $this->qlink( + $pane->getName(), + 'dashboard/rename-pane', + array('pane' => $pane->getName()), + array('title' => sprintf($this->translate('Edit pane %s'), $pane->getName())) + ) ?> + <?php else: ?> + <?= $this->escape($pane->getName()) ?> + <?php endif ?> + </th> + <th> + <?= $this->qlink( + '', + 'dashboard/remove-pane', + array('pane' => $pane->getName()), + array( + 'icon' => 'trash', + 'title' => sprintf($this->translate('Remove pane %s'), $pane->getName()) + ) + ); ?> + </th> + </tr> + <?php $dashlets = $pane->getDashlets(); ?> + <?php if(empty($dashlets)): ?> + <tr> + <td colspan="3"> + <?= $this->translate('No dashlets added to dashboard') ?>. + </td> + </tr> + <?php else: ?> + <?php foreach ($dashlets as $dashlet): ?> + <?php if ($dashlet->getDisabled()) continue; ?> + <tr> + <td> + <?= $this->qlink( + $dashlet->getTitle(), + 'dashboard/update-dashlet', + array('pane' => $pane->getName(), 'dashlet' => $dashlet->getName()), + array('title' => sprintf($this->translate('Edit dashlet %s'), $dashlet->getTitle())) + ); ?> + </td> + <td> + <?= $this->qlink( + $dashlet->getUrl()->getRelativeUrl(), + $dashlet->getUrl()->getRelativeUrl(), + null, + array('title' => sprintf($this->translate('Show dashlet %s'), $dashlet->getTitle())) + ); ?> + </td> + <td> + <?= $this->qlink( + '', + 'dashboard/remove-dashlet', + array('pane' => $pane->getName(), 'dashlet' => $dashlet->getName()), + array( + 'icon' => 'trash', + 'title' => sprintf($this->translate('Remove dashlet %s from pane %s'), $dashlet->getTitle(), $pane->getTitle()) + ) + ); ?> + </td> + </tr> + <?php endforeach; ?> + <?php endif; ?> + <?php endforeach; ?> + </tbody> + </table> +</div> |