bludit/kernel/admin/views/plugins.php

52 lines
1.4 KiB
PHP
Raw Normal View History

2015-06-11 04:27:04 +02:00
<?php
2015-10-19 00:45:58 +02:00
HTML::title(array('title'=>$L->g('Plugins'), 'icon'=>'puzzle-piece'));
echo '
2016-01-17 22:11:20 +01:00
<table class="uk-table">
2015-10-19 00:45:58 +02:00
<thead>
<tr>
<th class="uk-width-1-5">'.$L->g('Name').'</th>
<th class="uk-width-3-5">'.$L->g('Description').'</th>
<th class="uk-text-center">'.$L->g('Version').'</th>
<th class="uk-text-center">'.$L->g('Author').'</th>
</tr>
</thead>
<tbody>
';
2015-11-30 01:45:30 +01:00
foreach($plugins['all'] as $Plugin)
{
echo '
2016-01-17 22:11:20 +01:00
<tr '.($Plugin->installed()?'class="plugin-installed"':'class="plugin-notInstalled"').'>
2015-11-30 01:45:30 +01:00
<td>
<div class="plugin-name">'.$Plugin->name().'</div>
<div class="plugin-links">
';
2015-06-12 06:00:04 +02:00
2015-11-30 01:45:30 +01:00
if($Plugin->installed()) {
if(method_exists($Plugin, 'form')) {
2016-01-17 22:11:20 +01:00
echo '<a class="configure" href="'.HTML_PATH_ADMIN_ROOT.'configure-plugin/'.$Plugin->className().'">'.$L->g('Settings').'</a>';
2015-11-30 01:45:30 +01:00
echo '<span class="separator"> | </span>';
2015-06-12 06:00:04 +02:00
}
2015-11-30 01:45:30 +01:00
echo '<a class="uninstall" href="'.HTML_PATH_ADMIN_ROOT.'uninstall-plugin/'.$Plugin->className().'">'.$L->g('Deactivate').'</a>';
}
else {
echo '<a class="install" href="'.HTML_PATH_ADMIN_ROOT.'install-plugin/'.$Plugin->className().'">'.$L->g('Activate').'</a>';
}
2015-06-12 06:00:04 +02:00
2015-11-30 01:45:30 +01:00
echo '
</div>
</td>
<td>'.$Plugin->description().'</td>
<td class="uk-text-center">'.$Plugin->version().'</td>
<td class="uk-text-center"><a targe="_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>
</table>
2015-11-30 01:45:30 +01:00
';