<?php
use yii\helpers\Url;
?>
<div class="dropdown pull-right">
    <button class="btn btn-default dropdown-toggle" type="button" id="<?=$id?>Lang" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
        <?= Yii::t('app', 'Add language') ?>
        <span class="caret"></span>
    </button>
    <ul class="dropdown-menu f32" id="lang-<?=$id?>" aria-labelledby="<?=$id?>Menu">
        <?php foreach($langs as $index => $lang) {
            if(in_array($index, array_keys($data))) continue;
            ?>
            <li><a href="#<?=$id?>" data-lang="<?=$lang->language_id?>"><span class="flag <?=$lang->country_code?>"></span></a></li>
        <?php } ?>
    </ul>
</div>
<ul class="nav nav-tabs f32" id="<?=$id?>-tabs" role="tablist">
    <?php
    foreach($data as $index => $data_lang) {
        if(!$index) continue;
        ?>
        <li role="lang_inputs" data-lang="<?=$index?>"><a href="#<?=$id?>-<?=$index?>" aria-controls="<?=$id?>-<?=$index?>" role="tab" data-toggle="tab"><span class="flag <?=$langs[$index]->country_code?>"></span></a></li>
        <?php
    }
    ?>
</ul>
<div class="tab-content lang-tab-content" id="tab-content-<?=$id?>">

