From 7ca0915cf61dd8ff297bf1d3ebd6aafcab88a618 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 11 Aug 2013 11:52:47 +0200 Subject: fixed donation link --- lib/plugins/extension/helper/list.php | 18 ++++++++++++------ lib/plugins/extension/images/donate.png | Bin 1293 -> 724 bytes lib/plugins/extension/lang/en/lang.php | 3 ++- lib/plugins/extension/style.less | 7 ++++--- 4 files changed, 18 insertions(+), 10 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index 7ecd5b267..ef589dedd 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -343,6 +343,14 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $default = $this->getLang('unknown'); $return = '
'; + if ($extension->getDonationURL()) { + $return .= '
'.$this->getLang('donate').'
'; + $return .= '
'; + $return .= ''; + $return .= '
'; + } + + if (!$extension->isBundled()) { $return .= '
'.$this->getLang('downloadurl').'
'; $return .= '
'; @@ -393,6 +401,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { foreach ($extension->getCompatibleVersions() as $date => $version) { $return .= $version['label'].' ('.$date.'), '; } + $return = rtrim($return, ', '); $return .= '
'; } if($extension->getDependencies()) { @@ -415,9 +424,6 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $return .= $this->make_linklist($extension->getConflicts()); $return .= ''; } - if ($extension->getDonationURL()) { - $return .= ''; - } $return .= '
'; return $return; } @@ -431,9 +437,9 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { function make_linklist($ext) { $return = ''; foreach ($ext as $link) { - $return .= ''.hsc($link).' '; + $return .= ''.hsc($link).', '; } - return $return; + return rtrim($return, ', '); } /** @@ -482,7 +488,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { } } - if (!$extension->isInstalled()) { + if (!$extension->isInstalled() && $extension->getDownloadURL()) { $return .= ' '.$this->getLang('available_version').' '; $return .= ($extension->getLastUpdate() ? hsc($extension->getLastUpdate()) : $this->getLang('unknown')).''; } diff --git a/lib/plugins/extension/images/donate.png b/lib/plugins/extension/images/donate.png index b26ceb66e..9e234da1c 100644 Binary files a/lib/plugins/extension/images/donate.png and b/lib/plugins/extension/images/donate.png differ diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index 53ce597dd..684ff2bad 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -48,7 +48,8 @@ $lang['compatible'] = 'Compatible with:'; $lang['depends'] = 'Depends on:'; $lang['similar'] = 'Similar to:'; $lang['conflicts'] = 'Conflicts with:'; -$lang['donate'] = 'Donate'; +$lang['donate'] = 'Like this?'; +$lang['donate_action'] = 'Buy the author a coffee!'; $lang['repo_retry'] = 'Retry'; $lang['msg_enabled'] = 'Plugin %s enabled'; diff --git a/lib/plugins/extension/style.less b/lib/plugins/extension/style.less index 762968611..0d86f5419 100644 --- a/lib/plugins/extension/style.less +++ b/lib/plugins/extension/style.less @@ -209,15 +209,16 @@ text-align: right; font-weight: normal; padding: 0.2em 5px 0 0; + font-weight: bold; } dd { margin-left: 25%; - font-weight: bold; padding: 0.2em 0 0 5px; - a { - font-weight: normal; + a.donate { + padding-left: 18px; + background: transparent url(images/donate.png) left center no-repeat; } } } -- cgit v1.2.3