Beispiel #1
0
<?php

use yii\helpers\Html;
use yii\helpers\ArrayHelper;
use yii\widgets\DetailView;
use common\models\GameGift;
/* @var $this yii\web\View */
/* @var $model common\models\GameGift */
$this->title = $model->lb_name;
$this->params['breadcrumbs'][] = ['label' => Yii::t('common', 'Game Gift'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="game-gift-view">

	<p>
		<?php 
echo Html::a(Yii::t('backend', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>
		<?php 
echo Html::a(Yii::t('backend', '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' => ['game_server_id', 'lb_gid', 'lb_name', 'lb_type', 'lb_method:ntext', 'lb_content:ntext', 'slug', 'created_at:datetime', 'updated_at:datetime', ['attribute' => 'status', 'value' => ArrayHelper::getValue(GameGift::getStatus(), $model->status)]]]);
?>

</div>
Beispiel #2
0
use yii\helpers\Html;
use yii\helpers\ArrayHelper;
use yii\grid\GridView;
use common\models\GameGift;
/* @var $this yii\web\View */
/* @var $searchModel backend\models\search\GameGiftSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t('common', 'Game Gift');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="game-gift-index">

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

	<p>
		<?php 
echo Html::a(Yii::t('backend', 'Create {modelClass}', ['modelClass' => Yii::t('common', 'Game Gift')]), ['create'], ['class' => 'btn btn-success']);
?>
	</p>

	<?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'game_server_id', 'value' => function ($model) {
    return $model->gameServer->server_name;
}, 'filter' => ArrayHelper::map(\common\models\GameServer::find()->all(), 'id', 'server_name')], 'lb_gid', 'lb_name', ['class' => \common\grid\EnumColumn::className(), 'attribute' => 'status', 'enum' => GameGift::getStatus()], ['class' => 'yii\\grid\\ActionColumn']], 'layout' => "{items}\n{summary}\n{pager}"]);
?>

</div>
Beispiel #3
0
echo $form->field($model, 'lb_name')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'lb_type')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'lb_method')->textarea(['rows' => 6]);
?>

    <?php 
echo $form->field($model, 'lb_content')->textarea(['rows' => 6]);
?>

	<?php 
echo $form->field($model, 'status')->dropDownList(GameGift::getStatus());
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('backend', 'Create') : Yii::t('backend', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>

</div>