user_language.php 2.28 KB
Newer Older
Marcello Pivanti's avatar
Marcello Pivanti committed
1
2
3
4
5
6
<?php

/**
 * Art-ER Attrattività, ricerca e territorio dell’Emilia-Romagna
 * OPEN 2.0
 *
waltermazza's avatar
waltermazza committed
7
 * @package    arter
Marcello Pivanti's avatar
Marcello Pivanti committed
8
9
10
11
 * @category   CategoryName
 * @author     Elite Division S.r.l.
 */

waltermazza's avatar
waltermazza committed
12
13
use arter\amos\core\helpers\Html;
use arter\amos\core\views\DataProviderView;
Marcello Pivanti's avatar
Marcello Pivanti committed
14
15
16
use yii\widgets\Pjax;
use yii\helpers\StringHelper;
use yii\helpers\Inflector;
waltermazza's avatar
waltermazza committed
17
18
19
20
21
use arter\amos\translation\AmosTranslation;
use arter\amos\translation\models\TranslationConf;
use arter\amos\core\icons\AmosIcons;
use arter\amos\core\forms\ActiveForm;
use arter\amos\core\forms\CloseSaveButtonWidget;
Marcello Pivanti's avatar
Marcello Pivanti committed
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

/**
 * @var yii\web\View $this
 * @var yii\data\ActiveDataProvider $dataProvider
 */
$this->title = AmosTranslation::t('amostranslation', 'Manage allowed translation of the user');
$this->params['breadcrumbs'][] = ['label' => AmosTranslation::t('amostranslation', 'Translate manager'), 'url' => ['/translation']];
$this->params['breadcrumbs'][] = ['label' => AmosTranslation::t('amostranslation', 'Manage translators'), 'url' => ['/translation/default/translators']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="professional-profiles-index"> 
    <?php //echo $this->render('_filter', ['model' => $model]); ?>

    <p>
        <?php /* echo         Html::a('Nuovo Professional Profiles'        , ['create'], ['class' => 'btn btn-amministration-primary']) */ ?>
    </p>

    <?php
    $form = ActiveForm::begin();
    ?>
    <div class="row">
        <div class="col-lg-6">
            <h2>User:</h2>
            <h3><?= $userProfile->one()->nome . ' ' . $userProfile->one()->cognome ?></h3>            
        </div>
        <div class="col-lg-6">
            <?php
            $lngs = TranslationConf::getStaticAllActiveLanguages()
                    ->orderBy('language_id');
            
            echo $form->field($model, 'language')
                    ->dropDownList(\yii\helpers\ArrayHelper::map(
                                    $lngs->all(), 'language_id', 'name'), ['prompt' => AmosTranslation::t('amostranslation', 'Select allowed languages ...'), 'multiple' => true, 'size' => ($lngs->count() > 3) ? $lngs->count() + 1 : 3]
                    )->label('Allowed languages');
            ?>
        </div>    
    </div>
    <?= CloseSaveButtonWidget::widget(['model' => $model]); ?>
    <?php
    ActiveForm::end();
    ?>
</div>