bludit/bl-kernel/admin/views/themes.php
ADTC e969cc95b2 Use icons for Activate/Deactive/Settings links
An unchecked checkbox icon is used for Activate (to show that it's
currently inactive). A checked checkbox icon is used for Deactivate (to
show that it's currently active). A gear icon is used for the Settings
link.

The checkbox icons are placed on the left side of the name, as checkboxes
usually appear. The gear icon is placed floated to the right side of the
name, to have a clean look.

The plugin list is more compact, and it's much easier to identify which
plugins are currently active, and which have settings. No need to read
any words!

The previously used words (with language dependency) is still used as the
tooltip (title) that is shown when the mouse hovers over the icons.

In the themes page, the checked checkbox icon denotes the curently active
theme, but doesn't do anything when clicked. This is by design, since only
one theme can be active at a time. For consistency sake, a circle (radio
button style) was not used.

Signed-off-by: ADTC <send2adtc@gmail.com>
2017-03-13 21:39:06 +08:00

56 lines
1.2 KiB
PHP

<?php
HTML::title(array('title'=>$L->g('Themes'), 'icon'=>'paint-brush'));
echo '
<table class="uk-table">
<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>
';
foreach($themes as $theme)
{
echo '
<tr '.($theme['dirname']==$Site->theme()?'class="theme-installed"':'class="theme-notInstalled"').'>
<td>
<div class="plugin-name">
';
if($theme['dirname']!=$Site->theme()) {
echo '<a class="install" href="'.HTML_PATH_ADMIN_ROOT.'install-theme/'.$theme['dirname'].'" title="'.$L->g('Activate').'"><i class="uk-icon-square-o"></i></a> ';
}
else {
echo '<i class="uk-icon-check-square-o"></i> ';
}
echo '
'.$theme['name'].'</div>
</td>';
echo '<td>';
echo $theme['description'];
if( !$theme['compatible'] ) {
echo '<div class="theme-incompatible">This theme is incompatible with Bludit v'.BLUDIT_VERSION.'</div>';
}
echo '</td>';
echo '
<td class="uk-text-center">'.$theme['version'].'</td>
<td class="uk-text-center"><a targe="_blank" href="'.$theme['website'].'">'.$theme['author'].'</a></td>
';
echo '</tr>';
}
echo '
</tbody>
</table>
';