diff options
Diffstat (limited to 'lib/plugins')
-rw-r--r-- | lib/plugins/extension/helper/list.php | 39 | ||||
-rw-r--r-- | lib/plugins/extension/lang/en/lang.php | 13 |
2 files changed, 43 insertions, 9 deletions
diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index 7a08655b7..ba3681ce4 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -252,14 +252,13 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { if ($extension->getBugtrackerURL()) { $return .= ' <a href="'.hsc($extension->getBugtrackerURL()).'" title="'.hsc($extension->getBugtrackerURL()).'" class ="interwiki iw_dokubug">'.$this->getLang('bugs_features').'</a> '; } - if($extension->getTags()){ + if ($extension->getTags()){ $first = true; - $return .= '<span class="tags">'; - $return .= '<span class="a11y">'.$this->getLang('tags').'</span> '; + $return .= '<span class="tags">'.$this->getLang('tags').' '; foreach ($extension->getTags() as $tag) { - if(!$first){ + if (!$first){ $return .= ', '; - }else{ + } else { $first = false; } $url = $this->gui->tabURL('search', array('q' => 'tag:'.$tag)); @@ -345,6 +344,9 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $default = $this->getLang('unknown'); $return = '<dl class="details">'; + $return .= '<dt>'.$this->getLang('status').'</dt>'; + $return .= '<dd>'.$this->make_status($extension).'</dd>'; + if ($extension->getDonationURL()) { $return .= '<dt>'.$this->getLang('donate').'</dt>'; $return .= '<dd>'; @@ -352,7 +354,6 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $return .= '</dd>'; } - if (!$extension->isBundled()) { $return .= '<dt>'.$this->getLang('downloadurl').'</dt>'; $return .= '<dd><bdi>'; @@ -513,7 +514,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { switch ($action) { case 'install': case 'reinstall': - $title = 'title="'.$extension->getDownloadURL().'"'; + $title = 'title="'.hsc($extension->getDownloadURL()).'"'; break; } @@ -522,4 +523,28 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { return '<input class="'.$classes.'" name="'.$name.'" type="submit" value="'.$this->getLang('btn_'.$action).'" '.$title.' />'; } + + /** + * Plugin/template status + * + * @param helper_plugin_extension_extension $extension The extension + * @return string The description of all relevant statusses + */ + function make_status(helper_plugin_extension_extension $extension) { + $return = ''; + if ($extension->isInstalled()) { + $return .= $this->getLang('status_installed').' '; + if ($extension->isProtected()) { + $return .= $this->getLang('status_protected').' '; + } else { + $return .= $extension->isEnabled() ? $this->getLang('status_enabled').' ' : $this->getLang('status_disabled').' '; + } + } else { + $return .= $this->getLang('status_not_installed').' '; + } + $return .= !$extension->canModify() ? $this->getLang('status_unmodifiable').' ' : ''; + $return .= $extension->isTemplate() ? $this->getLang('status_template') : $this->getLang('status_plugin'); + return $return; + } + } diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index 83ff19f00..06c83a708 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -55,6 +55,16 @@ $lang['conflicts'] = 'Conflicts with:'; $lang['donate'] = 'Like this?'; $lang['donate_action'] = 'Buy the author a coffee!'; $lang['repo_retry'] = 'Retry'; +$lang['provides'] = 'Provides:'; +$lang['status'] = 'Status:'; +$lang['status_installed'] = 'installed'; +$lang['status_not_installed'] = 'not installed'; +$lang['status_protected'] = 'protected'; +$lang['status_enabled'] = 'enabled'; +$lang['status_disabled'] = 'disabled'; +$lang['status_unmodifiable'] = 'unmodifiable'; +$lang['status_plugin'] = 'plugin'; +$lang['status_template'] = 'template'; $lang['msg_enabled'] = 'Plugin %s enabled'; $lang['msg_disabled'] = 'Plugin %s disabled'; @@ -65,7 +75,6 @@ $lang['msg_plugin_install_success'] = 'Plugin %s installed successfully'; $lang['msg_plugin_update_success'] = 'Plugin %s updated successfully'; $lang['msg_upload_failed'] = 'Uploading the file failed'; -$lang['provides'] = 'Provides:'; $lang['missing_dependency'] = '<strong>Missing or disabled dependency:</strong> %s'; $lang['security_issue'] = '<strong>Security Issue:</strong> %s'; $lang['security_warning'] = '<strong>Security Warning:</strong> %s'; @@ -84,4 +93,4 @@ $lang['noperms'] = 'Extension directory is not writable'; $lang['notplperms'] = 'Template directory is not writable'; $lang['nopluginperms'] = 'Plugin directory is not writable'; -$lang['git'] = 'This extension was installed via git, you may not want to update it here.';
\ No newline at end of file +$lang['git'] = 'This extension was installed via git, you may not want to update it here.'; |