<form method="post" action="{link controller='Settings'}{/link}">
<div class="container containerPadding marginTop">
{if $category == 'general'}
- <fieldset>
- <legend>{lang}wcf.user.language{/lang}</legend>
-
- <dl>
- <dt><label>{lang}wcf.user.language{/lang}</label></dt>
- <dd id="languageIDContainer">
- <script type="text/javascript">
- //<![CDATA[
- $(function() {
- var $languages = {
- {implode from=$availableLanguages item=language}
- '{@$language->languageID}': {
- iconPath: '{@$language->getIconPath()}',
- languageName: '{$language}'
- }
- {/implode}
- };
-
- new WCF.Language.Chooser('languageIDContainer', 'languageID', {@$languageID}, $languages);
- });
- //]]>
- </script>
- <noscript>
- <select name="languageID" id="languageID">
- {foreach from=$availableLanguages item=language}
- <option value="{@$language->languageID}"{if $language->languageID == $languageID} selected="selected"{/if}>{$language}</option>
- {/foreach}
- </select>
- </noscript>
- </dd>
- </dl>
-
- {hascontent}
+ {if $availableLanguages|count > 1}
+ <fieldset>
+ <legend>{lang}wcf.user.language{/lang}</legend>
+
<dl>
- <dt><label>{lang}wcf.user.visibleLanguages{/lang}</label></dt>
- <dd class="floated">
- {content}
- {foreach from=$availableContentLanguages item=language}
- <label><input name="contentLanguageIDs[]" type="checkbox" value="{@$language->languageID}"{if $language->languageID|in_array:$contentLanguageIDs} checked="checked"{/if} /> {$language}</label>
- {/foreach}
- {/content}
- <small>{lang}wcf.user.visibleLanguages.description{/lang}</small></dd>
+ <dt><label>{lang}wcf.user.language{/lang}</label></dt>
+ <dd id="languageIDContainer">
+ <script type="text/javascript">
+ //<![CDATA[
+ $(function() {
+ var $languages = {
+ {implode from=$availableLanguages item=language}
+ '{@$language->languageID}': {
+ iconPath: '{@$language->getIconPath()}',
+ languageName: '{$language}'
+ }
+ {/implode}
+ };
+
+ new WCF.Language.Chooser('languageIDContainer', 'languageID', {@$languageID}, $languages);
+ });
+ //]]>
+ </script>
+ <noscript>
+ <select name="languageID" id="languageID">
+ {foreach from=$availableLanguages item=language}
+ <option value="{@$language->languageID}"{if $language->languageID == $languageID} selected="selected"{/if}>{$language}</option>
+ {/foreach}
+ </select>
+ </noscript>
+ </dd>
</dl>
- {/hascontent}
-
- {event name='languageFields'}
- </fieldset>
+
+ {hascontent}
+ <dl>
+ <dt><label>{lang}wcf.user.visibleLanguages{/lang}</label></dt>
+ <dd class="floated">
+ {content}
+ {foreach from=$availableContentLanguages item=language}
+ <label><input name="contentLanguageIDs[]" type="checkbox" value="{@$language->languageID}"{if $language->languageID|in_array:$contentLanguageIDs} checked="checked"{/if} /> {$language}</label>
+ {/foreach}
+ {/content}
+ <small>{lang}wcf.user.visibleLanguages.description{/lang}</small></dd>
+ </dl>
+ {/hascontent}
+
+ {event name='languageFields'}
+ </fieldset>
+ {/if}
- <fieldset>
- <legend>{lang}wcf.user.style{/lang}</legend>
-
- <dl>
- <dt><label for="styleID">{lang}wcf.user.style{/lang}</label></dt>
- <dd>
- <select id="styleID" name="styleID">
- <option value="0"></option>
- {foreach from=$availableStyles item=style}
- <option value="{@$style->styleID}"{if $style->styleID == $styleID} selected="selected"{/if}>{$style->styleName}</option>
- {/foreach}
- </select>
- <small>{lang}wcf.user.style.description{/lang}</small>
- </dd>
- </dl>
-
- {event name='styleFields'}
- </fieldset>
+ {if $availableStyles|count > 1}
+ <fieldset>
+ <legend>{lang}wcf.user.style{/lang}</legend>
+
+ <dl>
+ <dt><label for="styleID">{lang}wcf.user.style{/lang}</label></dt>
+ <dd>
+ <select id="styleID" name="styleID">
+ <option value="0"></option>
+ {foreach from=$availableStyles item=style}
+ <option value="{@$style->styleID}"{if $style->styleID == $styleID} selected="selected"{/if}>{$style->styleName}</option>
+ {/foreach}
+ </select>
+ <small>{lang}wcf.user.style.description{/lang}</small>
+ </dd>
+ </dl>
+
+ {event name='styleFields'}
+ </fieldset>
+ {/if}
{/if}
{foreach from=$optionTree[0][categories][0][categories] item=optionCategory}
</script>
</li>
{/if}
- <!-- language switcher -->
- <li id="pageLanguageContainer">
- <script type="text/javascript">
- //<![CDATA[
- $(function() {
- var $languages = {
- {implode from=$__wcf->getLanguage()->getLanguages() item=language}
- '{@$language->languageID}': {
- iconPath: '{@$language->getIconPath()}',
- languageName: '{$language}'
- }
- {/implode}
- };
-
- new WCF.Language.Chooser('pageLanguageContainer', 'languageID', {@$__wcf->getLanguage()->languageID}, $languages, function(item) {
- var $location = window.location.toString().replace(/#.*/, '').replace(/(\?|&)l=[0-9]+/g, '');
- var $delimiter = ($location.indexOf('?') == -1) ? '?' : '&';
+ {if $__wcf->getLanguage()->getLanguages()|count > 1}
+ <li id="pageLanguageContainer">
+ <script type="text/javascript">
+ //<![CDATA[
+ $(function() {
+ var $languages = {
+ {implode from=$__wcf->getLanguage()->getLanguages() item=language}
+ '{@$language->languageID}': {
+ iconPath: '{@$language->getIconPath()}',
+ languageName: '{$language}'
+ }
+ {/implode}
+ };
- window.location = $location + $delimiter + 'l=' + item.data('languageID') + window.location.hash;
+ new WCF.Language.Chooser('pageLanguageContainer', 'languageID', {@$__wcf->getLanguage()->languageID}, $languages, function(item) {
+ var $location = window.location.toString().replace(/#.*/, '').replace(/(\?|&)l=[0-9]+/g, '');
+ var $delimiter = ($location.indexOf('?') == -1) ? '?' : '&';
+
+ window.location = $location + $delimiter + 'l=' + item.data('languageID') + window.location.hash;
+ });
});
- });
- //]]>
- </script>
- </li>
+ //]]>
+ </script>
+ </li>
+ {/if}
{/if}
{if !$__hideUserMenu|isset}