forked from featherbb/featherbb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugins.php
More file actions
93 lines (87 loc) · 3.72 KB
/
Copy pathplugins.php
File metadata and controls
93 lines (87 loc) · 3.72 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
92
93
<?php
/**
* Copyright (C) 2015-2016 FeatherBB
* based on code by (C) 2008-2015 FluxBB
* and Rickard Andersson (C) 2002-2008 PunBB
* License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
*/
// Make sure no one attempts to run this script "directly"
if (!isset($feather)) {
exit;
}
Container::get('hooks')->fire('view.admin.plugins.start');
?>
<div class="block">
<h2>Plugins</h2>
<div class="box">
<div class="inbox">
<table class="table">
<caption><?php _e('Available plugins') ?></caption>
<thead>
<tr>
<th><?php _e('Extension') ?></th>
<th><?php _e('Description') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($availablePlugins as $plugin) : ?>
<tr>
<td>
<strong><?= $plugin->title; ?></strong> <small><?= $plugin->version; ?></small>
<div class="plugin-actions">
<?php if (in_array($plugin->name, $activePlugins)) { ?>
<a href="<?= Router::pathFor('deactivatePlugin', ['name' => $plugin->name]) ?>"><?php _e('Deactivate') ?></a>
<?php } else { ?>
<a href="<?= Router::pathFor('activatePlugin', ['name' => $plugin->name]) ?>"><?php _e('Activate') ?></a> <br>
<a href="<?= Router::pathFor('uninstallPlugin', ['name' => $plugin->name]) ?>"><?php _e('Uninstall') ?></a>
<?php } ?>
</div>
</td>
<td>
<?= $plugin->description; ?>
<div class="plugin-details">
By <?= $plugin->author->name; ?>
</div>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<p style="text-align:right"><?= count($availablePlugins) ?> éléments</p>
</div>
<div class="inbox">
<table class="table">
<caption><?php _e('Available plugins') ?></caption>
<thead>
<tr>
<th><?php _e('Extension') ?></th>
<th><?php _e('Description') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($officialPlugins as $plugin) : ?>
<tr>
<td>
<strong><?= $plugin->title; ?></strong> <small><?= $plugin->version; ?></small>
<div class="plugin-actions">
<a href="<?= Router::pathFor('downloadPlugin', ['name' => $plugin->name, 'version' => $plugin->version]) ?>">Download</a>
</div>
</td>
<td>
<?= $plugin->description; ?>
<div class="plugin-details">
By <?= $plugin->author->name; ?>
</div>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<p style="text-align:right"><?= count($officialPlugins) ?> éléments</p>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<?php
Container::get('hooks')->fire('view.admin.plugins.end');