Your IP : 216.73.216.79


Current Path : /var/www/html/intranetdbklv2/backend/
Upload File :
Current File : /var/www/html/intranetdbklv2/backend/view.php

<?php

use yii\helpers\Html;
use yii\widgets\DetailView;

/* @var $this yii\web\View */
/* @var $model backend\modules\contentRequest\models\ContentRequest */

$this->title = Yii::t('app', 'View Details Request');
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Article Application'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
$this->registerCss('.detail-view th{width:20%;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' => [
                    'request_title',
                    'request_content',
                    'request_url',
                    [
                        'attribute' => 'request_department',
                        'value' => \backend\modules\refdynawebv2\models\Ref::getDesc('CONTENT_SOURCE', $model->request_department, 'descr_en'),
                    ],
                    [
                        'attribute' => 'request_category',
                        'value' => \backend\modules\refdynawebv2\models\Ref::getDesc('REQUESTCAT', $model->request_category),
                    ],
                    'request_start_date',
                    'request_end_date',
                    [
                        'attribute' => 'request_files',
                        'format' => 'raw',
                        'value' => function ($model) {
                            $links = '';
                            if (!empty($model->request_files)) {
                                $files = json_decode($model->request_files);
                                if(is_array($files)) {
                                    $i = 1;
                                    foreach($files as $file) {
                                       $links .= Html::a('Pautan Fail ' . $i, ['../../../' . $file], ['target' => '_blank']) . '<br>';
                                       $i++;
                                    }
                                }
                            } else {
                                $links = Html::a('Klik di sini untuk lihat fail dimuat naik', ['../../../' . $model->request_files], ['target' => '_blank']);  
                            }
                            return $links;
                        }
                    ],
                    [
                        'attribute' => 'request_status',
                        'value' => \backend\modules\refdynawebv2\models\Ref::getDesc('REQUESTSTATUS', $model->request_status, 'descr_en'),
                    ],
                    'created_at',
                    [
                        'attribute' => 'created_by',
                        'value' => \backend\modules\fruserdynav2\models\FrontendUser::getname($model->created_by),
                    ],
                ],
            ]);

            if (!empty($model->request_rate)) {
                echo '<h3>Rate by applicant</h3>';
                echo DetailView::widget([
                'model' => $model,
                'attributes' => [
                    [
                        'attribute' => 'request_rate',
                        'value' => \backend\modules\refdynawebv2\models\Ref::getDesc('RATE', $model->request_rate, 'descr_en'),
                    ],
                    'request_rate_comment',
                ],
            ]);
            }
            ?>
        </div>
    </div>
</div>