header.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. {template 'common/header-base'}
  2. <style>
  3. .tooltip.right .tooltip-arrow{border-right-color: #428bca;}
  4. .tooltip.bottom .tooltip-arrow{border-bottom-color: #428bca;}
  5. .tooltip-inner{background-color: #428bca; padding: 6px 12px;}
  6. </style>
  7. <div class="skin-classical" data-skin="classical">
  8. <div class="first-sidebar">
  9. <div class="{if !empty($frames['section']['platform_module_menu']['plugin_menu'])}plugin-head{/if}">
  10. <a class="navbar-brand" href="{php echo url('home/welcome/system', array('page' => 'home'));}">
  11. <img src="{if !empty($_W['setting']['copyright']['blogo'])}{php echo to_global_media($_W['setting']['copyright']['blogo'])}{else}./resource/images/logo/logo.png{/if}" class="logo" width="100%">
  12. </a>
  13. {if !empty($_W['uid'])}
  14. <div class="nav">
  15. <ul class="main-nav">
  16. {php global $top_nav}
  17. {php $nav_top_fold=array()}
  18. {php $platform_url=url('account/display')}
  19. {php $nav_top_fold[] = array('name' => 'all', 'title'=>'全部类型', 'type' => 'all', 'url' => $platform_url)}
  20. {loop $top_nav $nav}
  21. {if in_array($nav['name'], array(ACCOUNT_TYPE_SIGN, WXAPP_TYPE_SIGN, WEBAPP_TYPE_SIGN, PHONEAPP_TYPE_SIGN, XZAPP_TYPE_SIGN, ALIAPP_TYPE_SIGN, BAIDUAPP_TYPE_SIGN, TOUTIAOAPP_TYPE_SIGN))}
  22. {php $nav_top_fold[]=$nav}
  23. {elseif in_array($nav['name'], array('store', 'help', 'workorder', 'custom_help'))}
  24. {php $nav_top_tiled_other[] = $nav}
  25. {elseif $nav['name'] =='message'}
  26. {php $nav_top_message = $nav}
  27. {else}
  28. {php $nav_top_tiled_system[] = $nav}
  29. {/if}
  30. {/loop}
  31. {loop $nav_top_tiled_system $nav}
  32. <li {if FRAME == $nav['name'] && !defined('IN_MODULE')} class="active" {/if}>
  33. <a href="{$nav['url']}" {if !empty($nav['blank'])}target="_blank"{/if}><i class="{$nav['icon']}"></i>{$nav['title']}</a>
  34. </li>
  35. {/loop}
  36. </ul>
  37. <ul class="user-info">
  38. {loop $nav_top_tiled_other $other}
  39. {if $other['is_display']}
  40. {if $other['name'] == 'workorder' && !permission_check_account_user('see_workorder')}{php continue;}{/if}
  41. <li>
  42. <a href="{$other['url']}" ><i class="{$other['icon']} color-gray" data-toggle="tooltip" data-placement="bottom"></i>{$other['title']}</a>
  43. </li>
  44. {/if}
  45. {/loop}
  46. {template 'common/header-notice'}
  47. <li class="dropdown user">
  48. <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown"><i class="wi wi-user"></i>{$_W['user']['username']}<span class="caret"></span></a>
  49. <ul class="dropdown-menu color-gray dropdown-menu-right" role="menu">
  50. <li>
  51. <a href="{url 'user/profile'}" target="_blank"><i class="wi wi-money color-gray"></i> 我的账号</a>
  52. </li>
  53. <li class="divider"></li>
  54. {if permission_check_account_user('see_system_upgrade')}
  55. <li><a href="{url 'cloud/upgrade'}" target="_blank"><i class="wi wi-update color-gray"></i> 自动更新</a></li>
  56. {/if}
  57. {if permission_check_account_user('see_system_updatecache')}
  58. <li><a href="{url 'system/updatecache'}" target="_blank"><i class="wi wi-cache color-gray"></i> 更新缓存</a></li>
  59. <li class="divider"></li>
  60. {/if}
  61. <li>
  62. <a href="{url 'user/logout'}"><i class="fa fa-sign-out color-gray"></i> 退出系统</a>
  63. </li>
  64. </ul>
  65. </li>
  66. </ul>
  67. </div>
  68. {else}
  69. <ul class="user-info">
  70. <li class="dropdown"><a href="{php echo url('user/register');}">注册</a></li>
  71. <li class="dropdown"><a href="{php echo url('user/login');}">登录</a></li>
  72. </ul>
  73. {/if}
  74. </div>
  75. </div>
  76. <div class="main main-classical">
  77. <div class="right-fixed-top"></div>
  78. {if !defined('IN_MESSAGE')}
  79. <div class="container">
  80. {if $frames['dimension'] == 3 && in_array(FRAME, array('account', 'system', 'advertisement', 'wxapp', 'site', 'webapp', 'phoneapp', 'xzapp')) && !in_array($_GPC['a'], array('news-show', 'notice-show'))}
  81. <div class="panel panel-content main-panel-content {if !empty($frames['section']['platform_module_menu']['plugin_menu'])}panel-content-plugin{/if}">
  82. <div class="panel-body clearfix main-panel-body {if $_GPC['menu_fold_tag:classical'] == 1 && !defined('IN_MODULE')}folded{/if}">
  83. {if !defined('IN_MODULE')}
  84. <div class="icon-unfold js-folded" onclick="util.cookie.set('menu_fold_tag:classical', util.cookie.get('menu_fold_tag:classical') == 1 ? 0 : 1)">
  85. <span class="wi wi-folded"></span>
  86. </div>
  87. {/if}
  88. <div class="left-menu-container">
  89. <div class="left-menu">
  90. <div class="left-menu-top">
  91. {if !empty($_GPC['m']) && !in_array($_GPC['m'], array('keyword', 'special', 'welcome', 'default', 'userapi', 'service', 'apply')) || defined('IN_MODULE')}
  92. <div class="apply-fixed-top">
  93. {template 'common/header-module'}
  94. </div>
  95. {else}
  96. <div class="left-menu-top-panel">
  97. {template 'common/header-' . FRAME}
  98. </div>
  99. {/if}
  100. </div>
  101. {if empty($frames['section']['platform_module_menu']['plugin_menu'])}
  102. {loop $frames['section'] $frame_section_id $frame_section}
  103. {if !isset($frame_section['is_display']) || !empty($frame_section['is_display'])}
  104. <div class="panel panel-menu">
  105. {if $frame_section['title']}
  106. <div class="panel-heading">
  107. <span class="{if $_GPC['menu_fold_tag:'.$frame_section_id] == 1}collapsed{/if}" data-toggle="collapse" data-target="#frame-{$frame_section_id}" onclick="util.cookie.set('menu_fold_tag:{$frame_section_id}', util.cookie.get('menu_fold_tag:{$frame_section_id}') == 1 ? 0 : 1)">
  108. <span class="nav-title">{$frame_section['title']}</span>
  109. <span class="nav-icon pull-right" data-container="body" data-toggle="tooltip" data-placement="right" title="{$frame_section['title']}"><i class="wi wi-angle-down"></i></span>
  110. </span>
  111. </div>
  112. {/if}
  113. <ul class="list-group collapse {if $_GPC['menu_fold_tag:'.$frame_section_id] == 0}in{/if}" id="frame-{$frame_section_id}" >
  114. {loop $frame_section['menu'] $menu_id $menu}
  115. {if !empty($menu['is_display'])}
  116. {if $menu_id == 'platform_module_plugin_more' || $menu_id == 'platform_module_more'}
  117. <li class="list-group-item">
  118. <a href="{php echo $menu['url']}" {if FRAME != 'webapp'}target="_blank"{/if} class="text-over">
  119. <span class="nav-icon" data-container="body" data-toggle="tooltip" data-placement="right" title="更多应用"><span class="icon-more"><i class="wi wi-plus"></i></span></span>
  120. <span class="nav-title">更多应用</span>
  121. </a>
  122. </li>
  123. {else}
  124. {if $menu['active']}{php $active_sub_permission = $menu['sub_permission']}{/if}
  125. <li class="list-group-item {if $menu['multilevel']}list-group-item-more{/if} {if $menu['active']}active{/if}">
  126. <a href="{if $menu['multilevel']}javascript:;{else}{$menu['url']}{/if}" {if $menu['multilevel']}data-toggle="collapse" data-target="#frame-child-{$frame_section_id}-{$menu_id}"{/if} class="text-over" {if $frame_section_id == 'platform_module'}target="_blank"{/if}>
  127. <span class="nav-icon" data-container="body" data-toggle="tooltip" data-placement="right" title="{$menu['title']}">
  128. {if $frame_section_id == 'platform_module' || $frame_section_id == 'platform_module_plugin'}
  129. <img src="{$menu['icon']}"/>
  130. {else}
  131. <i class="{$menu['icon']}"></i>
  132. {/if}
  133. </span>
  134. <span class="nav-title">{$menu['title']}{if $menu['multilevel']}<i class="wi wi-angle-down pull-right setting"></i>{/if}</span>
  135. </a>
  136. {if $menu['multilevel'] && !empty($menu['childs'])}
  137. <ul class="list-child collapse in" id="frame-child-{$frame_section_id}-{$menu_id}">
  138. {loop $menu['childs'] $module_menu_child}
  139. <li class="list-child-item {if $module_menu_child['active']}active{/if}">
  140. <a href="{$module_menu_child['url']}" class="text-over">
  141. <span class="nav-title">{$module_menu_child['title']}</span>
  142. </a>
  143. </li>
  144. {/loop}
  145. </ul>
  146. {/if}
  147. </li>
  148. {/if}
  149. {/if}
  150. {/loop}
  151. </ul>
  152. </div>
  153. <script>
  154. $(function(){
  155. $('.left-menu-container').slimScroll({
  156. width: '210px',
  157. height: 'calc(100vh - 51px)',
  158. opacity: .4,
  159. color: '#aaa',
  160. });
  161. });
  162. </script>
  163. {/if}
  164. {/loop}
  165. {else}
  166. <script>
  167. $(function(){
  168. $('.panel-content-plugin .left-menu-container').slimScroll({
  169. width: '270px',
  170. height: 'calc(100vh - 51px)',
  171. opacity: .4,
  172. color: '#aaa',
  173. });
  174. });
  175. </script>
  176. <div class="plugin-menu clearfix">
  177. <div class="plugin-menu-main pull-left">
  178. <ul class="list-group">
  179. <li class="list-group-item{if $_W['current_module']['name'] == $frames['section']['platform_module_menu']['plugin_menu']['main_module']} active{/if}">
  180. <a href="{php echo url('home/welcome/ext', array('m' => $frames['section']['platform_module_menu']['plugin_menu']['main_module']))}">
  181. <i class="wi wi-main-apply"></i>
  182. <div>主应用</div>
  183. </a>
  184. </li>
  185. <li class="list-group-item">
  186. <div>插件</div>
  187. </li>
  188. {loop $frames['section']['platform_module_menu']['plugin_menu']['menu'] $plugin_name $plugin}
  189. <li class="list-group-item{if $_W['current_module']['name'] == $plugin_name} active{/if}">
  190. <a href="{php echo url('home/welcome/ext', array('m' => $plugin_name))}">
  191. <img src="{$plugin['icon']}" alt="" class="img-icon" />
  192. <div>{$plugin['title']}</div>
  193. </a>
  194. </li>
  195. {/loop}
  196. </ul>
  197. {php unset($plugin_name);}
  198. {php unset($plugin);}
  199. </div>
  200. <div class="plugin-menu-sub pull-left">
  201. {loop $frames['section'] $frame_section_id $frame_section}
  202. {if !isset($frame_section['is_display']) || !empty($frame_section['is_display'])}
  203. <div class="panel panel-menu">
  204. {if $frame_section['title']}
  205. <div class="panel-heading">
  206. <span class="collapsed" data-toggle="collapse" data-target="#frame0-{$frame_section_id}" aria-expanded="true" aria-controls="frame0-{$frame_section_id}">{$frame_section['title']}<i class="wi wi-angle-down pull-right"></i></span>
  207. </div>
  208. {/if}
  209. <ul class="list-group panel-collapse collapse in" id="frame0-{$frame_section_id}">
  210. {loop $frame_section['menu'] $menu_id $menu}
  211. {if !empty($menu['is_display'])}
  212. {if $menu_id == 'platform_module_more'}
  213. <li class="list-group-item list-group-more">
  214. <a href="{url 'module/manage-account'}" target="_blank"><span class="label label-more">更多应用</span></a>
  215. </li>
  216. {else}
  217. <li class="list-group-item {if $menu['active']}active{/if}">
  218. <a href="{$menu['url']}" class="text-over" {if $frame_section_id == 'platform_module'}target="_blank"{/if}>
  219. {$menu['title']}
  220. </a>
  221. </li>
  222. {/if}
  223. {/if}
  224. {/loop}
  225. </ul>
  226. </div>
  227. {/if}
  228. {/loop}
  229. </div>
  230. </div>
  231. {/if}
  232. </div>
  233. </div>
  234. <script>
  235. $(function(){
  236. $('.main-panel-content .icon-unfold').click(function(){
  237. $('.main-panel-content').find('.main-panel-body').toggleClass('folded');
  238. if($('.main-classical .folded').length == 0){
  239. $('.nav-icon').attr('data-toggle',false);
  240. }
  241. });
  242. });
  243. </script>
  244. <script src="./resource/js/lib/jquery.slimscroll.min.js"></script>
  245. <div class="right-content">
  246. <div class="content">
  247. <div class="we7-page-title">{if empty($_W['page']['title']) && $frames['title'] != '首页'}{$frames['title']}{else}{$_W['page']['title']}{/if}</div>
  248. {/if}
  249. {if $frames['dimension'] == 2}
  250. <div class="panel panel-content main-panel-content {if !empty($frames['section']['platform_module_menu']['plugin_menu'])}panel-content-plugin{/if}">
  251. <div class="panel-body clearfix main-panel-body">
  252. <div class="right-content">
  253. <div class="content">
  254. {if !empty($_W['page']['title']) && $frames['title'] != '首页' && !empty($frames['title']) && !defined('IN_MODULE')}
  255. <div class="we7-page-title">{$_W['page']['title']}</div>
  256. {/if}
  257. <!-- start用户管理菜单和消息管理菜单特殊,走自己的we7-page-tab,故加此if判断;平台/应用/我的账户无we7-page-table -->
  258. {if !in_array(FRAME, array('user_manage', 'message', 'platform', 'module', 'myself'))}
  259. <ul class="we7-page-tab">
  260. {php $have_right_content_menu = 0;}
  261. {loop $frames['section'][FRAME]['menu'] $menu_id $menu}
  262. {if in_array(FRAME, array('account_manage', 'permission'))}
  263. {if permission_check_account_user('see_' . $menu['permission_name'])}
  264. <li class="{if $menu['active']}active{/if}"><a href="{$menu['url']}">{$menu['title']}</a></li>
  265. {/if}
  266. {else}
  267. <li class="{if $menu['active']}active{/if}">
  268. <a href="{$menu['url']}">
  269. {$menu['title']}
  270. <!-- start应用管理中未安装应用数量 -->
  271. {if FRAME == 'module_manage' && $menu_id == 'module_manage_not_installed'}<span class="color-red"> ({$module_uninstall_total}) </span>{/if}
  272. <!-- end应用管理中未安装应用数量 -->
  273. </a>
  274. </li>
  275. {/if}
  276. {if $menu['active']}{php $have_right_content_menu = 1;}{/if}
  277. {/loop}
  278. </ul>
  279. <script>
  280. $(function(){
  281. {if empty($have_right_content_menu)}
  282. $('.we7-page-tab, .we7-page-title').addClass('hidden');
  283. {/if}
  284. });
  285. </script>
  286. {/if}
  287. <!-- end用户管理菜单和消息管理菜单特殊,走自己的we7-page-tab;平台/应用/我的账户无we7-page-table -->
  288. {/if}
  289. {/if}