Skip to content
Code-Schnipsel Gruppen Projekte
DropDown.html 2,54 KiB
Newer Older
Henning Leutz's avatar
Henning Leutz committed
{assign var=Site value=$this->getAttribute('Site')}
{assign var=siteLang value=$Project->getLang()}
Henning Leutz's avatar
Henning Leutz committed
{assign var=path value=$this->getAttribute('flagFolderPath')}
Henning Leutz's avatar
Henning Leutz committed

{if count($langs) > 1}
<div class="quiqqer-control-languageswitch-dropdown quiqqer-control-languageswitch-dropdown__withArrow">
    <div class="quiqqer-control-languageswitch-dropdown-button {if !$showDropdown}inactive{/if}">
        {if $buttonShowFlag}
            <span class="quiqqer-control-languageswitch-dropdown-icon">
                <img src="{$smarty.const.URL_BIN_DIR}16x16/flags/{$siteLang}.png" />
Henning Leutz's avatar
Henning Leutz committed
            </span>
        {/if}

        {if $buttonText && $buttonText === 'abbreviation'}
            <span class="quiqqer-control-languageswitch-dropdown-lang quiqqer-control-languageswitch-dropdown-lang__abbreviation">
Henning Leutz's avatar
Henning Leutz committed
                {$siteLang}
            </span>
        {elseif $buttonText && $buttonText === 'text'}
            <span class="quiqqer-control-languageswitch-dropdown-lang quiqqer-control-languageswitch-dropdown-lang__text">
                {locale group='quiqqer/quiqqer' var='language.'|cat:{$siteLang}}
            </span>
Henning Leutz's avatar
Henning Leutz committed
        {/if}

        {if $showDropdown && $showArrow}
            <div class="quiqqer-control-languageswitch-dropdown-arrow fa fa-angle-down"></div>
        {/if}
    </div>
Henning Leutz's avatar
Henning Leutz committed

    <div class="quiqqer-control-languageswitch-dropdown-dd {$dropdownPosition}" style="display: none;">
Henning Leutz's avatar
Henning Leutz committed
        {foreach from=$langs item=lang}
            {strip}
            {if $Site->existLang($lang)}
            <a class="quiqqer-control-languageswitch-dropdown-dd-entry {if $siteLang == $lang}inactive{/if}"
               href="{url id=$Site->getId( $lang ) lang=$lang}">
                {if $dropdownShowFlag}
                    <img class="quiqqer-control-languageswitch-dropdown-dd-icon" src="{$path}{$lang}.png"/>
                {/if}
Henning Leutz's avatar
Henning Leutz committed

                {if $dropdownText && $dropdownText === 'abbreviation'}
                    <span class="quiqqer-control-languageswitch-dropdown-dd-lang quiqqer-control-languageswitch-dropdown-dd-lang__abbreviation">
                        {$lang}
                    </span>
                {elseif $dropdownText && $dropdownText === 'text'}
                    <span class="quiqqer-control-languageswitch-dropdown-dd-lang quiqqer-control-languageswitch-dropdown-dd-lang__text">
                        {locale group='quiqqer/quiqqer' var='language.'|cat:{$lang}}
                    </span>
                {/if}
            </a>
Henning Leutz's avatar
Henning Leutz committed
            {/if}
Henning Leutz's avatar
Henning Leutz committed
        {/foreach}
    </div>
Henning Leutz's avatar
Henning Leutz committed
</div>
{/if}