-
Notifications
You must be signed in to change notification settings - Fork 0
/
pluginsadmin.html
168 lines (158 loc) · 6.05 KB
/
pluginsadmin.html
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<!DOCTYPE html>
<html{if="$language !== 'auto'"} lang="{$language}"{/if}>
<head>
{include="includes"}
</head>
<body>
{include="page.header"}
<noscript>
<div class="pure-g new-version-message pure-alert pure-alert-warning">
<div class="pure-u-2-24"></div>
<div class="pure-u-20-24">
{'You have to enable JavaScript to change plugin loading order.'|t}
</div>
</div>
<div class="clear"></div>
</noscript>
<form method="POST" action="{$base_path}/admin/plugins" name="pluginform" id="pluginform" class="pluginform-container">
<div class="pure-g pure-g-full">
<div class="pure-u-2-24"></div>
<div class="pure-u-20-24 page-form">
<h2 class="window-title">{'Plugin administration'|t}</h2>
<section id="enabled_plugins">
<h3 class="window-subtitle">{'Enabled Plugins'|t}</h3>
<div>
{if="count($enabledPlugins)==0"}
<p class="center">{'No plugin enabled.'|t}</p>
{else}
<table id="plugin_table">
<thead>
<tr>
<th class="center">{'Enabled'|t}</th>
<th>{'Name'|t}</th>
<th><div class="pure-u-0 pure-u-lg-visible">{'Description'|t}</div></th>
<th class="center">{'Order'|t}</th>
</tr>
</thead>
<tbody>
{loop="$enabledPlugins"}
<tr data-line="{$key}" data-order="{$counter}" class="main-row">
<td class="center"><input type="checkbox" name="{$key}" id="{$key}" checked="checked"></td>
<td class="center">
<label for="{$key}"><strong>{function="str_replace('_', ' ', $key)"}</strong></label>
</td>
<td><div class="pure-u-0 pure-u-lg-visible"><label for="{$key}">{$value.description}</label></div></td>
<td class="center">
{if="count($enabledPlugins)>1"}
<a href="#" class="order order-up">▲</a>
<a href="#" class="order order-down">▼</a>
{/if}
<input type="hidden" name="order_{$key}" value="{$counter}">
</td>
</tr>
<tr data-line="{$key}" data-order="{$counter}" class="pure-u-lg-0 mobile-row">
<td colspan="4"><label for="{$key}">{$value.description}</label></td>
</tr>
{/loop}
</tbody>
</table>
{/if}
</div>
</section>
<section id="disabled_plugins">
<h3 class="window-subtitle">{'Disabled Plugins'|t}</h3>
<div>
{if="count($disabledPlugins)==0"}
<p class="center">{'No plugin disabled.'|t}</p>
{else}
<table>
<thead>
<tr>
<th class="center">{'Enabled'|t}</th>
<th>{'Name'|t}</th>
<th><div class="pure-u-0 pure-u-lg-visible">{'Description'|t}</div></th>
</tr>
</thead>
<tbody>
{loop="$disabledPlugins"}
<tr class="main-row">
<td class="center"><input type="checkbox" name="{$key}" id="{$key}"></td>
<td class="center">
<label for="{$key}"><strong>{function="str_replace('_', ' ', $key)"}</strong></label>
</td>
<td><div class="pure-u-0 pure-u-lg-visible">
<label for="{$key}">{$value.description}</label>
</div></td>
</tr>
<tr class="pure-u-lg-0 mobile-row">
<td colspan="3"><label for="{$key}">{$value.description}</label></td>
</tr>
{/loop}
</tbody>
</table>
{/if}
</div>
</section>
<p class="more">
{"More plugins available"|t}
<a href="{$root_path}/doc/html/Community-and-related-software/#third-party-plugins">{"in the documentation"|t}</a>.
</p>
<p class="submit-buttons">
<input type="submit" value="{'Save'|t}" name="save">
</p>
</div>
</div>
<input type="hidden" name="token" value="{$token}">
</form>
<form action="{$base_path}/admin/plugins" method="POST">
<div class="pure-g pure-g-full">
<div class="pure-u-2-24"></div>
<div class="page-form pure-u-20-24">
<h2 class="window-title">{'Plugin configuration'|t}</h2>
<section id="plugin_parameters">
<div>
{if="count($enabledPlugins)==0"}
<p class="center">{'No plugin enabled.'|t}</p>
{else}
{$nbParameters=0}
{loop="$enabledPlugins"}
{$nbParameters=$nbParameters+count($value.parameters)}
{if="count($value.parameters) > 0"}
<div class="plugin_parameters">
<h3 class="window-subtitle">{function="str_replace('_', ' ', $key)"}</h3>
{loop="$value.parameters"}
<div class="plugin_parameter">
<p class="float_label">
<label for="{$key}">
<code>{$key}</code>
{if="isset($value.desc)"}
· {$value.desc}
{/if}
</label>
</p>
<div class="float_input">
<input name="{$key}" value="{$value.value}" id="{$key}" type="text" />
</div>
</div>
{/loop}
</div>
{/if}
{/loop}
{if="$nbParameters===0"}
<p class="center">{'No parameter available.'|t}</p>
{else}
<div class="submit-buttons">
<input type="submit" name="parameters_form" value="{'Save'|t}"/>
</div>
{/if}
{/if}
</div>
</section>
</div>
</div>
<input type="hidden" name="token" value="{$token}">
</form>
{include="page.footer"}
<script src="{$asset_path}/js/pluginsadmin.min.js?v={$version_hash}#"></script>
</body>
</html>