<?php
use yii\helpers\Url;
?>

<?php 


$route = \Yii::$app->controller->id .'/'. \Yii::$app->controller->action->id;







$items = [
	[ 'Recepció', ['customer/reception', 'number' => $card->number ]],	
	[ 'Termék eladás', ['product/sale', 'number' => $card->number ]],	
	[ 'Adatlap', ['customer/update', 'number' => $card->number ]],	
	[ 'Befizetések', ['ticket/index', 'number' => $card->number] ],	
	[ 'Kulcsok', ['key/index', 'id_card' => $card->id_card] ],	
	[ 'Szerződések', ['contract/index', 'id_card' => $card->id_card ]],	
	[ 'Kosár', ['transfer/customer-cart', 'id_card' => $card->id_card ]],	
];





?>




<ul class="nav nav-tabs">
<?php foreach ($items as $item){?>
	<?php 
		if ( empty($title)){
			if ( $item[1][0] == $route) {
				$title = $item[0];
			}
		}
	?>
  <li role="presentation" class="<?php echo $item[1][0] == $route ? 'active' : ''  ?>"><a href="<?php echo Url::toRoute($item[1])?>"><?php echo $item[0] ?></a></li>
<?php }?>
</ul>

<?php if ( !empty($title)) {?>
   <h1><?php echo $title?></h1>
    <p>Vendég: <?php echo $card->customer->name ?></p>
    <p>Kártyaszám: <?php echo $card->number ?></p>
 <?php }?>