summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2013-08-11 11:52:47 +0200
committerAndreas Gohr <andi@splitbrain.org>2013-08-11 11:52:47 +0200
commit7ca0915cf61dd8ff297bf1d3ebd6aafcab88a618 (patch)
treebdec1ec461676821ec8b6a8332c406a463f0d92b
parente445eeb3b675b350b4cebeeea610d4f7cd2e8f19 (diff)
downloadrpg-7ca0915cf61dd8ff297bf1d3ebd6aafcab88a618.tar.gz
rpg-7ca0915cf61dd8ff297bf1d3ebd6aafcab88a618.tar.bz2
fixed donation link
-rw-r--r--lib/plugins/extension/helper/list.php18
-rw-r--r--lib/plugins/extension/images/donate.pngbin1293 -> 724 bytes
-rw-r--r--lib/plugins/extension/lang/en/lang.php3
-rw-r--r--lib/plugins/extension/style.less7
4 files changed, 18 insertions, 10 deletions
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 = '<dl class="details">';
+ if ($extension->getDonationURL()) {
+ $return .= '<dt>'.$this->getLang('donate').'</dt>';
+ $return .= '<dd>';
+ $return .= '<a href="'.$extension->getDonationURL().'" class="donate">'.$this->getLang('donate_action').'</a>';
+ $return .= '</dd>';
+ }
+
+
if (!$extension->isBundled()) {
$return .= '<dt>'.$this->getLang('downloadurl').'</dt>';
$return .= '<dd>';
@@ -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 .= '</dd>';
}
if($extension->getDependencies()) {
@@ -415,9 +424,6 @@ class helper_plugin_extension_list extends DokuWiki_Plugin {
$return .= $this->make_linklist($extension->getConflicts());
$return .= '</dd>';
}
- if ($extension->getDonationURL()) {
- $return .= '<a href="'.hsc($extension->getDonationURL()).'" class="donate" title="'.$this->getLang('donate').'"></a>';
- }
$return .= '</dl>';
return $return;
}
@@ -431,9 +437,9 @@ class helper_plugin_extension_list extends DokuWiki_Plugin {
function make_linklist($ext) {
$return = '';
foreach ($ext as $link) {
- $return .= '<a href="'.$this->gui->tabURL('search', array('q'=>'ext:'.$link)).'">'.hsc($link).'</a> ';
+ $return .= '<a href="'.$this->gui->tabURL('search', array('q'=>'ext:'.$link)).'">'.hsc($link).'</a>, ';
}
- 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 .= ' <span class="version">'.$this->getLang('available_version').' ';
$return .= ($extension->getLastUpdate() ? hsc($extension->getLastUpdate()) : $this->getLang('unknown')).'</span>';
}
diff --git a/lib/plugins/extension/images/donate.png b/lib/plugins/extension/images/donate.png
index b26ceb66e..9e234da1c 100644
--- a/lib/plugins/extension/images/donate.png
+++ b/lib/plugins/extension/images/donate.png
Binary files 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;
}
}
}