/
plugin_manager_bs4.html
453 lines (429 loc) · 17.5 KB
/
plugin_manager_bs4.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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
<patTemplate:tmpl name="pageoutput" unusedvars="strip">
<script type="text/javascript">
<!--
var plugins_to_upgrade = '{PLUGINS_TO_UPGRADE}';
var all_installed_plugins = '{INSTALLED_PLUGINS}';
var ajax_url = '{JOMRES_SITEPAGE_URL_ADMIN_AJAX}';
var loading_content = 'Please wait';
function block_interface() {
jomresJquery.blockUI({
message: '<h3>Upgrading plugins, please wait, this may take a few minutes depending on internet speed.</h3>Currently updating : <div id="plugin_name_being_updated" class="bg-success" ></div><br/> The page will reload when the plugins have been updated, but it is important that you do not interrupt the process.',
baseZ: 1030,
css: {
border: 'none',
padding: '15px',
backgroundColor: '#000',
'-webkit-border-radius': '10px',
'-moz-border-radius': '10px',
opacity: .8,
color: '#fff'
} });
};
function upgrade_core_plugins(){
upgrade_plugins(plugins_to_upgrade);
}
function reinstall_all_plugins(){
upgrade_plugins(all_installed_plugins);
}
function install_plugin(plugin) {
if (plugin != '') {
jomresJquery( '#install_button_content_'+plugin ).addClass('btn-warning');
jomresJquery( '#install_button_content_'+plugin ).text(loading_content);
jomresJquery( "#plugin_name_being_updated" ).html( plugin );
jomresJquery.ajax({ url: '{JOMRES_SITEPAGE_URL_ADMIN_AJAX}&task=addplugin&plugin=' + plugin + '&autoupgrade=1&ajax_install=1', success: function (data) {
var json = JSON.parse(data);
populateDiv('uninstall_button_'+plugin , json.uninstall_button);
populateDiv('install_button_'+plugin , json.install_button);
jomresJquery( '#install_row_'+plugin ).addClass('alert alert-success');
jomresJquery( '#install_button_content_'+plugin ).addClass('btn-primary');
}, async: true
});
}
}
function uninstall_plugin(plugin) {
if (plugin != '') {
jomresJquery( '#uninstall_button_content_'+plugin ).removeClass('btn-danger');
jomresJquery( '#uninstall_button_content_'+plugin ).addClass('btn-warning');
jomresJquery( '#uninstall_button_content_'+plugin ).text(loading_content);
jomresJquery( "#plugin_name_being_updated" ).html( plugin );
jomresJquery.ajax({ url: '{JOMRES_SITEPAGE_URL_ADMIN_AJAX}&task=removeplugin&plugin=' + plugin + '&ajax_install=1', success: function (data) {
var json = JSON.parse(data);
populateDiv('uninstall_button_'+plugin , json.uninstall_button);
populateDiv('install_button_'+plugin , json.install_button);
jomresJquery( '#install_row_'+plugin ).removeClass('alert alert-success');
}, async: true
});
}
}
function upgrade_plugins(plugins_array){
block_interface();
if (plugins_array.length ){
setTimeout(function(){
plugins = plugins_array.split(",");
for (var i = 0, l = plugins.length; i < l; i++) {
plugin = plugins[i];
if (plugin != '') {
jomresJquery( "#plugin_name_being_updated" ).html( plugin );
jomresJquery.ajax({ url: '{JOMRES_SITEPAGE_URL_ADMIN_AJAX}&task=addplugin&plugin=' + plugin + '&autoupgrade=1', success: function (data) {
//console.log(data);
}, async: false
});
}
if ( i ==plugins.length-1)
window.location.reload();
}
},3000);
}
else
jomresJquery.unblockUI();
return false;
}
document.addEventListener('DOMContentLoaded', function() {
jomresJquery('.btn').on('click', function() {
var $this = jomresJquery(this);
//$this.button('loading');
setTimeout(function() {
//$this.button('reset');
}, 8000);
});
});
//-->
</script>
<h2 class="page-header">{PAGETITLE}</h2>
<style>
.modal-body {
max-height: 600px;
overflow-y: auto;
}
</style>
<div class="row-fluid">
<div class="span9">
<patTemplate:tmpl name="developer_users" type="simpleCondition" requiredVars="dummy">
<p class="alert alert-warning">Please do not install all plugins with the hope that they will come in
useful later. They are not all mutually exclusive, I.E. one plug may interfere with another, so it
is recommended that you only install a plugin when you\'ve identified a requirement that the
individual plugin fulfills. <br/>Bold items in the core plugins list are generally essential when
building a portal, and if you have upgraded from v4 you should consider installing those plugins to
continue working as before.</p>
</patTemplate:tmpl>
<patTemplate:tmpl name="encoded_on_full_license" type="simpleCondition" requiredVars="encoding_warning">
<script type="text/javascript">
jomresJquery(document).ready(function(){
jomresJquery('#encoded_plugins_warning').modal('show');
});
</script>
<div class="modal hide fade" id="encoded_plugins_warning">
<div class="modal-header">
<a class="close" data-dismiss="modal">×</a>
<h3>Encoded plugins remain</h3>
</div>
<div class="modal-body">
<p class="alert alert-warning">{ENCODING_WARNING}</p>
</div>
</div>
</patTemplate:tmpl>
<p class="alert alert-{LICENSE_MESSAGE_CLASS}">
{LICENSE_MESSAGE}
</p>
<p class="alert alert-warning">
Please do <em>not</em> install REST API related plugins until you have confirmed that your installation of Jomres is able to run them. To do that, please visit the Admin > Jomres > Tools > REST API test page. This includes any of the "Channelmanagement" plugins.
</p>
<patTemplate:tmpl name="plugins_require_upgrade" type="simpleCondition" requiredVars="upgrade_text">
<a href="javascript:void(0);" onclick="upgrade_core_plugins();" id="upgrade_core_plugins" class="btn btn-primary btn-large">{UPGRADE_TEXT}</a>
</patTemplate:tmpl>
<patTemplate:tmpl name="reinstall_plugins" type="simpleCondition" requiredVars="reinstall_text">
<a href="javascript:void(0);" onclick="reinstall_all_plugins();" id="reinstall_all_plugins" class="btn btn-default btn-large">{REINSTALL_TEXT}</a>
</patTemplate:tmpl>
</div>
<div class="span3">
<h3 class="page-header">Legend</h3>
<table width="100%" class="">
<tr class="alert alert-success">
<td align="center">Already installed</td>
</tr>
<tr class="alert alert-warning">
<td align="center">Upgrade is available</td>
</tr>
<tr class="alert alert-danger">
<td align="center">Plugin retired, uninstall it</td>
</tr>
<!--<tr class="alert alert-info">
<td align="center">Free plugin</td>
</tr>
<tr class="alert">
<td align="center">Third party plugin</td>
</tr>-->
</table>
<p>Plugins with the <i class="fa fa-lock"></i> icon are encoded.</p>
</div>
</div>
<h3 class="page-header">Plugins</h3>
<div class="tabbable">
<ul class="nav nav-tabs" id="myTab" >
<li class="nav-item active" role="presentation" ><a href="#coreplugins" data-toggle="tab">Core plugins</a></li>
<li class="nav-item" role="presentation"><a href="#apiplugins" data-toggle="tab">Core API plugins</a></li>
<li class="nav-item" role="presentation"><a href="#webhooksplugins" data-toggle="tab">Webhooks plugins</a></li>
<li class="nav-item" role="presentation"><a href="#3rdpplugins" data-toggle="tab">Third party plugins</a></li>
<li class="nav-item" role="presentation"><a href="#install3rdpplugin" data-toggle="tab">Install third party plugin</a></li>
<patTemplate:tmpl name="third_party_dev_plugin_tabs" type="simpleCondition" requiredVars="third_party_plugin_tab_name">
<li class="nav-item" role="presentation"><a href="#3pd_tab_{THIRD_PARTY_PLUGIN_TAB_ID}" data-toggle="tab">{THIRD_PARTY_PLUGIN_TAB_NAME}</a></li>
</patTemplate:tmpl>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="coreplugins">
<table width="100%" class="table table-hover ">
<tr>
<th>Name</th>
<th></th>
<th>Add/reinstall/upgrade plugin</th>
<th>Remove plugin</th>
</tr>
<patTemplate:tmpl name="jomresdotnet_plugins" unusedvars="strip">
<tr>
<td id="install_row_{PLUGIN_NAME}" class="{ROWCLASS}"><a name="{PLUGIN_NAME}"></a>{STRONG1}{READABLE_NAME}{STRONG2}</td>
<!--<td><a href="#" class="thumbnail"><img src="{IMAGE}" alt=""></a></td>-->
<td>
<button type="button" class="btn btn-info" data-toggle="modal" data-target="#modal_trigger_{PLUGIN_NAME}">{ENCODED_ICON} More info</button>
</td>
<td><div id="install_button_{PLUGIN_NAME}">{INSTALL} {LATERVERSION}</div></td>
<td><div id="uninstall_button_{PLUGIN_NAME}">{UNINSTALL}</div></td>
</tr>
<!-- Modal -->
<div id="modal_trigger_{PLUGIN_NAME}" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h3 id="myModalLabel">{READABLE_NAME}</h3>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="row-fluid">
<div class="span6">
<img src="{IMAGE}" class="img-responsive" alt="{READABLE_NAME}"/>
</div>
<div class="span6">
<div class="alert alert-info">
<p>Minimum Jomres version {MIN_JOMRES_VER}</p>
<p>Your Version {LOCAL_VER}</p>
<p>Current Version {REMOTE_VER}</p>
<p>Last updated {LASTUPDATE}</p>
<p>
<a href="{MANUAL_LINK}" target="_blank" class="{MANUAL_CLASS}">{MANUAL_TEXT}</a>
<a href="{DEMO_LINK}" target="_blank" class="{DEMO_CLASS}">{DEMO_TEXT}</a>
</p>
</div>
</div>
</div>
<p class="text-info">{PLUGIN_DESC}</p>
<p class="{HIGHLIGHT_CLASS}">{HIGHLIGHT}</p>
<button type="button" class="btn" data-toggle="collapse" data-target="#collapse_{PLUGIN_NAME}">
Changelog
</button>
<div id="collapse_{PLUGIN_NAME}" class="collapse">
<div class="row-fluid">
<div class="span12">
<p class="muted">{CHANGELOG}</p>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</patTemplate:tmpl>
</table>
</div>
<div class="tab-pane" id="apiplugins">
<table width="100%" class="table table-hover ">
<tr>
<th>Name</th>
<th></th>
<th>Add/reinstall/upgrade plugin</th>
<th>Remove plugin</th>
<th>{HPLUGINPRICE}</th>
</tr>
<patTemplate:tmpl name="jomresdotnet_apiplugins" unusedvars="strip">
<tr>
<td id="install_row_{PLUGIN_NAME}" class="{ROWCLASS}"><a name="{PLUGIN_NAME}"></a>{STRONG1}{READABLE_NAME}{STRONG2}</td>
<!--<td><a href="#" class="thumbnail"><img src="{IMAGE}" alt=""></a></td>-->
<td>
<button type="button" class="btn btn-info" data-toggle="modal" data-target="#modal_trigger_{PLUGIN_NAME}">{ENCODED_ICON} More info</button>
</td>
<td><div id="install_button_{PLUGIN_NAME}">{INSTALL} {LATERVERSION}</div></td>
<td><div id="uninstall_button_{PLUGIN_NAME}">{UNINSTALL}</div></td>
<td>{ADD_TO_CART_BUTTON}</td>
</tr>
<!-- Modal -->
<div id="modal_trigger_{PLUGIN_NAME}" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">{READABLE_NAME}</h3>
</div>
<div class="modal-body">
<div class="row-fluid">
<div class="span6">
<img src="{IMAGE}" class="img-responsive" alt="{READABLE_NAME}"/>
</div>
<div class="span6">
<div class="alert alert-info">
<p>Minimum Jomres version {MIN_JOMRES_VER}</p>
<p>Your Version {LOCAL_VER}</p>
<p>Current Version {REMOTE_VER}</p>
<p>Last updated {LASTUPDATE}</p>
<p>
<a href="{MANUAL_LINK}" target="_blank" class="{MANUAL_CLASS}">{MANUAL_TEXT}</a>
<a href="{DEMO_LINK}" target="_blank" class="{DEMO_CLASS}">{DEMO_TEXT}</a>
</p>
</div>
</div>
</div>
<p>{PLUGIN_DESC}</p>
<p class="{HIGHLIGHT_CLASS}">{HIGHLIGHT}</p>
<button type="button" class="btn" data-toggle="collapse" data-target="#collapse_{PLUGIN_NAME}">
Changelog
</button>
<div id="collapse_{PLUGIN_NAME}" class="collapse">
<div class="row-fluid">
<div class="span12">
<p class="muted">{CHANGELOG}</p>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</patTemplate:tmpl>
</table>
</div>
<div class="tab-pane" id="webhooksplugins">
<table width="100%" class="table table-hover ">
<tr>
<th>Name</th>
<th></th>
<th>Add/reinstall/upgrade plugin</th>
<th>Remove plugin</th>
<th>{HPLUGINPRICE}</th>
</tr>
<patTemplate:tmpl name="jomresdotnet_webhooksplugins" unusedvars="strip">
<tr>
<td id="install_row_{PLUGIN_NAME}" class="{ROWCLASS}"><a name="{PLUGIN_NAME}"></a>{STRONG1}{READABLE_NAME}{STRONG2}</td>
<!--<td><a href="#" class="thumbnail"><img src="{IMAGE}" alt=""></a></td>-->
<td>
<button type="button" class="btn btn-info" data-toggle="modal" data-target="#modal_trigger_{PLUGIN_NAME}">{ENCODED_ICON} More info</button>
</td>
<td><div id="install_button_{PLUGIN_NAME}">{INSTALL} {LATERVERSION}</div></td>
<td><div id="uninstall_button_{PLUGIN_NAME}">{UNINSTALL}</div></td>
<td>{ADD_TO_CART_BUTTON}</td>
</tr>
<!-- Modal -->
<div id="modal_trigger_{PLUGIN_NAME}" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">{READABLE_NAME}</h3>
</div>
<div class="modal-body">
<div class="row-fluid">
<div class="span6">
<img src="{IMAGE}" class="img-responsive" alt="{READABLE_NAME}"/>
</div>
<div class="span6">
<div class="alert alert-info">
<p>Minimum Jomres version {MIN_JOMRES_VER}</p>
<p>Your Version {LOCAL_VER}</p>
<p>Current Version {REMOTE_VER}</p>
<p>Last updated {LASTUPDATE}</p>
<p>
<a href="{MANUAL_LINK}" target="_blank" class="{MANUAL_CLASS}">{MANUAL_TEXT}</a>
<a href="{DEMO_LINK}" target="_blank" class="{DEMO_CLASS}">{DEMO_TEXT}</a>
</p>
</div>
</div>
</div>
<p>{PLUGIN_DESC}</p>
<p class="{HIGHLIGHT_CLASS}">{HIGHLIGHT}</p>
<button type="button" class="btn" data-toggle="collapse" data-target="#collapse_{PLUGIN_NAME}">
Changelog
</button>
<div id="collapse_{PLUGIN_NAME}" class="collapse">
<div class="row-fluid">
<div class="span12">
<p class="muted">{CHANGELOG}</p>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</patTemplate:tmpl>
</table>
</div>
<div class="tab-pane" id="3rdpplugins">
<table width="100%" class="table table-striped">
<thead>
<tr>
<th colspan="6"></th>
</tr>
</thead>
<tbody>
<tr>
<th>Name</th>
<th>Your Version</th>
<th>Current version</th>
<th>Released</th>
<th>Description</th>
<th>Author</th>
<th>Author email</th>
<th>Website</th>
<th>Remove plugin</th>
</tr>
<patTemplate:tmpl name="thirdpartyplugins" unusedvars="nbsp" type="simpleCondition" requiredVars="name">
<tr>
<td>{NAME}</td>
<td>{LOCALVERSION}</td>
<td>{THIRD_PARTY_PLUGIN_LATEST_AVAILABLE_VERSION}</td>
<td>{LATEST_RELEASE}</td>
<td>{DESCRIPTION}</td>
<td>{AUTHOR}</td>
<td><a href="mailto:{AUTHOREMAIL}?subject={NAME}">{AUTHOREMAIL}</a></td>
<td>{DEVELOPER_PAGE}</td>
<td><a href="{UNINSTALLLINK}" class="btn btn-danger">{UNINSTALL}</a></td>
</tr>
</patTemplate:tmpl>
</tbody>
</table>
</div>
<div class="tab-pane" id="install3rdpplugin">
<form enctype="multipart/form-data" action="{JOMRES_SITEPAGE_URL_ADMIN}&task=addplugin&thirdparty=1"
method="post" class="form-horizontal">
<fieldset>
<div class="control-group">
<label class="control-label" for="pluginfile">Install third party plugin</label>
<div class="controls">
<input type="file" name="pluginfile" class="input-file"/>
</div>
</div>
<div class="form-actions">
<input type="submit" value="Install" class="btn btn-primary"/>
</div>
<input type="hidden" name="no_html" value="1"/>
{CSRF_TOKEN}
</fieldset>
</form>
</div>
<patTemplate:tmpl name="third_party_dev_plugin_tab_content" type="simpleCondition" requiredVars="third_party_plugin_tab_content">
<div class="tab-pane" id="3pd_tab_{THIRD_PARTY_PLUGIN_TAB_ID}">
{THIRD_PARTY_PLUGIN_TAB_CONTENT}
</div>
</patTemplate:tmpl>
</div>
</div>
</patTemplate:tmpl>