<?php
/** @var \Icinga\Module\Toplevelview\ViewConfig $view */
?>
<div class="action-links">
    <?php
    if (! $this->compact) {
        echo $this->qlink(
            $this->translate('Source'),
            'toplevelview/show/source',
            ['name' => $view->getName()],
            [
                'class'            => 'action-link',
                'icon'             => 'doc-text',
                'data-base-target' => '_next'
            ]
        );

        echo $this->qlink(
            $this->translate('Fullscreen'),
            'toplevelview/show',
            [
                'name' => $view->getName(),
                'view' => 'compact',
                'showFullscreen' => true
            ],
            [
                'class'  => 'action-link',
                'icon'   => 'resize-full',
                'target' => '_blank'
            ]
        );

        if ($this->hasPermission('toplevelview/edit')) {
            echo $this->qlink(
                $this->translate('Edit'),
                'toplevelview/edit',
                ['name' => $view->getName()],
                [
                    'class'            => 'action-link',
                    'icon'             => 'edit',
                    'data-base-target' => '_next'
                ]
            );
            echo $this->qlink(
                $this->translate('Clone'),
                'toplevelview/edit/clone',
                ['name' => $view->getName()],
                [
                    'class'            => 'action-link',
                    'icon'             => 'rewind',
                    'data-base-target' => '_next'
                ]
            );
        }
    }
    ?>
</div>
