Ejemplo n.º 1
0
<?php

use yii\helpers\Html;
use yii\widgets\DetailView;
use common\models\KefuAccountRepair;
use yii\helpers\ArrayHelper;
/* @var $this yii\web\View */
/* @var $model common\models\KefuAccountRepair */
$this->title = $model->sn;
$this->params['breadcrumbs'][] = ['label' => Yii::t('common', 'Kefu Account Repair'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="kefu-account-repair-view">

	<p>
		<?php 
echo Html::a(Yii::t('common', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>
		<?php 
echo Html::a(Yii::t('common', 'Delete'), ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => Yii::t('backend', 'Are you sure you want to delete this item?'), 'method' => 'post']]);
?>
	</p>

	<?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['sn', ['attribute' => 'account', 'value' => $model->user->username], ['attribute' => 'reason', 'value' => ArrayHelper::getValue(KefuAccountRepair::getReason(), $model->reason)], 'register_time:datetime', 'register_place', ['attribute' => 'recent_games', 'value' => $model->recentGames->name], 'question_desc:ntext', 'bind_email:email', ['attribute' => 'security_question_one', 'value' => $model->securityQuestionOne ? $model->securityQuestionOne->question : null], 'security_question_one_answer', ['attribute' => 'security_question_two', 'value' => $model->securityQuestionTwo ? $model->securityQuestionTwo->question : null], 'security_question_two_answer', 'applicant_name', 'applicant_phone', 'applicant_identity', 'applicant_email:email', ['attribute' => 'identity_front', 'format' => 'html', 'value' => Html::img(Yii::$app->glide->createSignedUrl(['glide/index', 'path' => $model->identity_front_path, 'w' => 200], true), ['class' => 'img-responsive'])], ['attribute' => 'identity_front', 'format' => 'html', 'value' => Html::img(Yii::$app->glide->createSignedUrl(['glide/index', 'path' => $model->identity_back_path, 'w' => 200], true), ['class' => 'img-responsive'])], 'created_at:datetime', 'updated_at:datetime', ['attribute' => 'progress', 'value' => ArrayHelper::getValue(KefuAccountRepair::getProgress(), $model->progress)], ['attribute' => 'status', 'value' => ArrayHelper::getValue(KefuAccountRepair::getStatus(), $model->status)]]]);
?>

</div>
Ejemplo n.º 2
0
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t('common', 'Kefu Account Repair');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="kefu-account-repair-index">

	<?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

	<?php 
if (Yii::$app->user->can('administrator')) {
    ?>
		<p>
			<?php 
    echo Html::a(Yii::t('backend', 'Create {modelClass}', ['modelClass' => Yii::t('common', 'Kefu Account Repair')]), ['create'], ['class' => 'btn btn-success']);
    ?>
		</p>
	<?php 
}
?>


	<?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'sn', ['attribute' => 'account', 'value' => function ($model) {
    return $model->user->username;
}], ['class' => \common\grid\EnumColumn::className(), 'attribute' => 'reason', 'enum' => KefuAccountRepair::getReason()], 'register_time:datetime', 'created_at:datetime', ['class' => \common\grid\EnumColumn::className(), 'attribute' => 'progress', 'enum' => KefuAccountRepair::getProgress()], ['class' => \common\grid\EnumColumn::className(), 'attribute' => 'status', 'enum' => KefuAccountRepair::getStatus()], ['class' => 'yii\\grid\\ActionColumn']]]);
?>

</div>