index.html 4.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <include file="public@header"/>
  2. </head>
  3. <body>
  4. <div class="wrap js-check-wrap">
  5. <ul class="nav nav-tabs">
  6. <li class="active"><a href="{:url('Plugin/index')}">{:lang('ADMIN_PLUGIN_INDEX')}</a></li>
  7. <!--<li><a href="http://www.thinkcmf.com/appstore/plugin.html" target="_blank">插件市场</a></li>
  8. <li>
  9. <a href="http://www.thinkcmf.com/faq.html?url=https://www.kancloud.cn/thinkcmf/faq/493510" target="_blank">插件安装<i
  10. class="fa fa-question-circle"></i></a>
  11. </li>
  12. <li><a href="http://www.thinkcmf.com/topic/index/index/cat/9.html" target="_blank">插件交流</a></li>
  13. <li><a href="https://www.kancloud.cn/thinkcmf/doc5_1/957872" target="_blank">插件文档</a></li>-->
  14. </ul>
  15. <form method="post" class="js-ajax-form margin-top-20">
  16. <php>
  17. $status=array("1"=>'开启',"0"=>'禁用',"3"=>'未安装');
  18. </php>
  19. <table class="table table-hover table-bordered">
  20. <thead>
  21. <tr>
  22. <th>插件名称</th>
  23. <th>插件标识</th>
  24. <th>描述</th>
  25. <th>作者</th>
  26. <th width="60">状态</th>
  27. <th width="220">操作</th>
  28. </tr>
  29. </thead>
  30. <tbody>
  31. <foreach name="plugins" item="vo">
  32. <tr>
  33. <td>{$vo.title}</td>
  34. <td>{$vo.name}</td>
  35. <td>{$vo.description}</td>
  36. <td>{$vo.author}</td>
  37. <td>{$status[$vo['status']]}</td>
  38. <td>
  39. <if condition="$vo['status']==3">
  40. <a class="btn btn-xs btn-primary js-ajax-dialog-btn"
  41. href="{:url('plugin/install',array('name'=>$vo['name']))}"
  42. data-msg="确定安装该插件吗?">安装</a>
  43. <else/>
  44. <php>$config=json_decode($vo['config'],true);</php>
  45. <if condition="!empty($config)">
  46. <empty name="config.custom_config">
  47. <a class="btn btn-xs btn-primary"
  48. href="{:url('plugin/setting',array('id'=>$vo['id']))}">设置</a>
  49. <else/>
  50. <a class="btn btn-xs btn-primary"
  51. href="{:cmf_plugin_url($vo['name'].'://AdminIndex/setting')}">设置1</a>
  52. </empty>
  53. <else/>
  54. <a class="btn btn-xs btn-primary disabled" href="javascript:;">设置</a>
  55. </if>
  56. <if condition="!empty($vo['has_admin'])">
  57. <a class="btn btn-xs btn-info"
  58. href="javascript:parent.openapp('{:cmf_plugin_url($vo['name'].'://AdminIndex/index')}','plugin_{$vo.name}','{$vo.title}')">管理</a>
  59. <else/>
  60. <a class="btn btn-xs btn-info disabled" href="javascript:;">管理</a>
  61. </if>
  62. <!-- <a class="btn btn-xs btn-success js-ajax-dialog-btn"
  63. href="{:url('plugin/update',array('name'=>$vo['name']))}"
  64. data-msg="确定更新该插件吗?">更新</a>-->
  65. <if condition="$vo['status']==0">
  66. <a class="btn btn-xs btn-success js-ajax-dialog-btn"
  67. href="{:url('plugin/toggle',array('id'=>$vo['id'],'enable'=>1))}"
  68. data-msg="确定启用该插件吗?">启用</a>
  69. <else/>
  70. <a class="btn btn-xs btn-warning js-ajax-dialog-btn"
  71. href="{:url('plugin/toggle',array('id'=>$vo['id'],'disable'=>1))}"
  72. data-msg="确定禁用该插件吗?">禁用</a>
  73. </if>
  74. <a class="btn btn-xs btn-danger js-ajax-dialog-btn"
  75. href="{:url('plugin/uninstall',array('id'=>$vo['id']))}"
  76. data-msg="确定卸载该插件吗?">卸载</a>
  77. </if>
  78. </td>
  79. </tr>
  80. </foreach>
  81. </tbody>
  82. </table>
  83. </form>
  84. </div>
  85. <script src="__STATIC__/js/admin.js"></script>
  86. </body>
  87. </html>