<?php
error_reporting(E_ALL ^ E_NOTICE);
use yii\helpers\Url;

$controllerId = $this->context->id;
?>

<!--导航-->
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
    <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
        <?php if ($controllerId != 'site') : ?>
        <a class="navbar-brand" href="javascript:window.history.go(-1);"><i class="icon-angle-left"></i><span>返回</span></a>
        <p><?= $this->title ?></p>
        <?php else : ?>
            <?php if(!empty($configs['wap_logo'])): ?><img class="navlogo" width="150" height="35" src="<?= $configs['wap_logo'] ?>" class="logo"><?php endif; ?>
        <?php endif; ?>
    </div>
    <div class="navbar-collapse collapse">
        <ul class="nav navbar-nav">
            <li <?= ($controllerId == 'site') ? 'class="active"' : '' ?> ><a href="<?= Url::to(['/site/index']) ?>"><i class="icon-home"></i><span>首页</span></a></li>
            <li <?= ($controllerId == 'task') ? 'class="active"' : '' ?> ><a href="<?= Url::to(['/task/index']) ?>"><i class="icon-tasks"></i><span>任务</span></a></li>
            <li <?= ($controllerId == 'blog') ? 'class="active"' : '' ?> ><a href="<?= Url::to(['/blog/index']) ?>"><i class="icon-paste"></i><span>日志</span></a></li>
            <!--<li ><a href="#"><i class="icon-trophy"></i><span>销售</span></a></li>-->
            <li <?= ($controllerId == 'reimbursement') ? 'class="active"' : '' ?> ><a href="<?= Url::to(['/reimbursement/index']) ?>"><i class="icon-yen"></i><span>财务</span></a></li>
            <li><a href="<?= Url::to(['/public/logout']) ?>"><i class="icon-signout"></i><span>退出(<?= Yii::$app->user->identity->realname ?>)</span></a></li>
        </ul>
    </div>
</div>
<!--导航-->
 
