예제 #1
0
파일: _form.php 프로젝트: noikiy/wowewe
	<!--
    <//?= $form->field($model, 'author_openid')->textInput() ?>

    <//?= $form->field($model, 'score')->textInput() ?>
    -->
	

    <?php 
echo "<img width=128 src=" . $model->user->headimgurl . ">";
echo '<h1>' . emoji_unified_to_html(emoji_softbank_to_unified($model->user->nickname)) . "</h1><br>";
echo '<h1>' . $model->score . "票</h1>";
?>

 	<br> <br>

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

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? '新建' : '修改', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

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

</div>
예제 #2
0
파일: index.php 프로젝트: noikiy/wowewe
echo Html::encode($this->title);
?>
</h1>
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

    <!--
    <p>
        <//?= Html::a('Create Mqingshi Score', ['create'], ['class' => 'btn btn-success']) ?>
    </p>
    -->
    <p>
        <?php 
echo Html::a('情诗审核', ['qingshi-author/index'], ['class' => 'btn btn-success']);
?>
    </p>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['attribute' => 'score_id', 'headerOptions' => array('style' => 'width:90px;')], ['label' => '微信昵称', 'format' => 'html', 'value' => function ($model, $key, $index, $column) {
    $user = $model->user;
    return empty($user) ? '' : "<img width=48 src=" . $model->user->headimgurl . ">&nbsp;&nbsp;" . emoji_unified_to_html(emoji_softbank_to_unified($user->nickname));
}, 'filter' => false, 'headerOptions' => array('style' => 'width:450px;')], 'create_time', 'score', ['attribute' => 'status', 'label' => '是否领奖', 'value' => function ($model, $key, $index, $column) {
    return MQingshiScore::getQingshiScoreStatusOption($model->status);
}, 'filter' => MQingshiScore::getQingshiScoreStatusOption(), 'headerOptions' => array('style' => 'width:80px;')], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{update}', 'buttons' => ['update' => function ($url, $model) {
    return Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url, ['title' => Yii::t('yii', 'Update'), 'data-pjax' => '0']);
}]]]]);
?>

</div>