template.html 6.2 KB

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