bludit/bl-kernel/admin/views/plugins.php

61 lines
1.8 KiB
PHP
Raw Normal View History

2015-06-11 04:27:04 +02:00
<?php
2015-10-19 00:45:58 +02:00
echo Bootstrap::pageTitle(array('title'=>$L->g('Plugins'), 'icon'=>'puzzle-piece'));
2015-10-19 00:45:58 +02:00
echo Bootstrap::link(array(
'title'=>$L->g('Change the position of the plugins'),
'href'=>HTML_PATH_ADMIN_ROOT.'plugins-position',
'icon'=>'elevator'
));
2018-02-06 18:26:59 +01:00
2015-10-19 00:45:58 +02:00
echo '
<table class="table mt-3">
<thead>
<tr>
<th class="border-bottom-0 w-25" scope="col">'.$L->g('Name').'</th>
2018-05-14 00:00:10 +02:00
<th class="border-bottom-0 d-none d-sm-table-cell" scope="col">'.$L->g('Description').'</th>
<th class="text-center border-bottom-0 d-none d-lg-table-cell" scope="col">'.$L->g('Version').'</th>
<th class="text-center border-bottom-0 d-none d-lg-table-cell" scope="col">'.$L->g('Author').'</th>
</tr>
</thead>
<tbody>
2015-10-19 00:45:58 +02:00
';
foreach ($plugins['all'] as $plugin) {
echo '<tr id="'.$plugin->className().'" '.($plugin->installed()?'class="bg-light"':'').'>
2015-06-12 06:00:04 +02:00
<td class="align-middle pt-3 pb-3">
<div>'.$plugin->name().'</div>
<div class="mt-1">';
if ($plugin->installed()) {
if (method_exists($plugin, 'form')) {
echo '<a class="mr-3" href="'.HTML_PATH_ADMIN_ROOT.'configure-plugin/'.$plugin->className().'">'.$L->g('Settings').'</a>';
}
echo '<a href="'.HTML_PATH_ADMIN_ROOT.'uninstall-plugin/'.$plugin->className().'">'.$L->g('Deactivate').'</a>';
} else {
echo '<a href="'.HTML_PATH_ADMIN_ROOT.'install-plugin/'.$plugin->className().'">'.$L->g('Activate').'</a>';
2015-06-12 06:00:04 +02:00
}
echo '</div>';
echo '</td>';
2018-05-14 00:00:10 +02:00
echo '<td class="align-middle d-none d-sm-table-cell">';
echo $plugin->description();
echo '</td>';
echo '<td class="text-center align-middle d-none d-lg-table-cell">';
echo '<span>'.$plugin->version().'</span>';
echo '</td>';
2017-04-26 20:16:34 +02:00
echo '<td class="text-center align-middle d-none d-lg-table-cell">
<a target="_blank" href="'.$plugin->website().'">'.$plugin->author().'</a>
</td>';
2015-10-19 00:45:58 +02:00
2015-11-30 01:45:30 +01:00
echo '</tr>';
}
2015-10-19 00:45:58 +02:00
echo '
</tbody>
2015-10-19 00:45:58 +02:00
</table>
2015-11-30 01:45:30 +01:00
';