人人商城

template.html 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. {template 'common/header'}
  2. <div class="we7-page-title">
  3. 模板管理
  4. </div>
  5. <ul class="we7-page-tab">
  6. <li {if $do == 'installed'}class="active"{/if}>
  7. <a href="{php echo url('system/template/installed')}" >已安装模板</a>
  8. </li>
  9. <li {if $do == 'not_install'}class="active"{/if}>
  10. <a href="{php echo url('system/template/not_install')}">未安装模板</a>
  11. </li>
  12. </ul>
  13. <div class="we7-page-search we7-padding-bottom clearfix">
  14. <form action="{if $do == 'not_install'}{php echo url('system/template/not_install')}{else}{php echo url('system/template/installed')}{/if}" method="post" role="form">
  15. <div class="input-group col-sm-4">
  16. <input name="keyword" value="{$_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>
  21. <div class="system-template">
  22. {if $do == 'installed'}
  23. <div class="btn-group we7-btn-group">
  24. <a href="{php echo url('system/template/installed')}" class="btn {if $_GPC['type'] == ''}active{/if}">全部</a>
  25. {loop $temtypes $type}
  26. <a href="{php echo url('system/template/installed', array('type' => $type['name']))}" class="btn {if $_GPC['type'] == $type['name']}active{/if}">{$type['title']}</a>
  27. {/loop}
  28. </div>
  29. <div class="system-template-list" id="js-system-template" ng-controller="templateCtrl" ng-cloak>
  30. {loop $template_list $template}
  31. <div class="system-template-item" ng-class="templateList.{$template['name']}.upgrade == 1 ? '' : 'active'">
  32. <div class="cover-lock">
  33. <div class="lock">
  34. <a href="" ng-if="templateList.{$template['name']}.upgrade == 1" class="btn btn-primary item-build-btn" role="button" ng-click="setUpgradeInfo('{$template['name']}')">更新</a>
  35. <a href="{php echo url('system/template/uninstall', array('id' => $template['id']))}" onclick="return confirm('确认删除模板吗?');" class="btn btn-danger item-build-btn" role="button">停用</a>
  36. </div>
  37. </div>
  38. <h2 class="system-template-title">
  39. {$template['title']}
  40. </h2>
  41. <div class="system-template-img">
  42. <img src="{php echo tomedia('../app/themes/'. $template['name']. '/preview.jpg')}"/>
  43. </div>
  44. </div>
  45. {/loop}
  46. <div class="modal fade" id="upgradeInfo" tabindex="-1" role="dialog" aria-labelledby="myModalLabels" aria-hidden="true">
  47. <div class="modal-dialog we7-modal-dialog" style="width:800px">
  48. <div class="modal-content">
  49. <div class="modal-header">
  50. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  51. <h4 class="modal-title">模板分支版本信息</h4>
  52. </div>
  53. <div class="modal-body">
  54. <div class="form-group">
  55. <div class="panel panel-default">
  56. <div class="panel-heading">
  57. {{ upgradeInfo.title }}---模板分支信息
  58. </div>
  59. <div class="panel-body">
  60. <div class="input-group col-sm-12" ng-repeat="branch in upgradeInfo.branches">
  61. <div class="col-sm-3">
  62. 分之名称 : {{ branch.name }}
  63. </div>
  64. <div class="col-sm-3">
  65. 升级价格 : {{ branch.id > upgradeInfo.site_branch.id ? branch.upgrade_price : 0 }}
  66. </div>
  67. <div class="col-sm-2">
  68. <button class="btn btn-default" onclick="$(this).parent().next().next().toggle();">升级说明</button>
  69. </div>
  70. <div class="col-sm-3">
  71. <a ng-href="{{ './index.php?c=cloud&a=process&t='+upgradeInfo.name+'&is_upgrade=1' }}" class="btn btn-default" onclick="return confirm('确定要升级到此分之的最新版吗?')" ng-if="branch.id == upgradeInfo.site_branch.id">免费升级到【{{branch.name}}】最新版本</a>
  72. <a ng-href="{{ './index.php?c=cloud&a=redirect&do=buybranch&type=theme&m='+upgradeInfo.name+'&branch='+branch.id+'&is_upgrade=1' }}" class="btn btn-default" ng-click="upgrade(branch.upgrade_price)" ng-if="branch.id > upgradeInfo.site_branch.id">付费升级到【{{branch.name}}】最新版本</a>
  73. </div>
  74. <div style="display: none">
  75. <span class="help-block" ng-bind-html=" branch.version.description">
  76. </span>
  77. </div>
  78. </div>
  79. </div>
  80. <div class="input-group col-sm-12">
  81. <div class="alert-info">
  82. <span><i class="fa fa-info-circle"></i></span>
  83. 模板分支按照等级顺序排列。
  84. </div>
  85. <div class="alert-info">
  86. <span><i class="fa fa-info-circle"></i></span>
  87. 如果要升级到其它分支最新版本,需要花费对应分支价格数量的交易币。
  88. </div>
  89. <div class="alert-info">
  90. <span><i class="fa fa-info-circle"></i></span>
  91. 已购买的模板分支可以免费升级到该分支的最新版本。
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. <div class="modal-footer">
  98. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. <div class="text-right">
  105. {$pager}
  106. </div>
  107. <script>
  108. angular.module('moduleApp').value('config', {
  109. 'templateList' : {php echo json_encode($template_list)},
  110. 'url' : "{php echo url('system/template/check_upgrade')}",
  111. 'get_upgrade_info_url' : "{php echo url('system/template/get_upgrade_info')}"
  112. });
  113. angular.bootstrap($('#js-system-template'), ['moduleApp']);
  114. </script>
  115. {elseif $do == 'not_install'}
  116. {loop $uninstall_template $template}
  117. <div class="system-template-item">
  118. <div class="cover-lock">
  119. <div class="lock">
  120. <a href="{php echo url('system/template/install', array('templateid' => $template['name']))}" class="btn btn-warning item-build-btn" role="button">安装</a>
  121. </div>
  122. </div>
  123. <h2 class="system-template-title">
  124. {$template['title']}
  125. </h2>
  126. <div class="system-template-img">
  127. <img src="{php echo tomedia($template['logo'])}"/>
  128. </div>
  129. </div>
  130. {/loop}
  131. {$pager}
  132. {/if}
  133. </div>
  134. {template 'common/footer'}