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