

<?php

use yii\widgets\Menu;


$bidding_template  =  "<a href='{url}' tooltips title='{label}: {{ count.count_bids }}'>{label} ".$this->render('../../web/count_orders.html')."</a>";
?>


<?php
$items = [];

$items[] = ['label' => Yii::t('app', 'Cabinet'),  'url' => ['/cabinet'], 'active' => in_array(Yii::$app->controller->id, ['cabinet', 'cancellations'])];
$items[] = ['label' => Yii::t('app', 'Auctions'),  'url' => ['/auctions/index'], 'active' => in_array(Yii::$app->controller->id, ['auctions', 'cancellations'])];

if(Yii::$app->user->can('admin')) {
    $items[] = ['label' => Yii::t('app', 'Lots ID'), 'url' => ['/lots/index'], 'active' => in_array(Yii::$app->controller->id, ['lots', 'cancellations'])];
}
Yii::$app->user->can('admin') ? $url = '/bidding/index' : $url = '/bidding/view';
$items[] = ['label' => Yii::t('app', 'Bidding ID'),  'url' => [$url], 'active' => in_array(Yii::$app->controller->id, ['bidding', 'cancellations'])];

if(Yii::$app->user->can('admin')) {
    $items[] = ['label' => Yii::t('app', 'Subscriptions'), 'url' => ['/subscriptions/index'], 'active' => in_array(Yii::$app->controller->id, ['subscriptions'])];
}



?>

<?= Menu::widget([
    'options' => [
        'class' => 'tab-link',
        'id' => 'nav-left',
    ],
    'items' => $items,
])
?>