Add menu entry "Regionen".
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Tue, 20 Nov 2018 21:39:41 +0000 (21:39 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Tue, 20 Nov 2018 21:39:41 +0000 (21:39 +0000)
git-svn-id: http://www.winterrodeln.org/svn/servermediawiki/mediawiki_extensions/wrreport/trunk@2785 7aebc617-e5e2-0310-91dc-80fb5f6d2477

extension.json
wrreport_body.php

index 5c00904b342a95ef7dbc917038013ed9edb0b39e..e48fc84712457ec00329e74cdf6fd92376730283 100644 (file)
@@ -33,7 +33,8 @@
        },
        "Hooks": {
                "LanguageGetSpecialPageAliases": "SpecialWrReport::LanguageGetSpecialPageAliasesHook",
-               "ParserFirstCallInit": "WrReport::ParserFirstCallInitHook"
+               "ParserFirstCallInit": "WrReport::ParserFirstCallInitHook",
+               "MobileMenu": "WrReport::MobileMenuHook"
        },
        "config": {
                "WrReportMode": "allow",
index d65cf2ae752f6cb9cad4d137e6bc686c5fa0f0e1..73cc8083b93c46818f33cc40d3f54fdb3d6968ae 100644 (file)
@@ -1111,6 +1111,13 @@ class WrReport {
        }
 
 
+       public static function MobileMenuHook($name, \MobileFrontend\MenuBuilder &$menu) {
+               if ($name === 'discovery') {
+                       $icon = MobileUI::iconClass('random', 'before');
+                       $title = Title::newFromText('Region', NS_CATEGORY);
+                       $menu->insert('region')->addComponent('Regionen', $title->getLocalURL(), $icon, array('id' => 'regionButton', 'data-event-name' => 'region'));
+               }
+       }
 
 }
 WrReport::initWrConditions();