Exemplo n.º 1
0
echo Html::encode($this->title);
?>
</h1>
    <?php 
echo $this->render('_search', ['model' => $searchModel]);
?>
    <?php 
$form = ActiveForm::begin(['action' => \yii\helpers\Url::to('/Admin/activity-users/update-status')]);
?>


    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\CheckboxColumn', 'header' => Html::checkBox('selection_all', false, ['class' => 'select-on-check-all'])], ['attribute' => 'activity_id', 'value' => function ($searchModel) {
    return app\models\Activity::getOneActivityNameById($searchModel->activity_id);
}], ['attribute' => 'user_id', 'format' => 'html', 'value' => function ($searchModel) {
    return '<a href="/Admin/users/index?UsersSearch[id]=' . $searchModel->user_id . '">' . app\models\Users::getOneUserNameById($searchModel->user_id) . '</a>';
}], ['attribute' => 'status', 'value' => function ($searchModel) {
    return app\models\ActivityUsers::$statusList[$searchModel->status];
}], 'practice_score', 'theory_score', 'rule_score', 'score_appraise', ['attribute' => 'attendance_appraise', 'format' => 'html', 'value' => function ($searchModel) {
    return '<a href="/Admin/attendance/index?AttendanceSearch[user_id]=' . $searchModel->user_id . '&AttendanceSearch[activity_id]=' . $searchModel->activity_id . '" target="_blank" style="width:300px">' . $searchModel->attendance_appraise . '</a>';
}], ['class' => 'yii\\grid\\ActionColumn']]]);
?>
    <select name="status">
        <?php 
foreach ($statusList as $key => $val) {
    ?>
            <option value="<?php 
    echo $key;
    ?>
"><?php 
    echo $val;
Exemplo n.º 2
0
use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel app\models\UsersSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = '暂停学员';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="users-index">

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

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'username', ['attribute' => 'email_auth', 'value' => function ($searchModel) {
    return $searchModel->email_auth ? '是' : '否';
}], ['attribute' => 'phone_auth', 'value' => function ($searchModel) {
    return $searchModel->phone_auth ? '是' : '否';
}], ['attribute' => 'status', 'value' => function ($searchModel) {
    return app\models\Users::getStatusName($searchModel->status);
}], 'create_time', 'update_time', 'update_user', ['class' => 'yii\\grid\\ActionColumn']]]);
?>

</div>
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = '完成度管理';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="train-users-index">

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

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'activity_id', 'value' => function ($searchModel) {
    return app\models\Activity::getOneActivityNameById($searchModel->activity_id);
}], ['attribute' => 'user_id', 'value' => function ($searchModel) {
    return app\models\Users::getOneUserNameById($searchModel->user_id);
}], ['label' => '完成', 'value' => function ($searchModel) {
    return app\models\ActivityProcess::getCount($searchModel->activity_id, $searchModel->user_id, app\models\ActivityProcess::FINISH);
}], ['label' => '未完成', 'value' => function ($searchModel) {
    return app\models\ActivityProcess::getCount($searchModel->activity_id, $searchModel->user_id, app\models\ActivityProcess::NO_FINISH);
}], ['label' => '操作', 'format' => 'html', 'value' => function ($searchModel) {
    $url = Html::a('更新完成度信息', ['Admin/activity-process/', 'ActivityProcessSearch[user_id]' => $searchModel->user_id, 'ActivityProcessSearch[activity_id]' => $searchModel->activity_id]);
    return $url;
}]]]);
?>

</div>
Exemplo n.º 4
0
    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <p>
        <?php 
echo Html::a('更新用户', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::a('删除用户', ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => '确认删除吗?', 'method' => 'post']]);
?>
    </p>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'username', ['attribute' => 'level_id', 'value' => app\models\Level::getOneLevelNameById($model->level_id)], ['attribute' => 'email_auth', 'value' => $model->email_auth ? '是' : '否'], ['attribute' => 'phone_auth', 'value' => $model->phone_auth ? '是' : '否'], ['attribute' => 'status', 'value' => app\models\Users::getStatusName($model->status)], 'mobile_phone', 'email:email', 'lesson', 'credit', 'score', 'create_time', 'update_time', 'update_user']]);
?>
    <h2>基本信息</h2>
    <?php 
if (!empty($modelInfo)) {
    ?>

    <?php 
    echo DetailView::widget(['model' => $modelInfo, 'attributes' => [['attribute' => 'sex', 'value' => app\models\UsersInfo::getSexName($modelInfo->sex)], 'birthday', ['attribute' => 'credentials_type', 'value' => '身份证'], 'credentials_number', 'account_location', 'telephone', 'height', 'weight', ['attribute' => 'disease_history', 'value' => app\models\UsersInfo::getDiseaseHistoryName($modelInfo->disease_history)], 'contact_address', 'contact_postcode', 'company_name', 'company_address', 'company_postcode', 'company_contact_phone', ['attribute' => 'clothes_size', 'value' => app\models\UsersInfo::getSizeName($modelInfo->clothes_size)], ['attribute' => 't_shirt_size', 'value' => app\models\UsersInfo::getSizeName($modelInfo->t_shirt_size)], ['attribute' => 'shorts_size', 'value' => app\models\UsersInfo::getSizeName($modelInfo->shorts_size)], ['attribute' => 'language', 'value' => app\models\UsersInfo::getLanguageName($modelInfo->language)], ['attribute' => 'spoken_language', 'value' => app\models\UsersInfo::getAbilityName($modelInfo->spoken_language)], ['attribute' => 'write_language', 'value' => app\models\UsersInfo::getAbilityName($modelInfo->write_language)], ['attribute' => 'photo', 'format' => 'html', 'value' => $modelInfo->photo ? '<img src="/upload/images/users_info/photo/' . $modelInfo->photo . '">' : '无'], ['attribute' => 'credentials_photo', 'format' => 'html', 'value' => $modelInfo->credentials_photo ? '<img src="/upload/images/users_info/credentials_photo/' . $modelInfo->credentials_photo . '">' : '无']]]);
    ?>
    <?php 
} else {
    ?>
        没有基本信息
    <?php 
}
Exemplo n.º 5
0
    echo $message->id;
    ?>
" data-type="message" data-type="message" data-toggle="tooltip" data-placement="top" title="Цитировать"><span class="fa fa-quote-left" aria-hidden="true"></span></button>
                </div>
                <div class="panel-body"><?php 
    echo $message->message;
    ?>
</div>
                <?php 
    PrettyPhoto::widget(['target' => ".pretty", 'pluginOptions' => ['opacity' => 0.6, 'theme' => PrettyPhoto::THEME_DARK_SQUARE, 'social_tools' => true, 'autoplay_slideshow' => false, 'modal' => true]]);
    ?>
            </div>
        <?php 
    $answers = \app\models\ForumMessage::find()->where(['status' => 1, 'post_id' => $post->id, 'answer' => $message->id])->orderBy('id asc')->all();
    foreach ($answers as $answer) {
        $userNameAnswer = app\models\Users::findOne($answer->author)->login;
        ?>
        <div class="media answer" id='message-<?php 
        echo $answer->id;
        ?>
'>
          <div class="media-left">
            <!--<a href="#">-->
              <!--<img class="media-object" data-src="holder.js/64x64" alt="64x64" style="width: 64px; height: 64px;" src="/img/avatars/<?php 
        echo $answer->author;
        ?>
.jpg" data-holder-rendered="true">-->
            <?php 
        echo EasyThumbnailImage::thumbnailImg("img/avatars/{$answer->author}.png", 64, 64, EasyThumbnailImage::THUMBNAIL_OUTBOUND, ['alt' => $userNameAnswer, 'class' => 'media-object']);
        ?>
              #<?php 
Exemplo n.º 6
0
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model app\models\Teachers */
$this->title = $model->name;
$this->params['breadcrumbs'][] = ['label' => '讲师管理', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="teachers-view">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <p>
        <?php 
echo Html::a('更新讲师', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::a('删除讲师', ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => '确认删除吗?', 'method' => 'post']]);
?>
    </p>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'name', ['attribute' => 'sex', 'label' => '性别', 'value' => app\models\Teachers::getSexName($model->sex)], 'age', ['attribute' => 'level', 'label' => '级别', 'value' => app\models\TeachersLevel::getNameById($model->level)], ['attribute' => 'status', 'value' => app\models\Users::getStatusName($model->status)], 'phone', 'email', 'lesson', ['attribute' => 'photo', 'format' => 'html', 'value' => $model->photo ? '<img src="/upload/images/teachers/photo/' . $model->photo . '">' : '无'], 'score', 'register_district', 'certificate_number', 'create_time', 'create_user', 'update_time', 'update_user']]);
?>

</div>