人人商城

header.html 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  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. {php $frames = buildframes(FRAME);_calc_current_frames($frames);}
  9. <div class="first-sidebar">
  10. <div class="{if !empty($frames['section']['platform_module_menu']['plugin_menu'])}plugin-head{/if}">
  11. {if ($_W['role'] == ACCOUNT_MANAGE_NAME_CLERK)}
  12. <a class="navbar-brand" href="{php echo url('module/display')}">
  13. {else}
  14. <a class="navbar-brand" href="{php echo url('account/display')}">
  15. {/if}
  16. <img src="{if !empty($_W['setting']['copyright']['blogo'])}{php echo tomedia($_W['setting']['copyright']['blogo'])}{else}./resource/images/logo/logo.png{/if}" class="logo">
  17. </a>
  18. {if !empty($_W['uid'])}
  19. <div class="nav">
  20. <ul class="main-nav">
  21. {php global $top_nav}
  22. {php $nav_top_fold=array()}
  23. {php $nav_top_tiled=array()}
  24. {php $platform_url=url('account/display')}
  25. {php $nav_top_fold[] = array('name' => 'all', 'title'=>'全部', 'type' => 'all', 'url' => $platform_url)}
  26. {loop $top_nav $nav}
  27. {if in_array($nav['name'], array(ACCOUNT_TYPE_SIGN, WXAPP_TYPE_SIGN, WEBAPP_TYPE_SIGN, PHONEAPP_TYPE_SIGN, XZAPP_TYPE_SIGN, ALIAPP_TYPE_SIGN))}
  28. {php $nav_top_fold[]=$nav}
  29. {elseif in_array($nav['name'], array('platform', 'module', 'system', 'site'))}
  30. {php $nav_top_tiled_system[]=$nav}
  31. {elseif in_array($nav['name'], array('appmarket', 'store', 'help', 'advertisement'))}
  32. {php $nav_top_tiled_other[]=$nav}
  33. {elseif $nav['name']=='custom_help'}
  34. {php $nav_top_help=$nav}
  35. {else}
  36. {php $nav_top_tiled_other[]=$nav}
  37. {/if}
  38. {/loop}
  39. {loop $nav_top_tiled_system $nav}
  40. <li {if FRAME == $nav['name'] && !defined('IN_MODULE')} class="active" {/if}>
  41. <a href="{if empty($nav['url'])}{php echo url('home/welcome/' . $nav['name']);}{else}{$nav['url']}{/if}" {if !empty($nav['blank'])}target="_blank"{/if}><i class="{$nav['icon']}"></i>{$nav['title']}</a>
  42. </li>
  43. {/loop}
  44. {loop $nav_top_tiled_other $nav}
  45. <li {if FRAME == $nav['name'] && !defined('IN_MODULE')} class="active" {/if}>
  46. <a href="{if empty($nav['url'])}{php echo url('home/welcome/' . $nav['name']);}{else}{$nav['url']}{/if}" {if !empty($nav['blank'])}target="_blank"{/if}><i class="{$nav['icon']}"></i>{$nav['title']} </a>
  47. </li>
  48. {/loop}
  49. </ul>
  50. <ul class="user-info">
  51. <li class="dropdown user">
  52. <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown"><i class="wi wi-user"></i>{$_W['user']['username']}<span class="caret"></span></a>
  53. <ul class="dropdown-menu color-gray dropdown-menu-right" role="menu">
  54. <li>
  55. <a href="{url 'user/profile'}" target="_blank"><i class="wi wi-account color-gray"></i> 我的账号</a>
  56. </li>
  57. <li class="divider"></li>
  58. {if permission_check_account_user('see_system_upgrade')}
  59. <li><a href="{url 'cloud/upgrade'}" target="_blank"><i class="wi wi-update color-gray"></i> 自动更新</a></li>
  60. {/if}
  61. {if permission_check_account_user('see_system_updatecache')}
  62. <li><a href="{url 'system/updatecache'}" target="_blank"><i class="wi wi-cache color-gray"></i> 更新缓存</a></li>
  63. <li class="divider"></li>
  64. {/if}
  65. <li>
  66. <a href="{url 'user/logout'}"><i class="fa fa-sign-out color-gray"></i> 退出系统</a>
  67. </li>
  68. </ul>
  69. </li>
  70. {template 'common/header-notice'}
  71. {if !empty($nav_top_help)}
  72. <li>
  73. <a href="{if empty($nav_top_help['url'])}{php echo url('home/welcome/' . $nav_top_help['name']);}{else}{$nav_top_help['url']}{/if}" data-toggle="tooltip" data-placement="bottom" title="帮助" {if !empty($nav_top_help['blank'])}target="_blank"{/if}>
  74. <i class="wi wi-explain-sign color-gray" ></i>
  75. </a>
  76. </li>
  77. {/if}
  78. {php $frames_site = buildframes('site')}
  79. {php $workorder_nav=$frames_site['section']['workorder']['menu']['system_workorder']}
  80. {if $workorder_nav['is_display']}
  81. {if permission_check_account_user('see_workorder')}
  82. <li>
  83. <a href="{php echo url('system/workorder/display')}" data-toggle="tooltip" data-placement="bottom" title="工单">
  84. <i class="wi wi-system-work color-gray" ></i>
  85. </a>
  86. </li>
  87. {/if}
  88. {/if}
  89. </ul>
  90. </div>
  91. {else}
  92. <ul class="user-info">
  93. <li class="dropdown"><a href="{php echo url('user/register');}">注册</a></li>
  94. <li class="dropdown"><a href="{php echo url('user/login');}">登录</a></li>
  95. </ul>
  96. {/if}
  97. </div>
  98. </div>
  99. <div class="main main-classical">
  100. <div class="right-fixed-top"></div>
  101. {if !defined('IN_MESSAGE')}
  102. <div class="container">
  103. {if in_array(FRAME, array('account', 'system', 'advertisement', 'wxapp', 'site', 'webapp', 'phoneapp', 'xzapp')) && !in_array($_GPC['a'], array('news-show', 'notice-show'))}
  104. <div class="panel panel-content main-panel-content {if !empty($frames['section']['platform_module_menu']['plugin_menu'])}panel-content-plugin{/if}">
  105. <div class="panel-body clearfix main-panel-body {if $_GPC['menu_fold_tag:classical'] == 1 && !defined('IN_MODULE')}folded{/if}">
  106. {if !defined('IN_MODULE')}
  107. <div class="icon-unfold js-folded" onclick="util.cookie.set('menu_fold_tag:classical', util.cookie.get('menu_fold_tag:classical') == 1 ? 0 : 1)">
  108. <span class="wi wi-folded"></span>
  109. </div>
  110. {/if}
  111. <div class="left-menu-container">
  112. <div class="left-menu">
  113. <div class="left-menu-top">
  114. {if !empty($_GPC['m']) && !in_array($_GPC['m'], array('keyword', 'special', 'welcome', 'default', 'userapi', 'service')) || defined('IN_MODULE')}
  115. <div class="apply-fixed-top">
  116. {template 'common/header-module'}
  117. </div>
  118. {else}
  119. <div class="left-menu-top-panel">
  120. {template 'common/header-' . FRAME}
  121. </div>
  122. {/if}
  123. </div>
  124. {if empty($frames['section']['platform_module_menu']['plugin_menu'])}
  125. {loop $frames['section'] $frame_section_id $frame_section}
  126. {if !isset($frame_section['is_display']) || !empty($frame_section['is_display'])}
  127. <div class="panel panel-menu">
  128. {if $frame_section['title']}
  129. <div class="panel-heading">
  130. <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)">
  131. <span class="nav-title">{$frame_section['title']}</span>
  132. <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>
  133. </span>
  134. </div>
  135. {/if}
  136. <ul class="list-group collapse {if $_GPC['menu_fold_tag:'.$frame_section_id] == 0}in{/if}" id="frame-{$frame_section_id}" >
  137. {loop $frame_section['menu'] $menu_id $menu}
  138. {if !empty($menu['is_display'])}
  139. {if $menu_id == 'platform_module_more'}
  140. <li class="list-group-item">
  141. <a href="{php echo $menu['url']}" {if FRAME != 'webapp'}target="_blank"{/if} class="text-over">
  142. <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>
  143. <span class="nav-title">更多应用</span>
  144. </a>
  145. </li>
  146. {else}
  147. {if $menu['active']}{php $active_sub_permission = $menu['sub_permission']}{/if}
  148. <li class="list-group-item {if $menu['active']}active{/if}">
  149. <a href="{$menu['url']}" class="text-over" {if $frame_section_id == 'platform_module'}target="_blank"{/if}>
  150. {if $menu['icon']}
  151. <span class="nav-icon" data-container="body" data-toggle="tooltip" data-placement="right" title="{$menu['title']}">
  152. {if $frame_section_id == 'platform_module'}
  153. <img src="{$menu['icon']}"/>
  154. {else}
  155. <i class="{$menu['icon']}"></i>
  156. {/if}
  157. </span>
  158. {/if}
  159. <span class="nav-title">{$menu['title']}</span>
  160. </a>
  161. </li>
  162. {/if}
  163. {/if}
  164. {/loop}
  165. </ul>
  166. </div>
  167. <script>
  168. $(function(){
  169. $('.left-menu-container').slimScroll({
  170. width: '210px',
  171. height: 'calc(100vh - 51px)',
  172. opacity: .4,
  173. color: '#aaa',
  174. });
  175. });
  176. </script>
  177. {/if}
  178. {/loop}
  179. {else}
  180. <script>
  181. $(function(){
  182. $('.panel-content-plugin .left-menu-container').slimScroll({
  183. width: '270px',
  184. height: 'calc(100vh - 51px)',
  185. opacity: .4,
  186. color: '#aaa',
  187. });
  188. });
  189. </script>
  190. <div class="plugin-menu clearfix">
  191. <div class="plugin-menu-main pull-left">
  192. <ul class="list-group">
  193. <li class="list-group-item{if $_W['current_module']['name'] == $frames['section']['platform_module_menu']['plugin_menu']['main_module']} active{/if}">
  194. <a href="{php echo url('home/welcome/ext', array('m' => $frames['section']['platform_module_menu']['plugin_menu']['main_module']))}">
  195. <i class="wi wi-main-apply"></i>
  196. <div>主应用</div>
  197. </a>
  198. </li>
  199. <li class="list-group-item">
  200. <div>插件</div>
  201. </li>
  202. {loop $frames['section']['platform_module_menu']['plugin_menu']['menu'] $plugin_name $plugin}
  203. <li class="list-group-item{if $_W['current_module']['name'] == $plugin_name} active{/if}">
  204. <a href="{php echo url('home/welcome/ext', array('m' => $plugin_name))}">
  205. <img src="{$plugin['icon']}" alt="" class="img-icon" />
  206. <div>{$plugin['title']}</div>
  207. </a>
  208. </li>
  209. {/loop}
  210. </ul>
  211. {php unset($plugin_name);}
  212. {php unset($plugin);}
  213. </div>
  214. <div class="plugin-menu-sub pull-left">
  215. {loop $frames['section'] $frame_section_id $frame_section}
  216. {if !isset($frame_section['is_display']) || !empty($frame_section['is_display'])}
  217. <div class="panel panel-menu">
  218. {if $frame_section['title']}
  219. <div class="panel-heading">
  220. <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>
  221. </div>
  222. {/if}
  223. <ul class="list-group panel-collapse collapse in" id="frame0-{$frame_section_id}">
  224. {loop $frame_section['menu'] $menu_id $menu}
  225. {if !empty($menu['is_display'])}
  226. {if $menu_id == 'platform_module_more'}
  227. <li class="list-group-item list-group-more">
  228. <a href="{url 'module/manage-account'}" target="_blank"><span class="label label-more">更多应用</span></a>
  229. </li>
  230. {else}
  231. <li class="list-group-item {if $menu['active']}active{/if}">
  232. <a href="{$menu['url']}" class="text-over" {if $frame_section_id == 'platform_module'}target="_blank"{/if}>
  233. {$menu['title']}
  234. </a>
  235. </li>
  236. {/if}
  237. {/if}
  238. {/loop}
  239. </ul>
  240. </div>
  241. {/if}
  242. {/loop}
  243. </div>
  244. </div>
  245. {/if}
  246. </div>
  247. </div>
  248. <script>
  249. $(function(){
  250. $('.main-panel-content .icon-unfold').click(function(){
  251. $('.main-panel-content').find('.main-panel-body').toggleClass('folded');
  252. if($('.main-classical .folded').length == 0){
  253. $('.nav-icon').attr('data-toggle',false);
  254. }
  255. });
  256. });
  257. </script>
  258. <script src="./resource/js/lib/jquery.slimscroll.min.js"></script>
  259. <div class="right-content">
  260. <div class="content">
  261. {/if}
  262. {/if}