tpl-display.html 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. {template 'common/header'}
  2. <ul class="we7-page-tab">
  3. {loop $active_sub_permission $active_menu}
  4. {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']))}
  5. <li {if $action == $active_menu['active']}class="active"{/if}><a href="{$active_menu['url']}">{$active_menu['title']}</a></li>
  6. {/if}
  7. {/loop}
  8. </ul>
  9. <div class="site-template" id="js-wesite-tpl-display" ng-controller="WesiteTplDidplay" ng-cloak>
  10. <div class="search-box" clearfix">
  11. <select class="we7-margin-right" onchange="location.href=this.value">
  12. <option value="{{links.template}}&keyword={$_GPC['keyword']}&type=all">全部模板类型</option>
  13. <option value="{{links.template}}&keyword={$_GPC['keyword']}&type={{temtype.name}}"
  14. ng-repeat="temtype in temtypes"
  15. ng-selected="type == temtype.name"
  16. ng-bind="temtype.title"
  17. >
  18. </option>
  19. </select>
  20. <form action="" method="get" class="search-form">
  21. <input type="hidden" name="c" value="site">
  22. <input type="hidden" name="a" value="style">
  23. <input type="hidden" name="do" value="template">
  24. <input type="hidden" name="type" value="{{type}}">
  25. <div class="input-group col-sm-4">
  26. <input type="text" name="keyword" value="{$_GPC['keyword']}" class="form-control" placeholder="请输入模板名称">
  27. <span class="input-group-btn"><button class="btn btn-default"><i class="fa fa-search"></i></button></span>
  28. </div>
  29. </form>
  30. </div>
  31. <div class="site-template-list">
  32. <div class="site-template-item" ng-class="{'active' : style.styleid == setting.styleid}" ng-repeat="style in stylesResult" ng-if="style.styleid">
  33. <div class="site-template-img" ng-click="selectDefault(style.styleid)">
  34. <img ng-src="../app/themes/{{style.name}}/preview.jpg" alt="{{style.name}}"/>
  35. <div class="cover-dark">
  36. <div class="selected">
  37. <i class="wi wi-right"></i>
  38. <p>设置为默认模板</p>
  39. </div>
  40. </div>
  41. </div>
  42. <h2 class="site-template-title">{{style.title}} ({{style.name}})</h2>
  43. <div class="site-template-manage">
  44. <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>
  45. <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>
  46. <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>
  47. <a href="javascript:void(0);" class="manage-item" ng-click="deleteStyle(links.del, style.styleid)" data-toggle="tooltip" data-placement="bottom" title="删除"><i class="wi wi-delete2"></i></a>
  48. </div>
  49. </div>
  50. <div class="site-template-item" ng-repeat="style in stylesResult" ng-if="!style.styleid">
  51. <div class="cover-lock">
  52. <div class="lock">
  53. <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>
  54. </div>
  55. </div>
  56. <div class="site-template-img">
  57. <img src="../app/themes/{{style.name}}/preview.jpg"/>
  58. <div class="cover-dark">
  59. <div class="selected">
  60. <i class="wi wi-right"></i>
  61. <p>设置为默认模板</p>
  62. </div>
  63. </div>
  64. </div>
  65. <h2 class="site-template-title">{{style.title}} ({{style.name}})</h2>
  66. <div class="site-template-manage">
  67. <a href="javascript:;" class="manage-item" title="设计风格"><i class="wi wi-text"></i></a>
  68. <a href="javascript:;" class="manage-item" title="复制风格"><i class="wi wi-template"></i></a>
  69. <a href="javascript:;" class="manage-item" class="预览"><i class="wi wi-eye"></i></a>
  70. <a href="javascript:;" class="manage-item" title="删除"><i class="wi wi-delete2"></i></a>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. <script>
  76. $(function () {
  77. $("[data-toggle='popover']").popover();
  78. });
  79. angular.module('wesiteApp').value('config', {
  80. stylesResult: {php echo !empty($stylesResult) ? json_encode($stylesResult) : 'null'},
  81. temtypes: {php echo !empty($temtypes) ? json_encode($temtypes) : 'null'},
  82. type: {php echo !empty($_GPC['type']) ? json_encode($_GPC['type']) : 'null'},
  83. setting: {php echo !empty($setting) ? json_encode($setting) : 'null'},
  84. links: {
  85. template: "{php echo url('site/style/template')}",
  86. default: "{php echo url('site/style/default')}",
  87. designer: "{php echo url('site/style/designer')}",
  88. copy: "{php echo url('site/style/copy')}",
  89. build: "{php echo url('site/style/build')}",
  90. del: "{php echo url('site/style/del')}",
  91. home: "{php echo murl('home', array(), true, true)}",
  92. },
  93. });
  94. angular.bootstrap($('#js-wesite-tpl-display'), ['wesiteApp']);
  95. </script>
  96. {template 'common/footer'}