From 47559c79fedce97add92eb193fb379b8795fc612 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 5 Jan 2014 20:22:40 +0000 Subject: fixed and improved some HTML in extension manager --- lib/plugins/extension/helper/list.php | 47 +++++++++++++++++----------------- lib/plugins/extension/lang/en/lang.php | 3 ++- lib/plugins/extension/style.less | 10 +++----- 3 files changed, 29 insertions(+), 31 deletions(-) (limited to 'lib/plugins/extension') diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index 901a4e8fa..f387a6de6 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -56,7 +56,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * @param int $level The level of the header */ function add_header($id, $header, $level = 2) { - $this->form .=''.hsc($header).''; + $this->form .=''.hsc($header).''.DOKU_LF; } /** @@ -65,7 +65,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * @param string $data The content */ function add_p($data) { - $this->form .= '

'.hsc($data).'

'; + $this->form .= '

'.hsc($data).'

'.DOKU_LF; } /** @@ -77,7 +77,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { foreach ($array as $key => $value) { $this->form .= ''; } - $this->form .= ''; + $this->form .= ''.DOKU_LF; } /** @@ -85,7 +85,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { */ function end_form() { $this->form .= ''; - $this->form .= ''; + $this->form .= ''.DOKU_LF; } /** @@ -110,7 +110,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * @param string $html The content */ private function populate_column($class, $html) { - $this->form .= '
'.$html.'
'; + $this->form .= '
'.$html.'
'.DOKU_LF; } /** @@ -164,13 +164,13 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $mailid = $extension->getEmailID(); if($mailid){ $url = $this->gui->tabURL('search', array('q' => 'authorid:'.$mailid)); - return ' '.hsc($extension->getAuthor()).''; + return ' '.hsc($extension->getAuthor()).''; }else{ return ''.hsc($extension->getAuthor()).''; } } - return "".$this->getLang('unknown_author').""; + return "".$this->getLang('unknown_author')."".DOKU_LF; } /** @@ -181,16 +181,17 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { */ function make_screenshot(helper_plugin_extension_extension $extension) { if($extension->getScreenshotURL()) { - $img = ''. - ''.hsc($extension->getDisplayName()).''. + $title = sprintf($this->getLang('screenshot'), hsc($extension->getDisplayName())); + $img = ''. + ''.$title.''. ''; } elseif($extension->isTemplate()) { - $img = 'template'; + $img = ''; } else { - $img = 'plugin'; + $img = ''; } - return '
'.$img.'
'; + return '
'.$img.'
'.DOKU_LF; } /** @@ -204,21 +205,21 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $return = '
'; $return .= '

'; $return .= sprintf($this->getLang('extensionby'), hsc($extension->getDisplayName()), $this->make_author($extension)); - $return .= '

'; + $return .= ''.DOKU_LF; $return .= $this->make_screenshot($extension); $popularity = $extension->getPopularity(); if ($popularity !== false && !$extension->isBundled()) { - $popularityText = sprintf($this->getLang('popularity'), $popularity); - $return .= '
'; + $popularityText = sprintf($this->getLang('popularity'), round($popularity*100, 2)); + $return .= '
'.$popularityText.'
'.DOKU_LF; } $return .= '

'; if($extension->getDescription()) { $return .= hsc($extension->getDescription()).' '; } - $return .= '

'; + $return .= '

'.DOKU_LF; $return .= $this->make_linkbar($extension); @@ -229,13 +230,13 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $url = $this->gui->tabURL('', array('info' => $extension->getID())); $class = ''; } - $return .= ''.$this->getLang('btn_info').''; + $return .= ' '.$this->getLang('btn_info').''; if ($showinfo) { $return .= $this->make_info($extension); } $return .= $this->make_noticearea($extension); - $return .= '
'; + $return .= ''.DOKU_LF; return $return; } @@ -246,7 +247,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * @return string The HTML code */ function make_linkbar(helper_plugin_extension_extension $extension) { - $return = ''; + $return = ''.DOKU_LF; return $return; } @@ -308,7 +309,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { sprintf($this->getLang('url_change'), hsc($extension->getDownloadURL()), hsc($extension->getLastDownloadURL())). ''; } - return $return; + return $return.DOKU_LF; } /** @@ -424,7 +425,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $return .= $this->make_linklist($extension->getConflicts()); $return .= ''; } - $return .= ''; + $return .= ''.DOKU_LF; return $return; } @@ -495,7 +496,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $return .= ($extension->getLastUpdate() ? hsc($extension->getLastUpdate()) : $this->getLang('unknown')).''; } - return $return.' '.$errors; + return $return.' '.$errors.DOKU_LF; } /** diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index c1e73d023..fd00b5007 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -35,7 +35,8 @@ $lang['search_for'] = 'Search Extension:'; $lang['search'] = 'Search'; $lang['extensionby'] = '%s by %s'; -$lang['popularity'] = 'Popularity: %s'; +$lang['screenshot'] = 'Screenshot of %s'; +$lang['popularity'] = 'Popularity: %s%%'; $lang['homepage_link'] = 'Docs'; $lang['bugs_features'] = 'Bugs'; $lang['author_hint'] = 'Search extensions by this author'; diff --git a/lib/plugins/extension/style.less b/lib/plugins/extension/style.less index 0d86f5419..a60aac8bf 100644 --- a/lib/plugins/extension/style.less +++ b/lib/plugins/extension/style.less @@ -161,15 +161,11 @@ div { background-color: @ini_border; height: 100%; - - span { - display: none;// @todo: hide accessibly - } } } // Docs, Bugs, Tags - span.linkbar { + div.linkbar { font-size: 85%; span.tags { @@ -180,7 +176,7 @@ // more info button a.info { - background: transparent url(images/up.png) no-repeat 0 0; + background: transparent url(images/down.png) no-repeat 0 0; border-width: 0; height: 13px; width: 13px; @@ -190,7 +186,7 @@ overflow: hidden; &.close { - background: transparent url(images/down.png) no-repeat 0 0; + background: transparent url(images/up.png) no-repeat 0 0; } } -- cgit v1.2.3