Changed position of language chooser in desktop mode
authorAlexander Ebert <ebert@woltlab.com>
Fri, 26 Feb 2016 17:02:56 +0000 (18:02 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 26 Feb 2016 17:02:56 +0000 (18:02 +0100)
com.woltlab.wcf/templates/pageHeaderUser.tpl

index 13e45b60f829e75140b5c31b286655664d5df45e..b5d678b561459b5b0bd2c0c3a0ae9a2439efdaa0 100644 (file)
                                </li>
                        {/if}
                {else}
+                       {if $__wcf->getLanguage()->getLanguages()|count > 1}
+                               <li id="pageLanguageContainer">
+                                       <script data-relocate="true">
+                                               require(['EventHandler', 'WoltLab/WCF/Language/Chooser'], function(EventHandler, LanguageChooser) {
+                                                       var languages = {
+                                                               {implode from=$__wcf->getLanguage()->getLanguages() item=__language}
+                                                                       '{@$__language->languageID}': {
+                                                                               iconPath: '{@$__language->getIconPath()|encodeJS}',
+                                                                               languageName: '{$__language}'
+                                                                       }
+                                                               {/implode}
+                                                       };
+                                                       
+                                                       var callback = function(listItem) {
+                                                               var location = window.location.toString().replace(/#.*/, '').replace(/(\?|&)l=[0-9]+/g, '');
+                                                               var delimiter = (location.indexOf('?') == -1) ? '?' : '&';
+                                                               
+                                                               window.location = location + delimiter + 'l=' + elData(listItem, 'language-id') + window.location.hash;
+                                                       };
+                                                       
+                                                       LanguageChooser.init('pageLanguageContainer', 'languageID', {@$__wcf->getLanguage()->languageID}, languages, callback);
+                                                       EventHandler.add('com.woltlab.wcf.UserMenuMobile', 'more', function(data) {
+                                                               if (data.identifier === 'com.woltlab.wcf.language') {
+                                                                       callback(data.parent);
+                                                               }
+                                                       });
+                                               });
+                                       </script>
+                               </li>
+                       {/if}
                        {if !$__disableLoginLink|isset}
                                <!-- login box -->
                                <li id="userLogin">
                                        </script>
                                </li>
                        {/if}
-                       {if $__wcf->getLanguage()->getLanguages()|count > 1}
-                               <li id="pageLanguageContainer">
-                                       <script data-relocate="true">
-                                               require(['EventHandler', 'WoltLab/WCF/Language/Chooser'], function(EventHandler, LanguageChooser) {
-                                                       var languages = {
-                                                               {implode from=$__wcf->getLanguage()->getLanguages() item=__language}
-                                                                       '{@$__language->languageID}': {
-                                                                               iconPath: '{@$__language->getIconPath()|encodeJS}',
-                                                                               languageName: '{$__language}'
-                                                                       }
-                                                               {/implode}
-                                                       };
-                                                       
-                                                       var callback = function(listItem) {
-                                                               var location = window.location.toString().replace(/#.*/, '').replace(/(\?|&)l=[0-9]+/g, '');
-                                                               var delimiter = (location.indexOf('?') == -1) ? '?' : '&';
-                                                               
-                                                               window.location = location + delimiter + 'l=' + elData(listItem, 'language-id') + window.location.hash;
-                                                       };
-                                                       
-                                                       LanguageChooser.init('pageLanguageContainer', 'languageID', {@$__wcf->getLanguage()->languageID}, languages, callback);
-                                                       EventHandler.add('com.woltlab.wcf.UserMenuMobile', 'more', function(data) {
-                                                               if (data.identifier === 'com.woltlab.wcf.language') {
-                                                                       callback(data.parent);
-                                                               }
-                                                       });
-                                               });
-                                       </script>
-                               </li>
-                       {/if}
                {/if}
                
                {if !$__hideUserMenu|isset}