layout.html 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559
  1. <!DOCTYPE html>
  2. <!--[if IE 9]> <html class="ie9 no-focus" lang="zh"> <![endif]-->
  3. <!--[if gt IE 9]><!--> <html class="no-focus" lang="zh"> <!--<![endif]-->
  4. <head>
  5. <meta charset="utf-8">
  6. {block name="page-title"}<title>{$page_title|default='后台'} | {:config('web_site_title')} - DolphinPHP</title>{/block}
  7. <meta name="description" content="{:config('web_site_description')}">
  8. <meta name="author" content="caiweiming">
  9. <meta name="robots" content="noindex, nofollow">
  10. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  11. <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1.0,user-scalable=0">
  12. <!-- Icons -->
  13. <!-- The following icons can be replaced with your own, they are used by desktop and mobile browsers -->
  14. <link rel="shortcut icon" href="__ADMIN_IMG__/favicons/favicon.ico">
  15. <link rel="icon" type="image/png" href="__ADMIN_IMG__/favicons/favicon-16x16.png" sizes="16x16">
  16. <link rel="icon" type="image/png" href="__ADMIN_IMG__/favicons/favicon-32x32.png" sizes="32x32">
  17. <link rel="icon" type="image/png" href="__ADMIN_IMG__/favicons/favicon-96x96.png" sizes="96x96">
  18. <link rel="icon" type="image/png" href="__ADMIN_IMG__/favicons/favicon-160x160.png" sizes="160x160">
  19. <link rel="icon" type="image/png" href="__ADMIN_IMG__/favicons/favicon-192x192.png" sizes="192x192">
  20. <link rel="apple-touch-icon" sizes="57x57" href="__ADMIN_IMG__/favicons/apple-touch-icon-57x57.png">
  21. <link rel="apple-touch-icon" sizes="60x60" href="__ADMIN_IMG__/favicons/apple-touch-icon-60x60.png">
  22. <link rel="apple-touch-icon" sizes="72x72" href="__ADMIN_IMG__/favicons/apple-touch-icon-72x72.png">
  23. <link rel="apple-touch-icon" sizes="76x76" href="__ADMIN_IMG__/favicons/apple-touch-icon-76x76.png">
  24. <link rel="apple-touch-icon" sizes="114x114" href="__ADMIN_IMG__/favicons/apple-touch-icon-114x114.png">
  25. <link rel="apple-touch-icon" sizes="120x120" href="__ADMIN_IMG__/favicons/apple-touch-icon-120x120.png">
  26. <link rel="apple-touch-icon" sizes="144x144" href="__ADMIN_IMG__/favicons/apple-touch-icon-144x144.png">
  27. <link rel="apple-touch-icon" sizes="152x152" href="__ADMIN_IMG__/favicons/apple-touch-icon-152x152.png">
  28. <link rel="apple-touch-icon" sizes="180x180" href="__ADMIN_IMG__/favicons/apple-touch-icon-180x180.png">
  29. <!-- END Icons -->
  30. <!-- Stylesheets -->
  31. <!-- Page JS Plugins CSS -->
  32. {notempty name="_css_files"}
  33. {eq name="Think.config.minify_status" value="1"}
  34. <link rel="stylesheet" href="{:minify('group', $_css_files)}">
  35. {else/}
  36. {volist name="_css_files" id="css"}
  37. {:load_assets($css)}
  38. {/volist}
  39. {/eq}
  40. {/notempty}
  41. {notempty name="extend_css_list"}
  42. {volist name="extend_css_list" id="vo"}
  43. {volist name="vo" id="v"}
  44. <link rel="stylesheet" href="{$v}?v={:config('asset_version')}">
  45. {/volist}
  46. {/volist}
  47. {/notempty}
  48. {notempty name="_icons"}
  49. {volist name="_icons" id="icon"}
  50. <link rel="stylesheet" href="{$icon.url}">
  51. {/volist}
  52. {/notempty}
  53. {block name="plugins-css"}{/block}
  54. <!-- Bootstrap and OneUI CSS framework -->
  55. {eq name="Think.config.minify_status" value="1"}
  56. <link rel="stylesheet" id="css-main" href="{:minify('group', 'libs_css,core_css')}">
  57. {else/}
  58. <link rel="stylesheet" href="__LIBS__/sweetalert/sweetalert.min.css?v={:config('asset_version')}">
  59. <link rel="stylesheet" href="__LIBS__/magnific-popup/magnific-popup.min.css?v={:config('asset_version')}">
  60. <link rel="stylesheet" href="__ADMIN_CSS__/bootstrap.min.css?v={:config('asset_version')}">
  61. <link rel="stylesheet" href="__ADMIN_CSS__/oneui.css?v={:config('asset_version')}">
  62. <link rel="stylesheet" href="__ADMIN_CSS__/dolphin.css?v={:config('asset_version')}" id="css-main">
  63. <link rel="stylesheet" href="__LIBS__/viewer/viewer.min.css?v={:config('asset_version')}">
  64. {/eq}
  65. <link rel="stylesheet" id="css-theme" href="__ADMIN_CSS__/themes/{:config('system_color')}.min.css?v={:config('asset_version')}">
  66. <!--页面css-->
  67. {block name="style"}{/block}
  68. {notempty name="_pop"}
  69. <style>
  70. #page-container.sidebar-l.sidebar-o {
  71. padding-left: 0;
  72. }
  73. .header-navbar-fixed #main-container {
  74. padding-top: 0;
  75. }
  76. </style>
  77. {/notempty}
  78. <!-- END Stylesheets -->
  79. <!--插件css钩子-->
  80. {:hook('page_plugin_css')}
  81. <!--自定义css-->
  82. <link rel="stylesheet" href="__ADMIN_CSS__/custom.css?v={:config('asset_version')}">
  83. <script>
  84. // url
  85. var dolphin = {
  86. 'top_menu_url': '{:url("admin/ajax/getSidebarMenu")}',
  87. 'theme_url': '{:url("admin/ajax/setTheme")}',
  88. 'jcrop_upload_url': '{$jcrop_upload_url ? $jcrop_upload_url : url("admin/attachment/upload", ["dir" => "images", "from" => "jcrop", "module" => request()->module()])}',
  89. 'editormd_upload_url': '{$editormd_upload_url ? $editormd_upload_url : url("admin/attachment/upload", ["dir" => "images", "from" => "editormd", "module" => request()->module()])}',
  90. 'editormd_mudule_path': '__LIBS__/editormd/lib/',
  91. 'ueditor_upload_url': '{$ueditor_upload_url ? $ueditor_upload_url : url("admin/attachment/upload", ["dir" => "images", "from" => "ueditor", "module" => request()->module()])}',
  92. 'wangeditor_upload_url': '{$wangeditor_upload_url ? $wangeditor_upload_url : url("admin/attachment/upload", ["dir" => "images", "from" => "wangeditor", "module" => request()->module()])}',
  93. 'wangeditor_emotions': "__LIBS__/wang-editor/emotions.data",
  94. 'ckeditor_img_upload_url': '{$ckeditor_img_upload_url ? $ckeditor_img_upload_url : url("admin/attachment/upload", ["dir" => "images", "from" => "ckeditor", "module" => request()->module()])}',
  95. 'WebUploader_swf': '__LIBS__/webuploader/Uploader.swf',
  96. 'file_upload_url': '{$file_upload_url ? $file_upload_url : url("admin/attachment/upload", ["dir" => "files", "module" => request()->module()])}',
  97. 'image_upload_url': '{$image_upload_url ? $image_upload_url : url("admin/attachment/upload", ["dir" => "images", "module" => request()->module()])}',
  98. 'upload_check_url': '{$upload_check_url ? $upload_check_url : url("admin/ajax/check")}',
  99. 'get_level_data': '{:url("admin/ajax/getLevelData")}',
  100. 'quick_edit_url': '{$quick_edit_url ? $quick_edit_url : url("quickEdit")}',
  101. 'aside_edit_url': '{$aside_edit_url ? $aside_edit_url : url("admin/system/quickEdit")}',
  102. 'triggers': {:json_encode(isset($field_triggers) ? $field_triggers : [])}, // 触发器集合
  103. 'field_hide': '{$field_hide|default=""}', // 需要隐藏的字段
  104. 'field_values': '{$field_values|default=""}',
  105. 'validate': '{$validate|default=""}', // 验证器
  106. 'validate_fields': '{$validate_fields|default=""}', // 验证字段
  107. 'search_field': '{:input("param.search_field", "")}', // 搜索字段
  108. // 字段过滤
  109. '_filter': '{$Request.param._filter ? $Request.param._filter : (isset($_filter) ? $_filter : "")}',
  110. '_filter_content': '{$Request.param._filter_content == '' ? (isset($_filter_content) ? $_filter_content : "") : $Request.param._filter_content}',
  111. '_field_display': '{$Request.param._field_display ? $Request.param._field_display : (isset($_field_display) ? $_field_display : "")}',
  112. '_field_clear': {:json_encode(isset($field_clear) ? $field_clear : [])},
  113. 'get_filter_list': '{:url("admin/ajax/getFilterList")}',
  114. 'curr_url': '{:url("", $Request.route)}',
  115. 'curr_params': {:json_encode($Request.param)},
  116. 'layer': {:json_encode(config("zbuilder.pop"))}
  117. };
  118. </script>
  119. </head>
  120. <body>
  121. <!-- Page Container -->
  122. <div id="page-container" class="sidebar-l sidebar-o side-scroll header-navbar-fixed {empty name="_pop"}{$_COOKIE['sidebarMini'] ?= 'sidebar-mini'}{/empty}">
  123. <!-- Side Overlay-->
  124. {empty name="_pop"}
  125. {block name="aside"}
  126. <aside id="side-overlay">
  127. <!-- Side Overlay Scroll Container -->
  128. <div id="side-overlay-scroll">
  129. <!-- Side Header -->
  130. <div class="side-header side-content">
  131. <!-- Layout API, functionality initialized in App() -> uiLayoutApi() -->
  132. <button class="btn btn-default pull-right" type="button" data-toggle="layout" data-action="side_overlay_close">
  133. <i class="fa fa-times"></i>
  134. </button>
  135. <span>
  136. <img class="img-avatar img-avatar32" src="{$Think.session.user_auth.uid|get_avatar}" alt="">
  137. <span class="font-w600 push-10-l">{:session('user_auth.username')}</span>
  138. </span>
  139. </div>
  140. <!-- END Side Header -->
  141. <!--侧栏-->
  142. {include file="../application/common/builder/aside/layout.html" /}
  143. </div>
  144. <!-- END Side Overlay Scroll Container -->
  145. </aside>
  146. {/block}
  147. {/empty}
  148. <!-- END Side Overlay -->
  149. <!-- Sidebar -->
  150. {empty name="_pop"}
  151. {block name="sidebar"}
  152. <nav id="sidebar">
  153. <!-- Sidebar Scroll Container -->
  154. <div id="sidebar-scroll">
  155. <!-- Sidebar Content -->
  156. <!-- Adding .sidebar-mini-hide to an element will hide it when the sidebar is in mini mode -->
  157. <div class="sidebar-content">
  158. <!-- Side Header -->
  159. <div class="side-header side-content bg-white-op dolphin-header">
  160. <!-- Layout API, functionality initialized in App() -> uiLayoutApi() -->
  161. <button class="btn btn-link text-gray pull-right hidden-md hidden-lg" type="button" data-toggle="layout" data-action="sidebar_close">
  162. <i class="fa fa-times"></i>
  163. </button>
  164. <!-- Themes functionality initialized in App() -> uiHandleTheme() -->
  165. <div class="btn-group pull-right">
  166. <button class="btn btn-link text-gray dropdown-toggle" data-toggle="dropdown" type="button">
  167. <i class="si si-drop"></i>
  168. </button>
  169. <ul class="dropdown-menu dropdown-menu-right font-s13 sidebar-mini-hide">
  170. <li {$system_color == 'modern' ?= 'class="active"'}>
  171. <a data-toggle="theme" data-theme="modern" data-css="__ADMIN_CSS__/themes/modern.min.css" tabindex="-1" href="javascript:void(0)">
  172. <i class="fa fa-circle text-modern pull-right"></i> <span class="font-w600">Modern</span>
  173. </a>
  174. </li>
  175. <li {$system_color == 'amethyst' ?= 'class="active"'}>
  176. <a data-toggle="theme" data-theme="amethyst" data-css="__ADMIN_CSS__/themes/amethyst.min.css" tabindex="-1" href="javascript:void(0)">
  177. <i class="fa fa-circle text-amethyst pull-right"></i> <span class="font-w600">Amethyst</span>
  178. </a>
  179. </li>
  180. <li {$system_color == 'city' ?= 'class="active"'}>
  181. <a data-toggle="theme" data-theme="city" data-css="__ADMIN_CSS__/themes/city.min.css" tabindex="-1" href="javascript:void(0)">
  182. <i class="fa fa-circle text-city pull-right"></i> <span class="font-w600">City</span>
  183. </a>
  184. </li>
  185. <li {$system_color == 'flat' ?= 'class="active"'}>
  186. <a data-toggle="theme" data-theme="flat" data-css="__ADMIN_CSS__/themes/flat.min.css" tabindex="-1" href="javascript:void(0)">
  187. <i class="fa fa-circle text-flat pull-right"></i> <span class="font-w600">Flat</span>
  188. </a>
  189. </li>
  190. <li {$system_color == 'smooth' ?= 'class="active"'}>
  191. <a data-toggle="theme" data-theme="smooth" data-css="__ADMIN_CSS__/themes/smooth.min.css" tabindex="-1" href="javascript:void(0)">
  192. <i class="fa fa-circle text-smooth pull-right"></i> <span class="font-w600">Smooth</span>
  193. </a>
  194. </li>
  195. <li {$system_color == 'default' ?= 'class="active"'}>
  196. <a data-toggle="theme" data-theme="default" tabindex="-1" href="javascript:void(0)">
  197. <i class="fa fa-circle text-default pull-right"></i> <span class="font-w600">Default</span>
  198. </a>
  199. </li>
  200. </ul>
  201. </div>
  202. <a class="h5 text-white" href="{:url('admin/index/index')}">
  203. {notempty name="Think.config.web_site_logo"}
  204. <img src="{$Think.config.web_site_logo|get_file_path}" class="logo" alt="{$Think.config.web_site_title|default='Dolphin PHP'}">
  205. {else/}
  206. <img src="{$Think.config.public_static_path}admin/img/logo.png" class="logo" alt="Dolphin PHP">
  207. {/notempty}
  208. {notempty name="Think.config.web_site_logo_text"}
  209. <img src="{$Think.config.web_site_logo_text|get_file_path}" class="logo-text sidebar-mini-hide" alt="{$Think.config.web_site_title|default='Dolphin PHP'}">
  210. {else/}
  211. <img src="{$Think.config.public_static_path}admin/img/logo-text.png" class="logo-text sidebar-mini-hide" alt="Dolphin PHP">
  212. {/notempty}
  213. </a>
  214. </div>
  215. <!-- END Side Header -->
  216. <!-- Side Content -->
  217. <div class="side-content" id="sidebar-menu">
  218. {notempty name="_sidebar_menus"}
  219. <ul class="nav-main" id="nav-{$_location[0]['id']}">
  220. {volist name="_sidebar_menus" id="menu"}
  221. <li {$menu['id'] == $_location[1]["id"]?='class="open"'}>
  222. {notempty name="menu.url_value"}
  223. <a {if($menu['id'] == $_location[1]["id"])}class="active"{/if} href="{$menu.url_value}" target="{$menu.url_target}"><i class="{$menu.icon}"></i><span class="sidebar-mini-hide">{$menu.title}</span></a>
  224. {else/}
  225. <a class="nav-submenu" data-toggle="nav-submenu" href="javascript:void(0);"><i class="{$menu.icon}"></i><span class="sidebar-mini-hide">{$menu.title}</span></a>
  226. {notempty name="menu['child']"}
  227. <ul>
  228. {volist name="menu['child']" id="submenu"}
  229. <li>
  230. <a {if(isset($_location[2]) && $submenu['id'] == $_location[2]["id"])}class="active"{/if} href="{$submenu.url_value}" target="{$submenu.url_target}"><i class="{$submenu.icon}"></i>{$submenu.title}</a>
  231. </li>
  232. {/volist}
  233. </ul>
  234. {/notempty}
  235. {/notempty}
  236. </li>
  237. {/volist}
  238. </ul>
  239. {/notempty}
  240. </div>
  241. <!-- END Side Content -->
  242. </div>
  243. <!-- Sidebar Content -->
  244. </div>
  245. <!-- END Sidebar Scroll Container -->
  246. </nav>
  247. {/block}
  248. {/empty}
  249. <!-- END Sidebar -->
  250. <!-- Header -->
  251. {empty name="_pop"}
  252. {block name="header"}
  253. <header id="header-navbar" class="content-mini content-mini-full">
  254. <!-- Header Navigation Right -->
  255. <ul class="nav-header pull-right">
  256. <li>
  257. <div class="btn-group">
  258. <button class="btn btn-default btn-image dropdown-toggle" data-toggle="dropdown" type="button">
  259. <img src="{$Think.session.user_auth.uid|get_avatar}" alt="{:session('user_auth.username')}">
  260. <span class="caret"></span>
  261. {notempty name="_message"}
  262. {gt name="_message" value="0"}
  263. <i class="fa fa-circle text-danger notice-circle"></i>
  264. {/gt}
  265. {/notempty}
  266. </button>
  267. <ul class="dropdown-menu dropdown-menu-right">
  268. <li class="dropdown-header">{:session('user_auth.username')} ({:session('user_auth.role_name')})</li>
  269. <li>
  270. <a tabindex="-1" href="{:url('admin/index/profile')}">
  271. <i class="si si-settings pull-right"></i>个人设置
  272. </a>
  273. </li>
  274. <li>
  275. <a tabindex="-1" href="javascript:void(0);" id="js-change-role">
  276. <i class="si si-users pull-right"></i>切换角色
  277. </a>
  278. </li>
  279. <li>
  280. <a tabindex="-1" href="{:url('admin/message/index')}">
  281. <i class="si si-envelope-open pull-right"></i><span class="badge badge-primary pull-right">{$_message|default=0}</span>消息中心
  282. </a>
  283. </li>
  284. <li class="divider"></li>
  285. <li>
  286. <a tabindex="-1" href="{:url('user/publics/signout')}">
  287. <i class="si si-logout pull-right"></i>退出帐号
  288. </a>
  289. </li>
  290. </ul>
  291. </div>
  292. </li>
  293. <li>
  294. <a class="btn btn-default ajax-get" href="{:url('admin/index/wipeCache')}" data-toggle="tooltip" data-placement="bottom" data-original-title="清空缓存">
  295. <i class="fa fa-trash"></i>
  296. </a>
  297. </li>
  298. <li>
  299. <a class="btn btn-default" href="{:rtrim(home_url('/'), '/')}" target="_blank" data-toggle="tooltip" data-placement="bottom" data-original-title="打开前台">
  300. <i class="fa fa-external-link-square"></i>
  301. </a>
  302. </li>
  303. <li>
  304. <!-- Layout API, functionality initialized in App() -> uiLayoutApi() -->
  305. <button class="btn btn-default" data-toggle="layout" data-action="side_overlay_toggle" title="侧边栏" type="button">
  306. <i class="fa fa-tasks"></i>
  307. </button>
  308. </li>
  309. </ul>
  310. <!-- END Header Navigation Right -->
  311. <!-- Header Navigation Left -->
  312. <ul class="nav nav-pills pull-left">
  313. <li class="hidden-md hidden-lg">
  314. <!-- Layout API, functionality initialized in App() -> uiLayoutApi() -->
  315. <a href="javascript:void(0)" data-toggle="layout" data-action="sidebar_toggle"><i class="fa fa-navicon"></i></a>
  316. </li>
  317. <li class="hidden-xs hidden-sm">
  318. <!-- Layout API, functionality initialized in App() -> uiLayoutApi() -->
  319. <a href="javascript:void(0)" title="打开/关闭左侧导航" data-toggle="layout" data-action="sidebar_mini_toggle"><i class="fa fa-bars"></i></a>
  320. </li>
  321. {notempty name="_top_menus"}
  322. {volist name="_top_menus" id="menu"}
  323. <li class="hidden-xs hidden-sm {$menu['id'] == $_location[0]['id'] ?= 'active'}">
  324. {in name="menu.url_type" value="module_admin,module_home"}
  325. <a href="javascript:void(0);" data-module-id="{$menu['id']}" data-module="{$menu['module']}" data-controller="{$menu['controller']}" target="{$menu['url_target']}" class="top-menu"><i class="{$menu.icon}"></i> {$menu.title}</a>
  326. {else/}
  327. <a href="{$menu['url_value']}" target="{$menu['url_target']}"><i class="{$menu.icon}"></i> {$menu.title}</a>
  328. {/in}
  329. </li>
  330. {/volist}
  331. {/notempty}
  332. <li>
  333. <!-- Opens the Apps modal found at the bottom of the page, before including JS code -->
  334. <a href="#" data-toggle="modal" data-target="#apps-modal"><i class="si si-grid"></i></a>
  335. </li>
  336. </ul>
  337. <!-- END Header Navigation Left -->
  338. </header>
  339. {/block}
  340. {/empty}
  341. <!-- END Header -->
  342. <!-- Main Container -->
  343. <main id="main-container">
  344. <!-- Page Header -->
  345. {block name="page-header"}
  346. {empty name="_pop"}
  347. <div class="bg-gray-lighter">
  348. <ol class="breadcrumb">
  349. <li><i class="fa fa-map-marker"></i></li>
  350. {notempty name="_location"}
  351. {volist name="_location" id="v"}
  352. <li><a class="link-effect" href="{notempty name='$v["url_value"]'}{:url($v.url_value, $v.params)}{else/}javascript:void(0);{/notempty}">{$v.title}</a></li>
  353. {/volist}
  354. {/notempty}
  355. </ol>
  356. </div>
  357. {/empty}
  358. {/block}
  359. <!-- END Page Header -->
  360. <!-- Page Content -->
  361. <div class="content">
  362. {// 页面提示钩子}
  363. {:hook('page_tips')}
  364. {// 主体内容}
  365. {block name="content"}{/block}
  366. </div>
  367. <!-- END Page Content -->
  368. </main>
  369. <!-- END Main Container -->
  370. <!-- Footer -->
  371. {empty name="_pop"}
  372. <footer id="page-footer" class="content-mini content-mini-full font-s12 bg-gray-lighter clearfix">
  373. <div class="pull-right">
  374. Crafted with <i class="fa fa-heart text-city"></i> by <a class="font-w600" href="{:config('dolphin.company_website')}" target="_blank">{:config('dolphin.company_name')}</a>
  375. </div>
  376. <div class="pull-left">
  377. <a class="font-w600" href="{:config('dolphin.product_website')}" target="_blank">{:config('dolphin.product_name')} {:config('dolphin.product_version')}</a> &copy; <span class="js-year-copy"></span>
  378. </div>
  379. </footer>
  380. {/empty}
  381. <!-- END Footer -->
  382. </div>
  383. <!-- END Page Container -->
  384. <!-- Apps Modal -->
  385. <!-- Opens from the button in the header -->
  386. <div class="modal fade" id="apps-modal" tabindex="-1" role="dialog" aria-hidden="true">
  387. <div class="modal-dialog modal-dialog-top">
  388. <div class="modal-content">
  389. <!-- Apps Block -->
  390. <div class="block block-themed block-transparent">
  391. <div class="block-header bg-primary-dark">
  392. <ul class="block-options">
  393. <li>
  394. <button data-dismiss="modal" type="button"><i class="si si-close"></i></button>
  395. </li>
  396. </ul>
  397. <h3 class="block-title">所有模块</h3>
  398. </div>
  399. <div class="block-content">
  400. <div class="row text-center">
  401. {notempty name="_top_menus_all"}
  402. {volist name="_top_menus_all" id="menu"}
  403. <div class="col-xs-6 col-sm-3">
  404. {in name="menu.url_type" value="module_admin,module_home"}
  405. <a class="block block-rounded top-menu" href="javascript:void(0);" data-module-id="{$menu['id']}" data-module="{$menu['module']}" data-controller="{$menu['controller']}" target="{$menu['url_target']}">
  406. <div class="block-content text-white {$menu['id'] == $_location[0]['id'] ? 'bg-primary' : 'bg-primary-dark'}">
  407. <i class="{$menu.icon} fa-2x"></i>
  408. <div class="font-w600 push-15-t push-15">{$menu.title}</div>
  409. </div>
  410. </a>
  411. {else/}
  412. <a class="block block-rounded" href="{$menu['url_value']}" target="{$menu['url_target']}">
  413. <div class="block-content text-white {$menu['id'] == $_location[0]['id'] ? 'bg-primary' : 'bg-primary-dark'}">
  414. <i class="{$menu.icon} fa-2x"></i>
  415. <div class="font-w600 push-15-t push-15">{$menu.title}</div>
  416. </div>
  417. </a>
  418. {/in}
  419. </div>
  420. {/volist}
  421. {/notempty}
  422. </div>
  423. </div>
  424. </div>
  425. <!-- END Apps Block -->
  426. </div>
  427. </div>
  428. </div>
  429. <!-- END Apps Modal -->
  430. <!-- OneUI Core JS: jQuery, Bootstrap, slimScroll, scrollLock, Appear, CountTo, Placeholder, Cookie and App.js -->
  431. {eq name="Think.config.minify_status" value="1"}
  432. <script src="{:minify('group', 'core_js,libs_js')}"></script>
  433. {else/}
  434. <script src="__ADMIN_JS__/core/jquery.min.js?v={:config('asset_version')}"></script>
  435. <script src="__ADMIN_JS__/core/bootstrap.min.js?v={:config('asset_version')}"></script>
  436. <script src="__ADMIN_JS__/core/jquery.slimscroll.min.js?v={:config('asset_version')}"></script>
  437. <script src="__ADMIN_JS__/core/jquery.scrollLock.min.js?v={:config('asset_version')}"></script>
  438. <script src="__ADMIN_JS__/core/jquery.appear.min.js?v={:config('asset_version')}"></script>
  439. <script src="__ADMIN_JS__/core/jquery.countTo.min.js?v={:config('asset_version')}"></script>
  440. <script src="__ADMIN_JS__/core/jquery.placeholder.min.js?v={:config('asset_version')}"></script>
  441. <script src="__ADMIN_JS__/core/js.cookie.min.js?v={:config('asset_version')}"></script>
  442. <script src="__LIBS__/magnific-popup/magnific-popup.min.js?v={:config('asset_version')}"></script>
  443. <script src="__ADMIN_JS__/app.js?v={:config('asset_version')}"></script>
  444. <script src="__ADMIN_JS__/dolphin.js?v={:config('asset_version')}"></script>
  445. <script src="__ADMIN_JS__/builder/form.js?v={:config('asset_version')}"></script>
  446. <script src="__ADMIN_JS__/builder/aside.js?v={:config('asset_version')}"></script>
  447. <script src="__ADMIN_JS__/builder/table.js?v={:config('asset_version')}"></script>
  448. <script src="__LIBS__/bootstrap-notify/bootstrap-notify.min.js?v={:config('asset_version')}"></script>
  449. <script src="__LIBS__/sweetalert/sweetalert.min.js?v={:config('asset_version')}"></script>
  450. <script src="__LIBS__/js-xss/xss.min.js?v={:config('asset_version')}"></script>
  451. <script src="__LIBS__/viewer/viewer.min.js?v={:config('asset_version')}"></script>
  452. {/eq}
  453. <!-- Page JS Plugins -->
  454. <script src="__LIBS__/layer/layer.js?v={:config('asset_version')}"></script>
  455. {notempty name="_js_files"}
  456. {eq name="Think.config.minify_status" value="1"}
  457. <script src="{:minify('group', $_js_files)}"></script>
  458. {else/}
  459. {volist name="_js_files" id="js"}
  460. {:load_assets($js, 'js')}
  461. {/volist}
  462. {/eq}
  463. {/notempty}
  464. {notempty name="extend_js_list"}
  465. {volist name="extend_js_list" id="vo"}
  466. {volist name="vo" id="v"}
  467. <script src="{$v}?v={:config('asset_version')}"></script>
  468. {/volist}
  469. {/volist}
  470. {/notempty}
  471. <script>
  472. jQuery(function () {
  473. // 切换角色
  474. $('#js-change-role').click(function () {
  475. Dolphin.loading();
  476. $.get('{:url("admin/ajax/getMyRoles")}', function (res) {
  477. Dolphin.loading('hide');
  478. if (res.code) {
  479. let options = '';
  480. $.each(res.data.roles, function (index, item) {
  481. options += '<option value="'+index+'" '+(res.data.curr == index ? 'selected' : '')+'>'+item+'</option>';
  482. });
  483. layer.open({
  484. type: 1,
  485. title: '<i class="si si-users"></i> 切换角色',
  486. area: ['300px', '180px'],
  487. btn: ['确定', '取消'],
  488. content: '<div class="form-group push-20-t">\n' +
  489. '<label class="col-xs-12" for="contact1-subject">当前角色</label>\n' +
  490. '<div class="col-xs-12">\n' +
  491. ' <select class="form-control" id="role-select" size="1">\n' + options +
  492. ' </select>\n' +
  493. '</div>\n' +
  494. '</div>',
  495. yes: function(index, layero){
  496. let role = $('#role-select').val();
  497. let loading = layer.load(2);
  498. $.post('{:url("admin/ajax/setMyRole")}', {id:role}, function (res) {
  499. layer.close(loading);
  500. if (res.code) {
  501. layer.close(index);
  502. layer.msg(res.msg);
  503. setTimeout(function () {
  504. location.reload();
  505. }, 1500);
  506. } else {
  507. layer.msg(res.msg)
  508. }
  509. });
  510. }
  511. });
  512. } else {
  513. Dolphin.notify(res.msg, 'danger');
  514. }
  515. });
  516. });
  517. App.initHelpers(['appear', 'slimscroll', 'magnific-popup', 'table-tools']);
  518. {notempty name="_js_init"}
  519. App.initHelpers({$_js_init|raw});
  520. {/notempty}
  521. });
  522. </script>
  523. <!--页面js-->
  524. {block name="script"}{/block}
  525. <!--插件js钩子-->
  526. {:hook('page_plugin_js')}
  527. {// 额外HTML代码 }
  528. {$extra_html|raw|default=''}
  529. </body>
  530. </html>