Jdlrobson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/177668
Change subject: Add support for donation button in beta
......................................................................
Add support for donation button in beta
Change-Id: I70291a39930025222869379bdd46836cc21561f5
---
M MobileFrontend.php
M i18n/en.json
M i18n/qqq.json
M includes/skins/MinervaTemplateBeta.php
4 files changed, 26 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/68/177668/1
diff --git a/MobileFrontend.php b/MobileFrontend.php
index 857678e..fe4e04be 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -559,6 +559,11 @@
$wgMFEnableBeta = false;
/**
+ * Optional tring to mobile friendly url for donation page.
+ */
+$wgMFDonationUrl = false;
+
+/**
* In which namespaces sections shoudn't be collapsed
*/
$wgMFNamespacesWithoutCollapsibleSections = array(
diff --git a/i18n/en.json b/i18n/en.json
index 97d8ef4..0bb0116 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -356,5 +356,6 @@
"apihelp-mobileview-example-3": "Get information about sections 1 and
later and sections containing references of [[Candlemass]]",
"apihelp-parse-param-mobileformat": "Return parse output in a format
suitable for mobile devices.",
"apihelp-parse-param-noimages": "Disable images in mobile output.",
- "apihelp-parse-param-mainpage": "Apply mobile main page
transformations."
+ "apihelp-parse-param-mainpage": "Apply mobile main page
transformations.",
+ "mobile-frontend-donate-button-label": "Donate"
}
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 159de11..73b042b 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -383,5 +383,6 @@
"apihelp-mobileview-example-3": "{{doc-apihelp-example|mobileview}}",
"apihelp-parse-param-mobileformat":
"{{doc-apihelp-param|parse|mobileformat}}",
"apihelp-parse-param-noimages": "{{doc-apihelp-param|parse|noimages}}",
- "apihelp-parse-param-mainpage": "{{doc-apihelp-param|parse|mainpage}}"
+ "apihelp-parse-param-mainpage": "{{doc-apihelp-param|parse|mainpage}}",
+ "mobile-frontend-donate-button-label": "Message for donation button in
mobile interface at bottom of page."
}
diff --git a/includes/skins/MinervaTemplateBeta.php
b/includes/skins/MinervaTemplateBeta.php
index cafa440..bffc5e9 100644
--- a/includes/skins/MinervaTemplateBeta.php
+++ b/includes/skins/MinervaTemplateBeta.php
@@ -22,4 +22,21 @@
parent::renderPageActions( $data );
}
}
+
+ /**
+ * Get page secondary actions
+ */
+ protected function getSecondaryActions() {
+ global $wgMFDonationUrl;
+ $result = parent::getSecondaryActions();
+
+ // If languages are available, add a languages link
+ if ( $wgMFDonationUrl ) {
+ $result['donation'] = array(
+ 'url' => $wgMFDonationUrl,
+ 'label' => wfMessage(
'mobile-frontend-donate-button-label' )->text()
+ );
+ }
+ return $result;
+ }
}
--
To view, visit https://gerrit.wikimedia.org/r/177668
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I70291a39930025222869379bdd46836cc21561f5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits