人人商城

tpl-display.html 4.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. {template 'common/header'}
  2. <div class="we7-page-title">微官网</div>
  3. <ul class="we7-page-tab">
  4. {loop $active_sub_permission $active_menu}
  5. {if permission_check_account_user($active_menu['permission_name'], false) && (empty($active_menu['is_display']) || is_array($active_menu['is_display']) && in_array($_W['account']['type'], $active_menu['is_display']))}
  6. <li {if $action == $active_menu['active']}class="active"{/if}><a href="{$active_menu['url']}">{$active_menu['title']}</a></li>
  7. {/if}
  8. {/loop}
  9. </ul>
  10. <div class="we7-page-search we7-padding-bottom clearfix">
  11. <form action="./index.php" method="get" class="form-inline">
  12. <input type="hidden" name="c" value="site">
  13. <input type="hidden" name="a" value="style">
  14. <input type="hidden" name="do" value="template">
  15. <div class="input-group col-sm-4">
  16. <input type="text" name="keyword" value="{$_GPC['keyword']}" class="form-control" placeholder="请输入模板名称">
  17. <span class="input-group-btn"><button class="btn btn-default"><i class="fa fa-search"></i></button></span>
  18. </div>
  19. </form>
  20. </div>
  21. <div class="site-template" id="js-wesite-tpl-display" ng-controller="WesiteTplDidplay" ng-cloak>
  22. <div class="btn-group we7-btn-group">
  23. <a ng-href="{{links.template}}&type=all" ng-class="{'btn': 1,'active': type == 'all'}">全部</a>
  24. <a ng-href="{{links.template}}&type={{temtype.name}}" ng-class="{'btn': 1, 'active': type == temtype.name}" ng-repeat="temtype in temtypes" ng-bind="temtype.title"></a>
  25. </div>
  26. <div class="site-template-list">
  27. <div class="site-template-item" ng-class="{'active' : style.styleid == setting.styleid}" ng-repeat="style in stylesResult" ng-if="style.styleid">
  28. <h2 class="site-template-title">{{style.title}} ({{style.name}})</h2>
  29. <div class="site-template-img" ng-click="selectDefault(style.styleid)">
  30. <img ng-src="../app/themes/{{style.name}}/preview.jpg" alt="{{style.name}}"/>
  31. <div class="cover-dark">
  32. <div class="selected">
  33. <i class="fa fa-check"></i>
  34. </div>
  35. </div>
  36. </div>
  37. <div class="site-template-manage">
  38. <a ng-href="{{links.designer}}&styleid={{style.styleid}}" class="manage-item" data-toggle="tooltip" data-placement="bottom" title="设计风格"><i class="wi wi-text"></i></a>
  39. <a ng-href="{{links.copy}}&styleid={{style.styleid}}" class="manage-item" data-toggle="tooltip" data-placement="bottom" title="复制风格"><i class="wi wi-copy"></i></a>
  40. <a href="javascript:;" class="manage-item" ng-click="preview(style.styleid)" data-toggle="tooltip" data-placement="bottom" title="预览"><i class="wi wi-eye"></i></a>
  41. <a ng-href="{{links.del}}&styleid={{style.styleid}}" class="manage-item" onclick="if(!confirm('删除后将不可恢复,确定删除吗?')) return false;" data-toggle="tooltip" data-placement="bottom" title="删除"><i class="wi wi-delete2"></i></a>
  42. </div>
  43. </div>
  44. <div class="site-template-item" ng-repeat="style in stylesResult" ng-if="!style.styleid">
  45. <div class="cover-lock">
  46. <div class="lock">
  47. <a ng-href="{{links.build}}&styleid={{style.templateid}}" class="btn btn-warning item-build-btn" role="button" data-toggle="popover" data-trigger="hover" data-placement="bottom" data-content="该模板尚未激活,激活后可正常使用!" data-original-title="" title="">点击激活</a>
  48. </div>
  49. </div>
  50. <h2 class="site-template-title">{{style.title}} ({{style.name}})</h2>
  51. <div class="site-template-img">
  52. <img src="../app/themes/{{style.name}}/preview.jpg"/>
  53. <div class="cover-dark">
  54. <div class="selected">
  55. <i class="fa fa-check"></i>
  56. </div>
  57. </div>
  58. </div>
  59. <div class="site-template-manage">
  60. <a href="javascript:;" class="manage-item" title="设计风格"><i class="wi wi-text"></i></a>
  61. <a href="javascript:;" class="manage-item" title="复制风格"><i class="wi wi-template"></i></a>
  62. <a href="javascript:;" class="manage-item" class="预览"><i class="wi wi-eye"></i></a>
  63. <a href="javascript:;" class="manage-item" title="删除"><i class="wi wi-delete2"></i></a>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. <script>
  69. $(function () {
  70. $("[data-toggle='popover']").popover();
  71. });
  72. angular.module('wesiteApp').value('config', {
  73. stylesResult: {php echo !empty($stylesResult) ? json_encode($stylesResult) : 'null'},
  74. temtypes: {php echo !empty($temtypes) ? json_encode($temtypes) : 'null'},
  75. type: {php echo !empty($_GPC['type']) ? json_encode($_GPC['type']) : 'null'},
  76. setting: {php echo !empty($setting) ? json_encode($setting) : 'null'},
  77. links: {
  78. template: "{php echo url('site/style/template')}",
  79. default: "{php echo url('site/style/default')}",
  80. designer: "{php echo url('site/style/designer')}",
  81. copy: "{php echo url('site/style/copy')}",
  82. build: "{php echo url('site/style/build')}",
  83. del: "{php echo url('site/style/del')}",
  84. home: "{php echo murl('home', array(), true, true)}",
  85. },
  86. });
  87. angular.bootstrap($('#js-wesite-tpl-display'), ['wesiteApp']);
  88. </script>
  89. {template 'common/footer'}