westdc-zf1/module/Admin/view/layout/header.phtml

65 lines
4.3 KiB
PHTML

<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div>
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="<?php echo $this->url('home') ?>">数据门户首页</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="<?php echo $this->url('admin') ?>"><?php echo $this->translate('后台首页') ?></a></li>
<li class="dropdown" id="collapseArchive">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-list-alt"></i> 数据<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="<?= $this->url('admin',array('controller'=>'metadata','action'=>'index','ac'=>'list')) ?>"><?= $this->translate('数据管理') ?></a></li>
<li><a href="<?= $this->url('admin',array('controller'=>'metadata','action'=>'sync')) ?>"><?= $this->translate('数据同步') ?></a></li>
</ul>
</li>
<li class="dropdown" id="collapseArchive">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-list-alt"></i> 新闻<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="<?= $this->url('admin',array('controller'=>'article','action'=>'index','ac'=>'all')) ?>">文档管理</a></li>
<li><a href="<?= $this->url('admin',array('controller'=>'article','action'=>'add')) ?>">文档添加</a></li>
<li class="divider"></li>
<li><a href="<?= $this->url('admin',array('controller'=>'category','action'=>'index')) ?>">栏目管理</a></li>
<li><a href="<?= $this->url('admin',array('controller'=>'category','action'=>'add')) ?>">栏目添加</a></li>
</ul>
</li>
<li class="dropdown" id="collapseSys">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-wrench"></i> 系统<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="<?= $this->url('admin',array('controller'=>'users','action'=>'index','ac'=>'list')) ?>">用户管理</a></li>
</ul>
</li>
</ul>
<?php $user = \Sookon\Helpers\View::User(); ?>
<ul class="nav navbar-nav user_menu pull-right">
<li class="divider-vertical hidden-phone hidden-tablet"></li>
<li class="dropdown">
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-wrench"></i>
<?php
if(isset($user->avatar))
{
echo '<img src="'.$user->avatar.'" alt="" class="user_avatar" style="height:16px;margin-right:3px;" />';
}
echo $user->username;
?>
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><a href="<?= $this->url('home') ?>">前台首页</a></li>
<li><a href="<?= $this->url('home/default',array('controller'=>'account','action'=>'index')) ?>">个人资料</a></li>
<li><a href="<?= $this->url('home/default',array('controller'=>'account','action'=>'edit')) ?>">编辑</a></li>
<li class="divider"></li>
<li><a href="<?= $this->url('home/default',array('controller'=>'account','action'=>'logout')) ?>">注销</a></li>
</ul>
</li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<div class=" clearfix">