<?php

use yii\helpers\Html;
use yii\helpers\Url;
use yii\grid\GridView;
use yii\widgets\Menu;
use yii\bootstrap\Tabs;

$this->title = 'UPnP Interface settings';
$this->params['breadcrumbs'] = [
    'Mikrotik',
    'IP',
    $this->title,
];
?>
<div class="site-plugins">
    <div class="row">
        <div class="col-lg-3">
            <?php
            echo Menu::widget($menu);
            ?> 
        </div>
        <div class="col-md-9">
            <h1 style="margin-top: 0px"><?= Html::encode($this->title) ?></h1>

            <?php
            $tabs[] = ['label' => 'Interface Settings', 'content' => GridView::widget([
                    'dataProvider' => $provider,
                    'id' => 'Address list',
                    'columns' => [
                        ['attribute' => 'interface',
                            'format' => 'text',
                            'label' => 'Interface'],
                        'type:text:Type',
                        'forced_external_ip:text:Forced External IP',
                        [
                            'class' => 'yii\grid\ActionColumn', 'template' => '{update} {delete}',
                            //'class' => 'yii\grid\CheckboxColumn',
                            'controller' => 'mikrotik/ip/upnp/interfaces',
                            'header' => Html::button('Add', ['class' => 'btn btn-primary', 'name' => 'add-button', 'onclick' =>
                                'js:document.location.href="' . Url::toRoute('mikrotik/ip/upnp/interfaces/create') . '"']),
                        ],
                    ],
                    'showFooter' => false,
                ])
            ];
            echo Tabs::widget([
                'items' => $tabs]);
            ?>



        </div>
    </div>
</div>



