]> git.immae.eu Git - github/shaarli/Shaarli.git/blob - tpl/default/pluginsadmin.html
Responsive plugin administration page
[github/shaarli/Shaarli.git] / tpl / default / pluginsadmin.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 {include="includes"}
5 </head>
6 <body>
7 {include="page.header"}
8
9 <noscript>
10 <div class="pure-g new-version-message pure-alert pure-alert-warning">
11 <div class="pure-u-2-24"></div>
12 <div class="pure-u-20-24">
13 {'You need to enable Javascript to change plugin loading order.'|t}
14 </div>
15 </div>
16 <div class="clear"></div>
17 </noscript>
18
19 <form method="POST" action="?do=save_pluginadmin" name="pluginform" id="pluginform">
20 <div class="pure-g">
21 <div class="pure-u-lg-1-6 pure-u-1-8"></div>
22 <div class="pure-u-lg-2-3 pure-u-3-4 page-form page-form-complete">
23 <h2>{'Plugin administration'|t}</h2>
24
25 <section id="enabled_plugins">
26 <h3>{'Enabled Plugins'|t}</h3>
27
28 <div>
29 {if="count($enabledPlugins)==0"}
30 <p>{'No plugin enabled.'|t}</p>
31 {else}
32 <table id="plugin_table">
33 <thead>
34 <tr>
35 <th class="center">{'Disable'|t}</th>
36 <th>{'Name'|t}</th>
37 <th><div class="pure-u-0 pure-u-lg-visible">{'Description'|t}</div></th>
38 <th class="center">{'Order'|t}</th>
39 </tr>
40 </thead>
41 <tbody>
42 {loop="$enabledPlugins"}
43 <tr data-line="{$key}" data-order="{$counter}" class="main-row">
44 <td class="center"><input type="checkbox" name="{$key}" id="{$key}" checked="checked"></td>
45 <td class="center">
46 <label for="{$key}"><strong>{function="str_replace('_', ' ', $key)"}</strong></label>
47 </td>
48 <td><div class="pure-u-0 pure-u-lg-visible"><label for="{$key}">{$value.description}</label></div></td>
49 <td class="center">
50 {if="count($enabledPlugins)>1"}
51 <a href="#" class="order"
52 onclick="return orderUp(this.parentNode.parentNode.getAttribute('data-order'));">
53
54 </a>
55 <a href="#" class="order"
56 onclick="return orderDown(this.parentNode.parentNode.getAttribute('data-order'));">
57
58 </a>
59 {/if}
60 <input type="hidden" name="order_{$key}" value="{$counter}">
61 </td>
62 </tr>
63 <tr class="pure-u-lg-0 mobile-row">
64 <td colspan="4"><label for="{$key}">{$value.description}</label></td>
65 </tr>
66 {/loop}
67 </tbody>
68 <tfoot>
69 <tr>
70 <th class="center">{'Disable'|t}</th>
71 <th>{'Name'|t}</th>
72 <th><div class="pure-u-0 pure-u-lg-visible">{'Description'|t}</div></th>
73 <th class="center">{'Order'|t}</th>
74 </tr>
75 </tfoot>
76 </table>
77 {/if}
78 </div>
79 </section>
80
81 <section id="disabled_plugins">
82 <h3>{'Disabled Plugins'|t}</h3>
83
84 <div>
85 {if="count($disabledPlugins)==0"}
86 <p>{'No plugin disabled.'|t}</p>
87 {else}
88 <table>
89 <thead>
90 <tr>
91 <th class="center">{'Enable'|t}</th>
92 <th>{'Name'|t}</th>
93 <th><div class="pure-u-0 pure-u-lg-visible">{'Description'|t}</div></th>
94 </tr>
95 </thead>
96 <tbody>
97 {loop="$disabledPlugins"}
98 <tr class="main-row">
99 <td class="center"><input type="checkbox" name="{$key}" id="{$key}"></td>
100 <td class="center">
101 <label for="{$key}"><strong>{function="str_replace('_', ' ', $key)"}</strong></label>
102 </td>
103 <td><div class="pure-u-0 pure-u-lg-visible">
104 <label for="{$key}">{$value.description}</label>
105 </div></td>
106 </tr>
107 <tr class="pure-u-lg-0 mobile-row">
108 <td colspan="3"><label for="{$key}">{$value.description}</label></td>
109 </tr>
110 {/loop}
111 </tbody>
112 <tfoot>
113 <tr>
114 <th class="center">{'Enable'|t}</th>
115 <th>{'Name'|t}</th>
116 <th><div class="pure-u-0 pure-u-lg-visible">{'Description'|t}</div></th>
117 </tr>
118 </tfoot>
119 </table>
120 {/if}
121 </div>
122
123 </section>
124
125 <div class="center">
126 <input type="submit" value="{'Save'|t}" name="save">
127 </div>
128 </div>
129 </div>
130 <input type="hidden" name="token" value="{$token}">
131 </form>
132
133 <form action="?do=save_pluginadmin" method="POST">
134 <div class="pure-g">
135 <div class="pure-u-lg-1-6 pure-u-1-8"></div>
136 <div class="pure-u-lg-2-3 pure-u-3-4 page-form page-form-light">
137 <h2>{'Plugin configuration'|t}</h2>
138 <section id="plugin_parameters">
139 <div>
140 {if="count($enabledPlugins)==0"}
141 <p>{'No plugin enabled.'|t}</p>
142 {else}
143 {loop="$enabledPlugins"}
144 {if="count($value.parameters) > 0"}
145 <div class="plugin_parameters">
146 <h3>{function="str_replace('_', ' ', $key)"}</h3>
147 {loop="$value.parameters"}
148 <div class="plugin_parameter">
149 <div class="float_label">
150 <label for="{$key}">
151 <code>{$key}</code>
152 {if="isset($value.desc)"}
153 {$value.desc}
154 {/if}
155 </label>
156 </div>
157 <div class="float_input">
158 <input name="{$key}" value="{$value}" id="{$key}" type="text" />
159 </div>
160 </div>
161 {/loop}
162 </div>
163 {/if}
164 {/loop}
165 {/if}
166 <div class="center">
167 <input type="submit" name="parameters_form" value="{'Save'|t}"/>
168 </div>
169 </div>
170 </section>
171 </div>
172 </div>
173 </form>
174
175 {include="page.footer"}
176 <script src="inc/plugin_admin.js#"></script>
177
178 </body>
179 </html>