records.php 3.75 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
use arter\amos\translation\AmosTranslation;
use arter\amos\translation\models\TranslationConf;
Marcello Pivanti's avatar
Marcello Pivanti committed
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42

/**
 * @var yii\web\View $this
 * @var yii\data\ActiveDataProvider $dataProvider
 * @var backend\modules\registry\models\search\ProfessionalProfilesSearch $model
 */
$url = filter_input(INPUT_GET, 'url');
$namespace = filter_input(INPUT_GET, 'namespace');
if (!$url) {    
    $url = '/translation/default/contents';
}
$this->title = "$classname: " . AmosTranslation::t('amostranslation', 'translate into') . " $lang";
$this->params['breadcrumbs'][] = ['label' => AmosTranslation::t('amostranslation', 'Translate manager'), 'url' => ['/translation']];
$this->params['breadcrumbs'][] = ['label' => AmosTranslation::t('amostranslation', 'Translate contents'), 'url' => [$url]];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="professional-profiles-index">
    <?php  echo $this->render('search_records', ['model' => $modelSearch,'namespace' => $namespace]);  ?>

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

    <?php
waltermazza's avatar
waltermazza committed
43
    echo arter\amos\core\views\AmosGridView::widget([
Marcello Pivanti's avatar
Marcello Pivanti committed
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
        'dataProvider' => $dataProvider,
        'columns' => $columns
//            [
//                'attribute' => 'plugin',
//                'label' => AmosTranslation::t('amostranslation', 'Plugin'),
//                'value' => function ($model){
//                    return ucfirst($model['plugin']);
//                },
//              'group' => true,
//            ],
//            [
//                'attribute' => 'id_translate', 
//                'label' => AmosTranslation::t('amostranslation', 'Models'),
//                'value' => function ($model) {
//                    return Inflector::camel2words(StringHelper::basename($model['namespace']));
//                }
//            ],         
//            [
//                'attribute' => 'language_id',
//                'label' => AmosTranslation::t('amostranslation', 'Language'),      
//                'value' => function($model){                  
//                    return strtoupper($model['language']) . ' - ' . $model['name'];
//                }
//            ],
//                    [
//            'attribute' => 'progress_bar',
//            'label' => AmosTranslation::t('amostranslation', 'Translation progress'),
//            'format' => 'raw',
//            'value' => function($model) {
//                $conf = new TranslationConf();
//                $bars = $conf->getProgress($model['namespace'], $model['language_id']);
//                return \yii\bootstrap\Progress::widget($bars);
//            }
//        ],
//               [
waltermazza's avatar
waltermazza committed
79
//            'class' => \arter\amos\core\views\grid\ActionColumn::className(),
Marcello Pivanti's avatar
Marcello Pivanti committed
80
81
82
83
//            'template' => '{custom}',
//            'buttons' => [
//                'custom' => function ($url, $model) {
//                    $urlDestinazione = \Yii::$app->urlManager->createUrl(['/site/translation-view', 'id' => $model['namespace'] , 'language' => $model['language_id'] ]);
waltermazza's avatar
waltermazza committed
84
//                    return \yii\helpers\Html::a(\arter\amos\core\icons\AmosIcons::show('square-right', ['class' => 'btn btn-tool-secondary']), $urlDestinazione, [
Marcello Pivanti's avatar
Marcello Pivanti committed
85
86
87
88
89
90
91
92
93
94
95
96
//                        'title' => Yii::t('app', 'Detail'),
//                        'model' => $model
//                    ]);
//                },
//
//            ]
//        ]
//        ],
    ]);
    ?>

</div>