| Current Path : /var/www/html/brspace/backend/modules/contentApplication/views/content-application/ |
| Current File : /var/www/html/brspace/backend/modules/contentApplication/views/content-application/view.php |
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
use backend\modules\contentTag\models\ContentTagTranslation;
/* @var $this yii\web\View */
/* @var $model backend\modules\contentTag\models\ContentTag */
$this->title = Yii::t('app', 'View Details Application');
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Applications'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
$this->registerCss('.detail-view th{width:10%;text-align:right;white-space: nowrap;}');
\yii\web\YiiAsset::register($this);
?>
<div class="wrapper wrapper-content animated fadeInRight">
<?= Html::a(Yii::t('app', 'Back to list'), ['index'], ['class' => 'btn btn-primary']) ?><br><br>
<div class="ibox float-e-margins">
<div class="ibox-content">
<?php
echo DetailView::widget([
'model' => $model,
'attributes' => [
[
'attribute' => 'application_cat',
'value' => \backend\modules\refdynawebv2\models\Ref::getDesc('APP_CAT', $model->application_cat, 'descr_en'),
],
[
'attribute' => 'application_status',
'value' => \backend\modules\refdynawebv2\models\Ref::getDesc('CONTENT_STATUS', $model->application_status),
],
'application_url',
'application_sort',
[
'attribute' => 'application_img',
'format' => 'raw',
'value' => function ($model) {
$output = '';
if (!empty($model->application_img))
$output = '<img src="' . Yii::getAlias('@web') . '/' . $model->application_img . '" height="100">';
return $output;
}
],
'created_at',
[
'attribute' => 'created_by',
'value' => \backend\modules\mimin\models\User::getname($model->created_by),
],
'updated_at',
[
'attribute' => 'updated_by',
'value' => \backend\modules\mimin\models\User::getname($model->updated_by),
],
],
]);
$modelTranslation = \backend\modules\contentApplication\models\ContentApplicationTranslation::find()
->where(['=', 'application_translation_parent_id', $model->application_id])
->orderBy(['application_translation_id' => SORT_ASC])
->all();
if (!empty($modelTranslation)) {
foreach ($modelTranslation as $rowTranslation) {
echo '<table class="table table-striped table-bordered detail-view">
<tbody>
<tr>
<th>Language</th>
<td>' . \backend\modules\refdynawebv2\models\Ref::getDesc('CONTENT_LANGUAGE', $rowTranslation->application_translation_language) . '</td>
</tr>
<tr>
<th>Application Name</th>
<td>' . $rowTranslation->application_translation_title . '</td>
</tr>
</tbody>
</table>';
}
}
?>
</div>
</div>
</div>