diff options
Diffstat (limited to 'application/views/scripts/index/index.phtml')
-rw-r--r-- | application/views/scripts/index/index.phtml | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/application/views/scripts/index/index.phtml b/application/views/scripts/index/index.phtml new file mode 100644 index 0000000..3797583 --- /dev/null +++ b/application/views/scripts/index/index.phtml @@ -0,0 +1,51 @@ +<?php +/** @var array $views */ + +if (! $this->compact): ?> + <div class="controls"> + <?= $this->tabs ?> + </div> +<?php endif ?> +<div class="content"> + <div class="tlv-overview-tiles"> + <div class="action-links"> + <?= $this->qlink( + $this->translate('Add'), + 'toplevelview/edit/add', + array(), + array( + 'class' => 'action-link', + 'icon' => 'plus', + ) + ) ?> + </div> + + <?php + foreach ($views as $name => $view): + /** @var \Icinga\Module\Toplevelview\ViewConfig $view */ + $url = $this->url('toplevelview/show', array('name' => $name)); + ?> + <div class="tlv-overview-tile"> + <div class="tlv-title"><?= $this->qlink($view->getMeta('name'), $url) ?></div> + <div class="tlv-name"><?= $name ?></div> + <?php if ($view->hasBeenLoadedFromSession()): ?> + <div class="unsaved"><?= $this->translate('Unsaved changes!') ?></div> + <?php endif; ?> + + <?php if (! $this->compact && $this->hasPermission('toplevelview/edit')): ?> + <div class="action-links"> + <?= $this->qlink( + $this->translate('Edit'), + 'toplevelview/edit', + array('name' => $view->getName()), + array( + 'class' => 'action-link', + 'icon' => 'edit', + ) + ) ?> + </div> + <?php endif; ?> + </div> + <?php endforeach; ?> + </div> +</div> |