nav.html
4.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<nav class="navbar navbar-default navbar-fixed-top active">
<div class="container active">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="__ROOT__/">{$theme_vars.company_name|default='ThinkCMF'}</a>
</div>
<div class="collapse navbar-collapse active" id="bs-example-navbar-collapse-1">
<ul id="main-menu" class="nav navbar-nav">
<navigation nav-id="" root="" id="main-navigation" class="nav navbar-nav navbar-nav-custom"
max-level="0">
<navigationMenu>
<if condition="$level gt 1">
<li class="menu-item menu-item-level-{$level} levelgt1">
<a href="{$menu.href|default=''}" target="{$menu.target|default=''}">
{$menu.name|default=''}
</a>
</li>
<else/>
<li class="menu-item menu-item-level-{$level}">
<a href="{$menu.href|default=''}" target="{$menu.target|default=''}">
{$menu.name|default=''}
</a>
</li>
</if>
</navigationMenu>
<navigationFolder root="li"
class="dropdown dropdown-custom dropdown-custom-level-{$level}"
dropdown="ul"
dropdown-class="dropdown-menu dropdown-menu-level-{$level}">
<a href="#" class="dropdown-toggle dropdown-toggle-{$level}" data-toggle="dropdown">
{$menu.name|default=''}<span class="caret"></span>
</a>
</navigationFolder>
</navigation>
</ul>
<ul class="nav navbar-nav navbar-right" id="main-menu-user">
<!--
<li class="login">
<a class="dropdown-toggle notifactions" href="/index.php/user/notification/index"> <i
class="fa fa-envelope"></i> <span class="count">0</span></a>
</li>
-->
<li class="dropdown user login">
<a class="dropdown-toggle user" data-toggle="dropdown" href="#">
<php>$user=cmf_get_current_user();</php>
<if condition="empty($user['avatar'])">
<img src="__TMPL__/public/assets/images/headicon.png" class="headicon">
<else/>
<img src="{:cmf_get_user_avatar_url($user['avatar'])}" class="headicon" width="30"/>
</if>
<span class="user-nickname"></span><b class="caret"></b>
</a>
<ul class="dropdown-menu pull-right">
<li><a href="{:cmf_url('user/Profile/center')}"><i class="fa fa-home"></i> 个人中心</a></li>
<li class="divider"></li>
<li><a href="{:cmf_url('user/Index/logout')}"><i class="fa fa-sign-out"></i> 退出</a></li>
</ul>
</li>
<li class="dropdown user offline" style="display: list-item;">
<a class="dropdown-toggle user" data-toggle="dropdown" href="#">
<img src="__TMPL__/public/assets/images/headicon.png" class="headicon">
登录<b class="caret"></b>
</a>
<ul class="dropdown-menu pull-right">
<li><a href="{:cmf_url('user/Login/index')}"><i class="fa fa-sign-in"></i> 登录</a></li>
<li class="divider"></li>
<li><a href="{:cmf_url('user/Register/index')}"><i class="fa fa-user"></i> 注册</a></li>
</ul>
</li>
</ul>
<form class="navbar-form navbar-right" method="post" action="{:cmf_url('portal/Search/index')}">
<div class="form-group">
<input type="text" class="form-control" name="keyword" placeholder="Search"
value="{:input('param.keyword','')}">
</div>
<input type="submit" class="btn btn-primary" value="Go" style="margin:0"/>
</form>
</div>
</div>
</nav>