Skip to content
Snippets Groups Projects
Commit a7ec3530 authored by Gerry Weißbach's avatar Gerry Weißbach
Browse files

Add display options to extension manger

Allows tho show/hide extensions that are: enabled, disabled, updatable
parent 803a90da
No related branches found
No related tags found
No related merge requests found
......@@ -38,6 +38,15 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin {
echo '<div class="panelHeader">';
echo $this->locale_xhtml('intro_plugins');
$options = new Doku_Form( "viewoptions" );
$options->addElement( form_makeOpenTag( "p" ) );
$options->addElement( $this->getLang('display_viewoptions') );
$options->addElement( form_makeCheckboxField( "enabled", 1, $this->getLang('display_enabled') ) );
$options->addElement( form_makeCheckboxField( "disabled", 1, $this->getLang('display_disabled') ) );
$options->addElement( form_makeCheckboxField( "updatable", 1, $this->getLang('display_updatable') ) );
$options->addElement( form_makeCloseTag( "p" ) );
$options->printForm();
echo '</div>';
$pluginlist = $plugin_controller->getList('', true);
......
......@@ -151,6 +151,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin {
if($extension->isInstalled()) {
$class.=' installed';
$class.= ($extension->isEnabled()) ? ' enabled':' disabled';
if($extension->updateAvailable()) $class .= ' updatable';
}
if(!$extension->canModify()) $class.= ' notselect';
if($extension->isProtected()) $class.= ' protected';
......
......@@ -101,4 +101,9 @@ $lang['install_url'] = 'Install from URL:';
$lang['install_upload'] = 'Upload Extension:';
$lang['repo_error'] = 'The plugin repository could not be contacted. Make sure your server is allowed to contact www.dokuwiki.org and check your proxy settings.';
$lang['nossl'] = 'Your PHP seems to miss SSL support. Downloading will not work for many DokuWiki extensions.';
\ No newline at end of file
$lang['nossl'] = 'Your PHP seems to miss SSL support. Downloading will not work for many DokuWiki extensions.';
$lang['display_viewoptions'] = 'View Options:';
$lang['display_enabled'] = 'enabled';
$lang['display_disabled'] = 'disabled';
$lang['display_updatable'] = 'updatable';
......@@ -110,4 +110,10 @@ jQuery(function(){
);
});
});
\ No newline at end of file
/**
* Enable all plugin types
*/
$extmgr.find( '#viewoptions :checkbox' ).change(function(){
jQuery('#extension__list').toggleClass( this.name );
}).click();
});
......@@ -281,6 +281,15 @@
* Enabled/Disabled overrides
*/
#extension__list {
.enabled, .disabled, .updatable {
display: none;
}
&.enabled .enabled, &.disabled .disabled, &.updatable .updatable {
display: block;
}
.enabled div.screenshot span {
background: transparent url(images/enabled.png) no-repeat 2px 2px;
}
......@@ -361,3 +370,7 @@
display: block;
width: 60%;
}
#viewoptions label {
margin-left: 1em;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment