Show incompatibility warning as an icon next to the version number

Signed-off-by: ADTC <send2adtc@gmail.com>
This commit is contained in:
ADTC 2017-03-14 12:21:25 +08:00
parent daf3da5bbc
commit 8fa754e449
3 changed files with 15 additions and 7 deletions

View File

@ -597,6 +597,10 @@ div.plugin-name i.settings-icon {
margin-left: 3px;
}
i.incompatible-warning {
color: #daa520;
}
div.plugin-links > a {
display: inline-block;
margin-top: 5px;

View File

@ -39,13 +39,15 @@ foreach($plugins['all'] as $Plugin)
echo '<td>';
echo $Plugin->description();
if( !$Plugin->isCompatible() ) {
echo '<div class="plugin-incompatible"><i class="uk-icon-exclamation-triangle"></i> This plugin is incompatible with Bludit v'.BLUDIT_VERSION.'</div>';
}
echo '</td>';
echo '
<td class="uk-text-center">';
if( !$Plugin->isCompatible() ) {
echo '<i class="uk-icon-exclamation-triangle incompatible-warning" title="This plugin is incompatible with Bludit v'.BLUDIT_VERSION.'"></i>';
}
echo $Plugin->version().'</td>';
echo '
<td class="uk-text-center">'.$Plugin->version().'</td>
<td class="uk-text-center"><a target="_blank" href="'.$Plugin->website().'">'.$Plugin->author().'</a></td>
';

View File

@ -36,14 +36,16 @@ foreach($themes as $theme)
echo '<td>';
echo $theme['description'];
echo '</td>';
echo '
<td class="uk-text-center">';
if( !$theme['compatible'] ) {
echo '<div class="theme-incompatible"><i class="uk-icon-exclamation-triangle"></i> This theme is incompatible with Bludit v'.BLUDIT_VERSION.'</div>';
echo '<i class="uk-icon-exclamation-triangle incompatible-warning" title="This theme is incompatible with Bludit v'.BLUDIT_VERSION.'"></i>';
}
echo '</td>';
echo $theme['version'].'</td>';
echo '
<td class="uk-text-center">'.$theme['version'].'</td>
<td class="uk-text-center"><a target="_blank" href="'.$theme['website'].'">'.$theme['author'].'</a></td>
';