header.html 14 KB

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