/** * Renders a datepicker text input. * @see \yii\widgets\ActiveField::textInput() * @return static the field object itself */ public function datepicker($options = []) { $datepickerOptions = isset($options['datepicker']) ? $options['datepicker'] : []; unset($options['datepicker']); $datepickerOptions['model'] = $this->model; $datepickerOptions['attribute'] = $this->attribute; $datepickerOptions['options'] = array_merge($this->inputOptions, $options); $this->adjustLabelFor($datepickerOptions['options']); $this->parts['{input}'] = DatePicker::widget($datepickerOptions); return $this; }
public function run() { if (!empty($this->between)) { \yii\jui\DatePicker::widget(['model' => $this->model, 'attribute' => $this->between[0]]); echo $this->form->field($this->model, $this->between[0], ['addon' => ['prepend' => ['content' => '<i class="glyphicon glyphicon-calendar"></i>'], 'groupOptions' => ['class' => 'col-sm-4']]])->textInput(['readonly' => 'readonly', 'placeholder' => "คลิกเลือก {$this->label[0]}"]); \yii\jui\DatePicker::widget(['model' => $this->model, 'attribute' => $this->between[1]]); echo $this->form->field($this->model, $this->between[1], ['addon' => ['prepend' => ['content' => '<i class="glyphicon glyphicon-calendar"></i>'], 'groupOptions' => ['class' => 'col-sm-4']]])->textInput(['readonly' => 'readonly', 'placeholder' => "คลิกเลือก {$this->label[1]}"]); } else { \yii\jui\DatePicker::widget(['model' => $this->model, 'attribute' => $this->attr]); echo $this->form->field($this->model, $this->attr, ['addon' => ['prepend' => ['content' => '<i class="glyphicon glyphicon-calendar"></i>'], 'groupOptions' => ['class' => 'col-sm-4']]])->textInput(['readonly' => 'readonly', 'placeholder' => "คลิกเลือก {$this->label[0]}"]); } $this->js(); }
/** * Renders the filter cell content. * The default implementation simply renders a space. * This method may be overridden to customize the rendering of the filter cell (if any). * @return string the rendering result */ protected function renderFilterCellContent() { if (is_string($this->filter)) { return $this->filter; } $model = $this->grid->filterModel; if ($this->filter !== false && $this->attribute !== null && $model->isAttributeActive($this->attribute)) { if ($model->hasErrors($this->attribute)) { Html::addCssClass($this->filterOptions, 'has-error'); $error = ' ' . Html::error($model, $this->attribute, $this->grid->filterErrorOptions); } else { $error = ''; } $filterOptions = ['=' => '=', '>' => '>', '<' => '<']; Html::addCssClass($this->filterInputOptions, 'date-filter-input'); $dropDown = Html::activeDropDownList($model, $this->attribute . '_operand', $filterOptions, ['class' => 'form-control pull-left', 'style' => 'width: 32px; appearance: none; -moz-appearance: none; -webkit-appearance: none;']); $field = DatePicker::widget(['model' => $model, 'attribute' => $this->attribute, 'options' => $this->filterInputOptions, 'dateFormat' => 'yyyy-MM-dd']); return $dropDown . $field . $error; } else { return parent::renderFilterCellContent(); } }
<div class="post-index"> <p> <?php echo Html::a('Создать запись', ['create'], ['class' => 'btn btn-success']); ?> </p> <?php Pjax::begin(); ?> <?php echo himiklab\sortablegrid\SortableGridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'id' => 'post_tbl', 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['class' => CheckboxColumn::classname()], ['attribute' => 'title', 'format' => 'html', 'value' => function ($model) { return Html::a($model['title'], ['update', 'id' => $model['id']]); }], ['attribute' => 'cat_id', 'content' => function ($data) { return $data->getCategoryName(); }, 'filter' => \yii\helpers\Arrayhelper::map(\app\modules\category\models\Category::find()->all(), 'id', 'title')], ['attribute' => 'created_at', 'format' => ['date', 'dd.MM.yyyy'], 'options' => array('width' => '225px'), 'filter' => \yii\jui\DatePicker::widget(['dateFormat' => 'dd.MM.yyyy', 'model' => $searchModel, 'attribute' => 'created_at', 'options' => ['class' => 'form-control'], 'clientOptions' => ['dateFormat' => 'dd.mm.yy']])], ['attribute' => 'status', 'format' => 'html', 'value' => function ($model) { $class = $model->status === 1 ? '<i class="icon-ok"></i>' : '<i class="icon-lock">'; return $class; }, 'options' => array('width' => '100px'), 'filter' => Html::activeDropDownList($searchModel, 'status', array(1 => 'On', 0 => 'Off'), ['class' => 'form-control', 'prompt' => 'Все'])], ['attribute' => 'main', 'format' => 'html', 'value' => function ($model) { $res = $model->main === 1 ? '<i class="icon-ok"></i>' : '<i class="icon-minus">'; return $res; }, 'options' => array('width' => '100px'), 'filter' => Html::activeDropDownList($searchModel, 'main', array(1 => 'Да', 0 => 'Нет'), ['class' => 'form-control', 'prompt' => 'Все'])], 'username', ['class' => 'yii\\grid\\ActionColumn', 'header' => 'Действия', 'headerOptions' => ['width' => '100']]]]); ?> <p> <?php echo Html::a('Удалить выбранные', ['massdelete'], ['class' => 'btn btn-danger', 'data' => ['confirm' => 'Вы уверены?', 'data-method' => 'post']]); ?> </p>
?> <?php echo $this->render('_menu'); ?> <?php Pjax::begin(); ?> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'layout' => "{items}\n{pager}", 'columns' => ['username', 'email:email', ['attribute' => 'registration_ip', 'value' => function ($model) { return $model->registration_ip == null ? '<span class="not-set">' . Yii::t('user', '(not set)') . '</span>' : $model->registration_ip; }, 'format' => 'html'], ['attribute' => 'created_at', 'value' => function ($model) { return Yii::t('user', '{0, date, MMMM dd, YYYY HH:mm}', [$model->created_at]); }, 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'created_at', 'dateFormat' => 'php:Y-m-d', 'options' => ['class' => 'form-control']])], ['header' => Yii::t('user', 'Confirmation'), 'value' => function ($model) { if ($model->isConfirmed) { return '<div class="text-center"><span class="text-success">' . Yii::t('user', 'Confirmed') . '</span></div>'; } else { return Html::a(Yii::t('user', 'Confirm'), ['confirm', 'id' => $model->id], ['class' => 'btn btn-xs btn-success btn-block', 'data-method' => 'post', 'data-confirm' => Yii::t('user', 'Are you sure you want to confirm this user?')]); } }, 'format' => 'raw', 'visible' => Yii::$app->getModule('user')->enableConfirmation], ['header' => Yii::t('user', 'Block status'), 'value' => function ($model) { if ($model->isBlocked) { return Html::a(Yii::t('user', 'Unblock'), ['block', 'id' => $model->id], ['class' => 'btn btn-xs btn-success btn-block', 'data-method' => 'post', 'data-confirm' => Yii::t('user', 'Are you sure you want to unblock this user?')]); } else { return Html::a(Yii::t('user', 'Block'), ['block', 'id' => $model->id], ['class' => 'btn btn-xs btn-danger btn-block', 'data-method' => 'post', 'data-confirm' => Yii::t('user', 'Are you sure you want to block this user?')]); } }, 'format' => 'raw'], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{update} {delete}']]]); ?> <?php
<div class="subscriber-form"> <?php $form = ActiveForm::begin(['id' => 'dynamic-form']); ?> <?php echo $form->field($model, 'name')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'birth_date')->textInput(); ?> <!-- <?php echo DatePicker::widget(['model' => $model, 'attribute' => 'birth_date', 'dateFormat' => 'yyyy-MM-dd']); ?> --> <?php echo $form->field($model, 'notes')->textarea(['rows' => 6]); ?> <div class="row"> <div class="panel panel-default"> <div class="panel-heading"><h4><i class="glyphicon glyphicon-envelope"></i> Phones</h4></div> <div class="panel-body"> <?php DynamicFormWidget::begin(['widgetContainer' => 'dynamicform_wrapper', 'widgetBody' => '.container-items', 'widgetItem' => '.item', 'limit' => 5, 'min' => 1, 'insertButton' => '.add-item', 'deleteButton' => '.remove-item', 'model' => $modelsPhone[0], 'formId' => 'dynamic-form', 'formFields' => ['number']]); ?>
<?php use yii\helpers\Url; $id = \Yii::$app->controller->action->id; $search_date = Yii::$app->request->get("search_date"); if (empty($url)) { $url = '/visit/api.html?fc=totalvisit'; } ?> <div class="panel-heading"> <div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups"> <div class="btn-group pull-left"> <?php echo \yii\jui\DatePicker::widget(['options' => ['class' => 'form-control datepicker', 'readonly' => true], 'attribute' => 'start_date', 'language' => 'zh-CN', 'dateFormat' => 'yyyy-MM-dd', 'value' => empty($search_date) ? date('Y-m-d') : $search_date, 'clientOptions' => ['minDate' => '2015-01-01', 'maxDate' => date("Y-m-d"), 'onSelect' => new \yii\web\JsExpression("function (dateText, inst) {\n var url = '" . $url . "&search_date='+ dateText;\n location.href = url;\n }")]]); ?> </div> </div> </div>
?> </h1> <p> <?php echo Html::a('Создать Проект', ['create'], ['class' => 'btn btn-success']); ?> </p> <div class="row"> <div class="col-xs-3"> <div class="alert alert-warning" role="alert">В обработке</div> </div> <div class="col-xs-3"> <div class="alert alert-success">Одобрена/завершена</div> </div> </div> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'summary' => '', 'rowOptions' => function ($model, $index, $widget, $grid) { return ['style' => 'background-color:' . $model->getColor() . ';']; }, 'columns' => [['attribute' => 'id', 'value' => 'id', 'contentOptions' => ['style' => 'width: 50px;']], 'name', ['attribute' => 'status', 'format' => 'raw', 'value' => function ($data) { return $data->getStatus(); }, 'filter' => R::PROJECT_STATUSES()], ['attribute' => 'deadline', 'value' => 'deadline', 'filter' => \yii\jui\DatePicker::widget(['model' => $searchModel, 'attribute' => 'deadline', 'language' => 'ru', 'dateFormat' => 'yyyy-MM-dd', 'options' => ['class' => 'form-control']]), 'format' => 'html'], ['attribute' => 'stages', 'format' => 'raw', 'value' => function ($data) { return $data->getStagesName(); }], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{view} {update} {done}', 'buttons' => ['done' => function ($url, $model, $key) { $options = ['data-confirm' => Yii::t('yii', 'Вы действительно желаете завершить проект?'), 'data-method' => 'post', 'data-pjax' => '0']; return Html::a('<span class="glyphicon glyphicon-ok"></span>', $url, $options); }]]]]); ?> </div>
use yii\helpers\Html; use yii\grid\GridView; use yii\jui; /* @var $this yii\web\View */ /* @var $searchModel app\models\search\UserSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = Yii::t('app', 'Users'); $this->params['breadcrumbs'][] = $this->title; ?> <div class="user-index"> <h1><?php echo Html::encode($this->title); ?> </h1> <?php // echo $this->render('_search', ['model' => $searchModel]); ?> <p> <?php echo Html::a(Yii::t('app', 'Create User'), ['create'], ['class' => 'btn btn-success']); ?> </p> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'id', 'username', 'name', 'surname', ['attribute' => 'create_date', 'value' => 'create_date', 'filter' => \yii\jui\DatePicker::widget(['language' => 'ru', 'dateFormat' => 'dd-MM-yyyy']), 'format' => 'html'], ['class' => 'yii\\grid\\ActionColumn']]]); ?> </div>
<div class="panel panel-default"> <?php echo $this->render('common_top.php'); ?> <div class="panel-body"> <?php Pjax::begin(['id' => 'countries']); ?> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn', 'headerOptions' => ['style' => 'width:80px;']], ['attribute' => 'ApplicationName', 'label' => '类型', 'value' => function ($model) { return Html::encode($model->ApplicationId); }], ['label' => '函数', 'filter' => Html::activeTextInput($searchModel, 'Method', ['class' => 'form-control']), 'format' => 'raw', 'value' => function ($model) { return Html::encode($model->Method); }], ['label' => '参数', 'filter' => Html::activeTextInput($searchModel, 'Parameter', ['class' => 'form-control']), 'format' => 'raw', 'value' => function ($model) { return Html::encode($model->Parameter); }], ['attribute' => 'start_date', 'label' => '开始时间', 'value' => 'AddDate', 'filter' => \yii\jui\DatePicker::widget(['model' => $searchModel, 'options' => ['style' => 'width:80px;'], 'attribute' => 'start_date', 'language' => 'zh-CN', 'dateFormat' => 'yyyy-MM-dd']), 'format' => 'html'], ['attribute' => 'end_date', 'label' => '结束时间', 'value' => 'AddDate', 'filter' => \yii\jui\DatePicker::widget(['model' => $searchModel, 'options' => ['style' => 'width:80px;'], 'attribute' => 'end_date', 'language' => 'zh-CN', 'dateFormat' => 'yyyy-MM-dd', 'value' => date('Y-m-d')]), 'format' => 'html'], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{view}', 'buttons' => ['view' => function ($url, $model, $key) { $options = ['title' => Yii::t('yii', 'View'), 'aria-label' => Yii::t('yii', 'View'), 'class' => 'show_model']; $url = 'javascript:showDetaildiv("text' . $model->Id . '");'; return Html::textarea('text' . $model->Id, Html::encode($model->Content), ['style' => 'display:none;', 'id' => 'text' . $model->Id]) . Html::a('<button type="button" class="btn btn-sm btn-info">查看详情</button>', $url, $options); }]]]]); Pjax::end(); ?> </div> </div> </div> </div> <script type="text/javascript"> $(document).ready(function() { <?php if (isset($params['TraceLogSearch']['Parameter']) && !empty($params['TraceLogSearch']['Parameter'])) {
?> <div class="col-md-11"> <div class="box box-info"> <div class="box-header with-border"> <h3 class="box-title"><?php echo 'Pending Verification of Registered User'; ?> </h3> </div> <div class="box-body"> <?php Pjax::begin(); ?> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'id', 'username', 'auth_key', 'email:email', ['attribute' => 'created_at', 'value' => function ($data) { return $data->created_at; }, 'filter' => \yii\jui\DatePicker::widget(['dateFormat' => 'dd-MM-yyyy']), 'format' => ['date', 'php:d-m-Y H:i:s']], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{view} {accept} {block}', 'buttons' => ['accept' => function ($url, $model) { return Html::a('<span class="fa fa-check"></span>', $url, ['title' => Yii::t('app', 'Accept'), 'data-confirm' => Yii::t('app', "Apakah Anda yakin akan memberikan akses API kepada user " . $model->username . "?")]); }, 'block' => function ($url, $model) { return Html::a("<span class='fa fa-ban'></span>", $url, ['title' => Yii::t('app', 'Block'), 'data-confirm' => Yii::t('app', "Apakah Anda yakin akan menolak pendaftaran akses dengan username " . $model->username . "?")]); }]]]]); ?> <?php Pjax::end(); ?> </div><!--box footer--> </div><!--box--> </div> </div>
/* @var $searchModel \app\models\CardSearch */ use yii\grid\GridView; use yii\helpers\Html; use yii\jui\DatePicker; use app\models\Card; use app\models\Serial; $this->title = 'Карты'; $this->params['breadcrumbs'][] = ''; $js = <<<JS \$('.card-delete').on('click', function(event){ event.preventDefault(); var self = \$(this); \$.post('/card/delete', {id:self.data('id')}) .done(function(data){ if (data.result==true) { self.parents('tr').remove(); } }); }); JS; $this->registerJs($js); ?> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'layout' => '{items}{pager}', 'columns' => ['id', ['attribute' => 'serialSerial', 'value' => 'serial.serial'], 'number', ['attribute' => 'serialReleaseDate', 'value' => 'serial.release_date', 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'serialReleaseDate', 'options' => ['class' => 'form-control'], 'dateFormat' => 'yyyy-MM-dd'])], ['attribute' => 'end_date', 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'end_date', 'options' => ['class' => 'form-control'], 'dateFormat' => 'yyyy-MM-dd'])], ['attribute' => 'status', 'format' => 'raw', 'value' => function ($data) { return Html::a($data->statusText, ['/card/update', 'id' => $data->id], ['class' => 'book-view']); }, 'filter' => Html::activeDropDownList($searchModel, 'status', Card::getStatuses(), ['class' => 'form-control', 'prompt' => ''])], ['class' => \yii\grid\ActionColumn::class, 'header' => 'Действия', 'headerOptions' => ['width' => '150'], 'template' => '{view} {delete}', 'buttons' => ['delete' => function ($url, $model) { return Html::a('Удалить', null, ['class' => 'card-delete', 'data-id' => $model->id]); }, 'view' => function ($url, $model) { return Html::a('Просмотр', $url, ['class' => 'book-view']); }]]]]);
echo Html::a('PDF', ['export-data/export-to-pdf', 'model' => get_class($searchModel)], ['class' => 'btn btn-block btn-warning', 'target' => '_blank']); ?> </div> <div class="col-xs-4 left-padding"> <?php echo Html::a('EXCEL', ['export-data/export-excel', 'model' => get_class($searchModel)], ['class' => 'btn btn-block btn-primary', 'target' => '_blank']); ?> </div> </div> </div> <div class="col-xs-12" style="padding-top: 10px;"> <div class="box"> <div class="box-header"> </div><!-- /.box-header --> <div class="box-body table-responsive"> <div class="national-holidays-index"> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'summary' => '', 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'national_holiday_name', ['attribute' => 'national_holiday_date', 'value' => function ($data) { return Yii::$app->formatter->asDate($data->national_holiday_date); }, 'filter' => \yii\jui\DatePicker::widget(['model' => $searchModel, 'attribute' => 'national_holiday_date', 'clientOptions' => ['dateFormat' => 'dd-mm-yyyy', 'changeMonth' => true, 'changeYear' => true, 'defaultValue' => null, 'yearRange' => '1900:' . (date('Y') + 1), 'defaultDate' => null], 'options' => ['id' => 'national_holiday_date', 'value' => NULL, 'class' => 'form-control']]), 'format' => 'html'], 'national_holiday_remarks', ['class' => 'app\\components\\CustomActionColumn']]]); ?> </div> </div> </div> </div>
<?php $form = \yii\bootstrap\ActiveForm::begin(['layout' => 'horizontal']); echo $form->field($book, 'title'); echo $form->field($book, 'author_id')->dropDownList(\yii\helpers\ArrayHelper::map($authors, 'id', 'fullName')); ?> <div class="form-group field-book-date_created"> <label class="control-label col-sm-3" for="book-date_created">Дата выхода книги </label> <div class="col-sm-6"> <?php echo \yii\jui\DatePicker::widget(['model' => $book, 'attribute' => 'date_created', 'language' => 'ru', 'dateFormat' => 'yyyy-MM-dd']); ?> </div> </div> <?php echo $form->field($book, 'preview'); echo \yii\bootstrap\Button::widget(['label' => 'Создать', 'options' => ['class' => 'col-md-offset-3']]);
?> <br><br> <h4> SHOPS REPORT ORDER IN TIME</h4><br> <form action="" method="GET"> <table> <tr> <td> <?php echo yii\jui\DatePicker::widget(['name' => 'startDate', 'language' => 'es-UY', 'dateFormat' => 'dd-MM-yyyy', 'options' => ['placeholder' => 'Start Date ...']]); ?> </td> <td> </td> <td> <?php echo yii\jui\DatePicker::widget(['name' => 'endDate', 'language' => 'es-UY', 'dateFormat' => 'dd-MM-yyyy', 'options' => ['placeholder' => 'End Date ...']]); ?> </td> <td> </td> <td> <select id="store-picker" name="storePicker" class="btn btn-sm dropdown-toggle"> <option value="0" selected>Choose Store...</option> <?php echo $stores; ?> </select> </td> <td> </td> <td> <input class="btn btn-default btn-primary btn-sm" type='submit' value='Generate'/>
$Event = new \yii2fullcalendar\models\Event(); $Event->id = $value['id']; $Event->title = $value['title']; $Event->start = date('Y-m-d\\TH:i:s\\Z', $value['start']); $events[] = $Event; } ?> <?php echo \yii2fullcalendar\yii2fullcalendar::widget(array('events' => $events)); ?> <br/> <form> <div class="form-group"> <?php echo DatePicker::widget(['name' => 'date', 'attribute' => 'from_date', 'language' => 'ru', 'dateFormat' => 'yyyy-MM-dd', 'options' => ['class' => 'form-control', 'placeholder' => 'Дата']]); ?> </div> <div class="form-group"> <input type="text" name="text" class="form-control" placeholder="Опис"> </div> <button type="submit" class="btn btn-default">Зберегти шабаш</button> </form> </div> </div> <br/> <div class="row"> <div class="col-sm-12"> <br/> <script type="text/javascript"> $(document).ready(function() {
echo Html::a(Html::img('/admin/img/search.png', ['width' => '16px']) . 'Потерянные', ['index?' . $query . '&WorkplacesSearch%5Bworkplaces_title%5D=потерянные'], ['class' => 'btn btn-default']); ?> <?php echo Html::a(Html::img('/admin/img/cross.png', ['width' => '16px']) . 'Сбросить фильтр', ['index?' . $query], ['class' => 'btn btn-default']); ?> </p> <?php $columns = [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'branch_id', 'value' => 'branch.branch_title'], ['attribute' => 'room_id', 'value' => 'room.room_title'], ['attribute' => 'workplaces_title', 'value' => function ($model) { return Html::a($model->workplaces_title, ['workplaces/view', 'id' => $model->id]); }, 'format' => 'raw'], ['attribute' => '_owner', 'value' => function ($model) { if ($model->owner) { return $model->owner[0]['snp']; } else { return '-'; } }, 'format' => 'raw'], ['class' => \yii\grid\Column::className(), 'content' => function ($model) use($id_dev) { return Html::a(Html::img('/admin/img/ok.png', ['width' => '25px']), ['devices/addtowp', 'id' => $id_dev, 'id_wp' => $model->id]); }], ['attribute' => 'inventoryDate', 'value' => function ($model) { return $model->inventoryDate ? $model->inventoryDate : '-'; }, 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'inventoryDate', 'clientOptions' => ['dateFormat' => 'dd.MM.yyyy', 'options' => ['class' => 'form-control']]]), 'options' => ['class' => 'form-control']], ['class' => 'yii\\grid\\ActionColumn']]; if ($mode == 'sel') { unset($columns[6]); } else { unset($columns[5]); } echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => $columns]); ?> </div>
<div class="col-xs-4 left-padding"> <?php echo Html::a('EXCEL', ['/export-data/export-excel', 'model' => get_class($searchModel)], ['class' => 'btn btn-block btn-primary', 'target' => '_blank']); ?> </div> </div> </div> <div class="col-xs-12" style="padding-top: 10px;"> <div class="box"> <div class="box-body table-responsive"> <div class="notice-index"> <?php \yii\widgets\Pjax::begin(['enablePushState' => false]); ?> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'summary' => '', 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'notice_title', 'notice_description', ['attribute' => 'notice_user_type', 'value' => function ($model) { return $model->notice_user_type == 'S' ? 'Student' : ($model->notice_user_type == 'E' ? "Employee" : "General"); }, 'filter' => ['S' => 'Student', 'E' => 'Employee', '0' => 'General']], ['attribute' => 'notice_date', 'value' => function ($data) { return Yii::$app->formatter->asDate($data->notice_date); }, 'filter' => \yii\jui\DatePicker::widget(['model' => $searchModel, 'attribute' => 'notice_date', 'clientOptions' => ['dateFormat' => 'dd-mm-yyyy', 'changeMonth' => true, 'changeYear' => true, 'defaultValue' => null, 'defaultDate' => null, 'yearRange' => '1900:' . (date('Y') + 1)], 'options' => ['id' => 'notice_date', 'value' => NULL, 'class' => 'form-control']]), 'format' => 'html'], ['class' => '\\pheme\\grid\\ToggleColumn', 'attribute' => 'is_status', 'enableAjax' => true, 'filter' => ['1' => 'Deactive', '0' => 'Active']], ['class' => 'app\\components\\CustomActionColumn']]]); ?> <?php \yii\widgets\Pjax::end(); ?> </div> </div> </div> </div>
<label for="sqllogsearch-sqltext">IP:</label> <?php echo Html::activeTextInput($accLogErr, 'Ip1', ['class' => 'form-control', 'style' => 'width:200px']); ?> <label for="sqllogsearch-sqltext">站点:</label> <?php echo Html::activeTextInput($accLogErr, 'visitwebsite', ['class' => 'form-control', 'style' => 'width:200px']); ?> <label for="sqllogsearch-sqltext">耗时:</label> <?php echo Html::activeTextInput($accLogErr, 'request_time', ['class' => 'form-control', 'style' => 'width:200px']); ?> <label for="exampleInputEmail2">访问日期:</label> <?php echo \yii\jui\DatePicker::widget(['options' => ['class' => 'form-control datepicker', 'readonly' => true], 'model' => $accLogErr, 'language' => 'zh-CN', 'attribute' => 'date_reg', 'value' => date('Y-m-d'), 'dateFormat' => 'php:Y-m-d', 'clientOptions' => ['autoclose' => true]]); ?> <button type="submit" class="btn btn-default btn-primary btn-sm">查询</button> </div> </div> </div> <?php ActiveForm::end(); ?> </td> </tr> </tbody> </table> <div class="summary">第<b><?php echo $begin . '-' . $end; ?>
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 = 'Users'; $this->params['breadcrumbs'][] = $this->title; ?> <div class="users-index"> <h1><?php echo Html::encode($this->title); ?> </h1> <?php // echo $this->render('_search', ['model' => $searchModel]); ?> <p> <?php echo Html::a('Create User', ['create'], ['class' => 'btn btn-success']); ?> </p> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'id', 'name', 'email:email', 'company', ['attribute' => 'blocked', 'format' => 'boolean', 'filter' => [0 => 'No', 1 => 'Yes']], ['attribute' => 'created', 'value' => 'created', 'format' => 'date', 'filter' => \yii\jui\DatePicker::widget(['model' => $searchModel, 'attribute' => 'created', 'language' => 'en', 'dateFormat' => 'yyyy-MM-dd'])], ['attribute' => 'modified', 'format' => 'date', 'filter' => \yii\jui\DatePicker::widget(['model' => $searchModel, 'attribute' => 'modified', 'language' => 'en', 'dateFormat' => 'yyyy-MM-dd'])], ['class' => 'yii\\grid\\ActionColumn']]]); ?> </div>
<?php echo Html::hiddenInput('id', $employee_id); ?> <div class="col-xs-4"> <?php $from_date = isset($_GET['from_date']) ? $_GET['from_date'] : ''; echo 'From ' . \yii\jui\DatePicker::widget(['name' => 'from_date', 'dateFormat' => 'yyyy-MM-dd', 'options' => ['style' => 'width:200px', 'class' => 'form-control', ' value' => $from_date]]); ?> </div> <div class="col-xs-4"> <?php $to_date = isset($_GET['to_date']) ? $_GET['to_date'] : ''; echo 'To ' . \yii\jui\DatePicker::widget(['name' => 'to_date', 'dateFormat' => 'yyyy-MM-dd', 'options' => ['style' => 'width:200px', 'class' => 'form-control', ' value' => $to_date]]); ?> </div> <div class="form-group float-left" style="margin-top:20px"> <?php echo Html::submitButton('Search', ['class' => 'btn btn-primary']); ?> <?php echo Html::a('Reset', ['job', 'id' => $employee_id], ['class' => 'btn btn-default']); ?> </div> <?php ActiveForm::end();
"); <?php } ?> }); </script> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'ApplicationName', 'label' => '类型', 'value' => function ($model) { return Html::encode($model->ApplicationName); }], ['attribute' => 'Method', 'label' => '函数', 'value' => function ($model) { return Html::encode($model->Method); }], ['attribute' => 'Parameter', 'label' => '参数', 'value' => function ($model) { return Html::encode($model->Parameter); }], ['attribute' => 'Content', 'label' => '详情', 'headerOptions' => ['class' => 'maxwidth'], 'value' => function ($model) { return Html::encode($model->Content); }], ['attribute' => 'start_date', 'label' => '开始时间', 'value' => 'AddDate', 'filter' => \yii\jui\DatePicker::widget(['model' => $searchModel, 'attribute' => 'start_date', 'language' => 'zh-CN', 'dateFormat' => 'yyyy-MM-dd']), 'format' => 'html'], ['attribute' => 'end_date', 'label' => '结束时间', 'value' => 'AddDate', 'filter' => \yii\jui\DatePicker::widget(['model' => $searchModel, 'attribute' => 'end_date', 'language' => 'zh-CN', 'dateFormat' => 'yyyy-MM-dd', 'value' => date('Y-m-d')]), 'format' => 'html']]]); } Pjax::end(); ?> </div> </div> </div> </div> <script type="text/javascript"> var logo = document.getElementById("logo"); if(logo===null){ window.location.href='/?url=<?php echo $_SERVER['REQUEST_URI']; ?> '; }
<?php use yii\helpers\Url; use yii\helpers\Html; use yii\jui\DatePicker; use johnitvn\userplus\models\User; return [['class' => 'kartik\\grid\\CheckboxColumn', 'width' => '20px'], ['class' => 'kartik\\grid\\SerialColumn', 'width' => '30px'], ['class' => '\\kartik\\grid\\DataColumn', 'attribute' => 'id', 'width' => '40px'], ['class' => '\\kartik\\grid\\DataColumn', 'attribute' => 'login'], ['class' => '\\kartik\\grid\\DataColumn', 'attribute' => 'created_at', 'value' => function ($model) { return date('d/m/Y', $model->created_at); }, 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'created_at', 'dateFormat' => 'php:Y-m-d', 'options' => ['class' => 'form-control']])], ['class' => '\\kartik\\grid\\DataColumn', 'width' => '50px', 'attribute' => 'status', 'value' => function ($model) { if ($model->status == User::STATUS_BLOCKED) { return Html::a(Yii::t('user', 'Unblock'), ['toggle-block', 'id' => $model->id], ['class' => 'btn btn-xs btn-default btn-block', 'role' => 'modal-remote', 'data-confirm' => false, 'data-method' => false, 'data-request-method' => 'post', 'data-confirm-title' => Yii::t('user', 'Are you sure?'), 'data-confirm-message' => Yii::t('user', 'Are you sure you want to unblock this user?')]); } else { return Html::a(Yii::t('user', 'Block'), ['toggle-block', 'id' => $model->id], ['class' => 'btn btn-xs btn-default btn-block', 'role' => 'modal-remote', 'data-confirm' => false, 'data-method' => false, 'data-request-method' => 'post', 'data-confirm-title' => Yii::t('user', 'Are you sure?'), 'data-confirm-message' => Yii::t('user', 'Are you sure you want to unblock this user?')]); } }, 'format' => 'raw', 'filter' => [null => 'All', User::STATUS_BLOCKED => 'Blocked', User::STATUS_ACTIVED => 'Unblocked']], ['class' => '\\kartik\\grid\\DataColumn', 'width' => '100px', 'attribute' => 'superuser', 'value' => function ($model) { if ($model->superuser == User::IS_NOT_SUPER_USER) { return Html::a(Yii::t('user', 'Set SU'), ['toggle-superuser', 'id' => $model->id], ['class' => 'btn btn-xs btn-default btn-block', 'role' => 'modal-remote', 'data-confirm' => false, 'data-method' => false, 'data-request-method' => 'post', 'data-confirm-title' => Yii::t('user', 'Are you sure?'), 'data-confirm-message' => Yii::t('user', 'Are you sure you want to unblock this user?')]); } else { return Html::a(Yii::t('user', 'Remove SU'), ['toggle-superuser', 'id' => $model->id], ['class' => 'btn btn-xs btn-default btn-block', 'role' => 'modal-remote', 'data-confirm' => false, 'data-method' => false, 'data-request-method' => 'post', 'data-confirm-title' => Yii::t('user', 'Are you sure?'), 'data-confirm-message' => Yii::t('user', 'Are you sure you want to unblock this user?')]); } }, 'format' => 'raw', 'filter' => [User::IS_NOT_SUPER_USER => 'Not Superuser', User::IS_SUPER_USER => 'IS Superuser']], ['class' => 'kartik\\grid\\ActionColumn', 'dropdown' => false, 'vAlign' => 'middle', 'urlCreator' => function ($action, $model, $key, $index) { return Url::to([$action, 'id' => $key]); }, 'viewOptions' => ['role' => 'modal-remote', 'title' => 'View', 'data-toggle' => 'tooltip'], 'updateOptions' => ['role' => 'modal-remote', 'title' => 'Update', 'data-toggle' => 'tooltip'], 'deleteOptions' => ['role' => 'modal-remote', 'title' => 'Delete', 'data-confirm' => false, 'data-method' => false, 'data-request-method' => 'post', 'data-toggle' => 'tooltip', 'data-confirm-title' => 'Are you sure?', 'data-confirm-message' => 'Are you sure want to delete this item']]];
echo Html::encode($this->title); ?> </h1> <?php // echo $this->render('_search', ['model' => $searchModel]); ?> <p> <?php echo Html::a('Create Books', ['create'], ['class' => 'btn btn-success']); ?> </p> <!-- //$image = (new Query)->select('id','preview')->from('books'); --> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'id', 'filter' => false], ['attribute' => 'name', 'filter' => false], ['attribute' => 'date_create', 'value' => 'date_create', 'format' => 'raw', 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'date_create', 'dateFormat' => 'yyyy-MM-dd'])], ['attribute' => 'date_update', 'value' => 'date_update', 'format' => 'raw', 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'date_update', 'dateFormat' => 'yyyy-MM-dd'])], 'preview' => ['attribute' => 'preview', 'label' => 'Превью', 'format' => 'raw', 'value' => function ($model) { return '<a href="http://test.onlysites.ru/yii-advanced/frontend' . $model->preview . '" class="fancybox"><img src="http://test.onlysites.ru/yii-advanced/frontend' . $model->preview . '" width="150" /></a>'; }, 'filter' => false], ['attribute' => 'date', 'value' => 'date', 'format' => 'raw', 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'date', 'dateFormat' => 'yyyy-MM-dd'])], ['format' => 'raw', 'attribute' => 'author_id', 'value' => function ($model) { $author = Authors::find()->where(['id' => $model->author_id])->one(); $author = $author->lastname . " " . $author->firstname; return $author; }, 'filter' => Html::activeDropDownList($searchModel, 'author_id', ArrayHelper::map(Authors::find()->asArray()->all(), 'id', 'firstname'), ['class' => 'form-control', 'prompt' => ' Выберите автора '])], ['class' => 'yii\\grid\\ActionColumn']]]); ?> <?php } ?> </div>
echo $form->field($model, 'author_id')->dropDownList(ArrayHelper::map(Authors::find()->all(), 'id', 'Name'), ['prompt' => '---']); ?> </div> <div class="col-md-4"> <?php echo $form->field($model, 'name'); ?> </div> </div> <div class="row"> <div class="col-md-6"> Дата выхода от: <?php echo DatePicker::widget(['model' => $model, 'attribute' => 'date_ot', 'language' => 'ru', 'dateFormat' => 'yyyy-MM-dd']); ?> до <?php echo DatePicker::widget(['model' => $model, 'attribute' => 'date_do', 'language' => 'ru', 'dateFormat' => 'yyyy-MM-dd']); ?> </div> </div> <div class="row"> <div class="col-md-4"> <?php echo Html::submitButton('Поиск', ['class' => 'btn btn-primary']); ?> </div> </div> <?php ActiveForm::end(); ?>
</h3> </div> <div class="panel-body"> <?php if (Yii::$app->session->hasFlash('success')) { ?> <div class="alert alert-success" role="alert"> <a class="close" data-dismiss="alert" href="#" aria-hidden="true">×</a> <?php echo Yii::$app->session->getFlash('success'); ?> <span class="glyphicon glyphicon-ok"></span> </div> <?php } ?> <div class="urine-index"> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => ['fk_person', ['label' => 'Names', 'format' => 'raw', 'value' => function ($model, $key, $index, $widget) { return $model->fkPerson->names; }], ['attribute' => 'date_visit', 'value' => 'date_visit', 'filter' => \yii\jui\DatePicker::widget(['model' => $searchModel, 'attribute' => 'date_visit', 'options' => ['class' => 'form-control'], 'clientOptions' => ['changeMonth' => true, 'changeYear' => true, 'maxDate' => 'today'], 'language' => 'en', 'dateFormat' => 'yyyy-MM-dd']), 'format' => 'html'], 'time_visit', ['attribute' => 'Basics', 'format' => 'raw', 'value' => function ($model) { return yii\bootstrap\Html::a('Urine basic', ["urine/update/{$model->id}"], ['class' => 'btn btn-xs btn-link']); }], ['attribute' => 'Results', 'format' => 'raw', 'value' => function ($model) { return yii\bootstrap\Html::a('Result', ["urine/updateresults/{$model->id}"], ['class' => 'btn btn-xs btn-link']); }]]]); ?> </div> </div> </div>
SecondWidget::begin(); ?> Этот текст сделаем красным. <?php SecondWidget::end(); ?> <?php Modal::begin(['header' => '<h2>Привет МИР !!!</h2>', 'toggleButton' => ['label' => 'нажми']]); echo 'это контент модального окна...'; Modal::end(); ?> <?php $value = date('d.m.Y'); echo DatePicker::widget(['language' => 'ru', 'name' => 'from_date', 'clientOptions' => ['dateFormat' => 'd.m.Y', 'dateDefault' => '21.06.1977']]); ?> <h1><?php echo $this->context->action->uniqueId; ?> </h1> <p> This is the view content for action "<?php echo $this->context->action->id; ?> ". The action belongs to the controller "<?php echo get_class($this->context); ?>
?> </table> <?php $form = ActiveForm::begin(['id' => 'registerInfo', 'enableAjaxValidation' => false, 'action' => \yii\helpers\Url::to('/user-center/user-vocational')]); ?> <table cellpadding="0" cellspacing="0" class="fixed_information"> <tr> <tr> <td colspan="2" style="color:#E4393D;">(未有执教经历的学员可不填写!)</td> </tr> <td align="right"><em>*</em>时间:</td> <td><?php echo DatePicker::widget(['attribute' => 'begin_time', 'name' => 'UsersVocational[begin_time]', 'clientOptions' => ['autoclose' => true, 'format' => 'dd-M-yyyy']]); ?> 至 <?php echo DatePicker::widget(['attribute' => 'end_time', 'name' => 'UsersVocational[end_time]', 'clientOptions' => ['autoclose' => true, 'format' => 'dd-M-yyyy']]); ?> (不填表示至今) </td> </tr> <tr> <td align="right"><em>*</em>地点:</td> <td><input type="text" value="" class="w400" name="UsersVocational[address]"/><span class='state1'></span></td> </tr> <tr> <td align="right"><em>*</em>任职:</td> <td><select class="w78" name="UsersVocational[post]"> <option value="无">无</option> <option value="主教练">主教练</option> <option value="助理教练">助理教练</option> <option value="技战术教练">技战术教练</option>
<?php use yii\helpers\Html; use yii\grid\GridView; use yii\grid\ActionColumn; /** * @var yii\web\View $this * @var yii\data\ActiveDataProvider $dataProvider * @var app\modules\user\models\SearchUser $searchModel */ $this->title = 'Список страниц'; $this->params['breadcrumbs'][] = $this->title; ?> <div class=""> <?php echo GridView::widget(['id' => 'pages-grid', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['attribute' => 'id', 'options' => array('width' => '50px')], ['attribute' => 'title', 'format' => 'html', 'value' => function ($model) { return Html::a($model['title'], ['update', 'id' => $model['id']]); }], ['attribute' => 'alias', 'format' => 'url', 'value' => function ($model) { return \yii\helpers\Url::To('@web/page/' . $model->alias, true); }], ['attribute' => 'created_at', 'format' => ['date', 'dd.MM.yyyy'], 'options' => array('width' => '225px'), 'filter' => \yii\jui\DatePicker::widget(['dateFormat' => 'dd.MM.yyyy', 'model' => $searchModel, 'attribute' => 'created_at', 'options' => ['class' => 'form-control'], 'clientOptions' => ['dateFormat' => 'dd.mm.yy']])], ['class' => 'yii\\grid\\ActionColumn']]]); ?> </div>
<?php echo $this->context->id; ?> </div> <div id="datePicker"> <?php echo time(); ?> <?php echo DatePicker::widget(['name' => 'myDatePicker', 'id' => 'datePicker1', 'language' => 'zh-CN', 'dateFormat' => 'php:Ymd', 'options' => ['title' => '请选择日期', 'readonly' => true], 'clientOptions' => ['showAnim' => 'show']]); ?> </div> <div id="datePicker2"> <?php echo DatePicker::widget(['language' => 'zh-CN', 'name' => 'country', 'clientOptions' => ['dateFormat' => 'yy-mm-dd']]); ?> </div> <div id="yii2chinaicon"> <?php echo \yiichina\icons\Icon::show('user'); ?> <?php echo \yiichina\icons\Icon::show('user', 'fa'); ?> <?php echo \yiichina\icons\Icon::show('spinner spin', 'fa'); ?> <?php echo \yiichina\icons\Icon::show(['spinner', 'spin'], 'fa'); ?>