jenkins-bot has submitted this change and it was merged.
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, 25 insertions(+), 2 deletions(-)
Approvals:
Bmansurov: Looks good to me, approved
jenkins-bot: Verified
diff --git a/MobileFrontend.php b/MobileFrontend.php
index 857678e..dcfed76 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -559,6 +559,11 @@
$wgMFEnableBeta = false;
/**
+ * Optional string 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..d0988df 100644
--- a/includes/skins/MinervaTemplateBeta.php
+++ b/includes/skins/MinervaTemplateBeta.php
@@ -22,4 +22,20 @@
parent::renderPageActions( $data );
}
}
+
+ /**
+ * Get page secondary actions
+ */
+ protected function getSecondaryActions() {
+ global $wgMFDonationUrl;
+ $result = parent::getSecondaryActions();
+
+ 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: merged
Gerrit-Change-Id: I70291a39930025222869379bdd46836cc21561f5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: Awjrichards <[email protected]>
Gerrit-Reviewer: Bmansurov <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits