人人商城

display.tpl.php 5.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <?php defined('IN_IA') or exit('Access Denied');?><?php (!empty($this) && $this instanceof WeModuleSite || 0) ? (include $this->template('common/header', TEMPLATE_INCLUDEPATH)) : (include template('common/header', TEMPLATE_INCLUDEPATH));?>
  2. <div class="we7-page-title">微官网</div>
  3. <ul class="we7-page-tab">
  4. <?php if(is_array($active_sub_permission)) { foreach($active_sub_permission as $active_menu) { ?>
  5. <?php 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 <?php if($action == $active_menu['active']) { ?>class="active"<?php } ?>><a href="<?php echo $active_menu['url'];?>"><?php echo $active_menu['title'];?></a></li>
  7. <?php } ?>
  8. <?php } } ?>
  9. </ul>
  10. <div id="js-wesite-display" ng-controller="WesiteDisplay" ng-cloak>
  11. <div class="we7-page-search we7-padding-bottom clearfix">
  12. <form action="./index.php" method="get" class="form-horizontal ng-pristine ng-valid" role="form">
  13. <input type="hidden" name="c" value="site">
  14. <input type="hidden" name="a" value="multi">
  15. <div class="input-group col-sm-4 pull-left">
  16. <input name="keyword" id="" value="<?php echo $_GPC['keyword'];?>" class="form-control" placeholder="搜索关键字" type="text">
  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 class="pull-right">
  21. <a href="<?php echo url('site/multi/post')?>" class="btn btn-primary we7-padding-horizontal">+新建微官网</a>
  22. </div>
  23. </div>
  24. <div class="alert alert-info">
  25. <p><i class="fa fa-exclamation-circle"></i> 默认微站默认开启,不可关闭</p>
  26. </div>
  27. <table class="table we7-table table-hover site-list">
  28. <col width="140px"/>
  29. <col width=""/>
  30. <col width="160px"/>
  31. <col width="140px"/>
  32. <col width="285px"/>
  33. <tr>
  34. <th colspan="2" class="text-left">名称/模板</th>
  35. <th class="text-left">入口</th>
  36. <th>是否启用</th>
  37. <th class="text-left">操作</th>
  38. </tr>
  39. <tr ng-repeat="multi in multis">
  40. <td class="text-left vertical-middle">
  41. <div class="site-item-img">
  42. <img ng-src="{{multi.preview_thumb}}">
  43. <div class="cover-dark">
  44. <a href="javascript:void(0);" ng-click="preview(multi.id)"></a>
  45. </div>
  46. </div>
  47. </td>
  48. <td class="text-left">
  49. <div class="we7-margin-vertical">
  50. <p class="color-gray">名称</p>
  51. <span class="color-dark" ng-bind="multi.title"></span>
  52. </div>
  53. <div class="we7-margin-bottom">
  54. <p class="color-gray">模板风格</p>
  55. <a href="javascript:;" class="color-dark" ng-bind="multi.style.name"></a>
  56. </div>
  57. </td>
  58. <td class="text-left">
  59. <div class="we7-margin-vertical">
  60. <p class="color-gray">触发关键字</p>
  61. <span class="color-dark" ng-bind="multi.site_info.keyword"></span>
  62. </div>
  63. <div class="we7-margin-bottom">
  64. <p class="color-gray">链接地址</p>
  65. <div class="link-group text-left" style="min-width: 100px;">
  66. <a href="javascript:;" id="copy-{{multi.id}}" class="color-default" clipboard supported="supported" text="multi.copyLink" on-copied="success(multi.id)">点击复制</a>
  67. </div>
  68. </div>
  69. </td>
  70. <td class="vertical-middle">
  71. <div ng-if="default_site == multi.id">默认开启</div>
  72. <label>
  73. <input name="" id="" class="form-control" type="checkbox" style="display: none;">
  74. <div class="switch" ng-class="{'switchOn' : multi.status == 1}" ng-click="switchOn(multi, multi.id)" ng-if="default_site != multi.id"></div>
  75. </label>
  76. </td>
  77. <td class="text-left">
  78. <div class="we7-margin-vertical">
  79. <p class="color-gray">基础操作</p>
  80. <span class="link-group text-left">
  81. <a ng-href="{{links.post}}multiid={{multi.id}}" class="we7-margin-right">编辑</a>
  82. <a ng-href="{{links.copy}}multiid={{multi.id}}" class="we7-margin-right">复制站点</a>
  83. <a ng-href="{{links.del}}id={{multi.id}}" class="del" ng-if="default_site != multi.id" onclick="if(!confirm('删除后将不可恢复,确定删除吗?')) return false;">删除</a>
  84. </span>
  85. <a href="javascript:;" class="label label-success" ng-if="default_site == multi.id">默认微站</a>
  86. </div>
  87. <div class="we7-margin-bottom">
  88. <p class="color-gray">内容设置</p>
  89. <div class="link-group text-left">
  90. <a href="{{links.post}}multiid={{multi.id}}&clicktype=slide" class="we7-margin-right">幻灯片</a>
  91. <a href="{{links.post}}multiid={{multi.id}}&clicktype=homemenu" class="we7-margin-right">导航菜单</a>
  92. <a href="{{links.post}}multiid={{multi.id}}&clicktype=quickmenu">快捷菜单</a>
  93. </div>
  94. </div>
  95. </td>
  96. </tr>
  97. </table>
  98. <div class="text-right we7-padding-top">
  99. <?php echo $pager;?>
  100. </div>
  101. </div>
  102. <script>
  103. require(['underscore'], function(){
  104. angular.module('wesiteApp').value('config', {
  105. default_site: <?php echo !empty($default_site) ? json_encode($default_site) : '0'?>,
  106. multis: <?php echo !empty($multis) ? json_encode($multis) : 'null'?>,
  107. links: {
  108. post: "<?php echo url('site/multi/post')?>",
  109. del: "<?php echo url('site/multi/del')?>",
  110. copy: "<?php echo url('site/multi/copy')?>",
  111. switch: "<?php echo url('site/multi/switch')?>",
  112. appHome: "<?php echo murl('home', array(), true, true)?>",
  113. },
  114. });
  115. angular.bootstrap($('#js-wesite-display'), ['wesiteApp']);
  116. });
  117. </script>
  118. <?php (!empty($this) && $this instanceof WeModuleSite || 0) ? (include $this->template('common/footer', TEMPLATE_INCLUDEPATH)) : (include template('common/footer', TEMPLATE_INCLUDEPATH));?>