private function genField($name, $setting, $options) { if (preg_match("/number|string/i", $setting->type)) { return Html::textInput($name, $setting->value, $options); } elseif (preg_match("/text/i", $setting->type)) { return Html::textArea($name, $setting->value, $options); } elseif (preg_match("/bool/i", $setting->type)) { return Html::checkBox($name, $setting->value, array_merge($options, $this->checkboxOptions, ['template' => ''])); } elseif (preg_match("/dropdown/i", $setting->type)) { $data = @unserialize($setting->options); $data = is_array($data) ? $data : []; return Html::dropDownList($name, $setting->value, $data, $options); } elseif (preg_match("/radiolist/i", $setting->type)) { $data = @unserialize($setting->options); $data = is_array($data) ? $data : []; $template = $this->radioTemplate; $this->radioOptions['item'] = !$this->radioCallback ? function ($index, $label, $name, $checked, $value) use($template) { return strtr($template, ['{input}' => Html::radio($name, $checked, ['value' => $value]), '{labelText}' => $label]); } : $this->radioCallback; return Html::radioList($name, $setting->value, $data, array_merge($options, $this->radioOptions)); } elseif (preg_match("/{dateradiolist}/i", $setting->type)) { $data = @unserialize($setting->options); $data = is_array($data) ? $data : []; $template = $this->radioTemplate; $this->radioOptions['item'] = function ($index, $label, $name, $checked, $value) use($template) { return strtr($template, ['{input}' => Html::radio($name, $checked, ['value' => $value]), '{labelText}' => date($value, time())]); }; return Html::radioList($name, $setting->value, array_combine($data, $data), array_merge($options, $this->radioOptions)); } elseif (preg_match("/timezone/i", $setting->type)) { return Html::dropDownList($name, $setting->value, $this->getTimezones(), $options); } elseif (preg_match("/date/i", $setting->type)) { return DatePicker::widget(['name' => $name, 'type' => DatePicker::TYPE_INPUT, 'value' => date('d-m-Y', strtotime($setting->value)), 'pluginOptions' => ['autoclose' => true, 'format' => 'dd-M-yyyy']]); } else { return Html::textArea($name, $setting->value, $options); } }
<div class="form-group"> <?php if ($label) { ?> <label class="control-label"><?php echo $label; ?> </label><?php } ?> <?php echo \kartik\widgets\DatePicker::widget(['name' => $name, 'value' => $value ? $value : "", 'options' => ['placeholder' => 'выберите дату', 'data-name' => $name], 'pluginOptions' => ['format' => 'dd.mm.yyyy', 'todayHighlight' => true]]); ?> </div>
'name'=>'date_range', 'id'=>'id_date_range', 'language'=>'zh', 'convertFormat'=>true, 'pluginOptions'=>[ 'timePicker'=>false, // 'timePickerIncrement'=>30, // 'format'=>'Y-m-d h:i A' 'format'=>'Y-m-d', 'separator'=>'_' ] ]); */ if (empty($cur_date)) { echo '<label class="control-label">请输入时间范围</label>'; echo DatePicker::widget(['name' => 'date_start', 'value' => $date_start, 'options' => ['id' => 'id_date_start'], 'type' => DatePicker::TYPE_RANGE, 'name2' => 'date_end', 'value2' => $date_end, 'options2' => ['id' => 'id_date_end'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd', 'language' => 'zh-CN']]); } ?> </p> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterSelector' => '#id_date_start, #id_date_end', 'filterModel' => $filter, 'options' => ['class' => 'table-responsive'], 'tableOptions' => ['class' => 'table table-striped'], 'columns' => [['label' => '渠道编号', 'attribute' => 'id', 'headerOptions' => array('style' => 'width:15%;'), 'filter' => true, 'visible' => false], ['label' => '渠道名称', 'attribute' => 'title', 'headerOptions' => array('style' => 'width:25%;')], ['label' => '渠道推广数量', 'attribute' => 'cnt_sum', 'headerOptions' => array('style' => 'width:20%;')]], 'bordered' => false, 'export' => false, 'panel' => ['heading' => "<h3 class=\"panel-title\"> </h3>", 'type' => 'default', 'before' => Html::a('下载 <i class="glyphicon glyphicon-arrow-down"></i>', Url::to() . '&channelscoretopxdownload=1', ['class' => 'btn btn-success']), 'showFooter' => false]]); ?> </div> <?php /* [ 'label' => '渠道类别', 'attribute' => 'cat',
//= $form->field($model, 'created')->textInput() ?> <?php //= $form->field($model, 'updated')->textInput() ?> <table width="100%"> <tr> <td style="width: 270px; vertical-align: top"> <div> <label>Плановая дата</label> <div class="well well-sm" style="background-color: #fff; width:245px;"> <?php echo DatePicker::widget(['model' => $model, 'attribute' => 'plan_date', 'type' => DatePicker::TYPE_INLINE, 'language' => 'ru', 'pluginOptions' => ['format' => 'yyyy-mm-dd']]); ?> </div> </div> </td> <td style="vertical-align: top"> <?php echo $form->field($model, 'client')->dropDownList(Clients::getClients()); ?> <?php //= $form->field($model, 'client')->textInput(['maxlength' => true]) ?> <?php //= $form->field($model, 'plan_date')->textInput() ?>
<div class="col col1"> <label>First Name</label> <?php echo $form->field($user, 'fname')->textInput(['value' => $user->fname, 'class' => 'form-control'])->label(false); ?> </div> <div class="col col2"> <label>Last Name</label> <?php echo $form->field($user, 'lname')->textInput(['value' => $user->lname, 'class' => 'form-control'])->label(false); ?> </div> <div class="col col3"> <?php echo '<label class="control-label">Date of Birth</label>'; echo DatePicker::widget(['name' => 'UserProfile[DOB]', 'value' => '01/01/1990', 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true, 'todayBtn' => true, 'format' => 'dd/mm/yyyy']]); ?> </div> </div> <div class="col-3 clearfix"> <div class="col col1"> <label>Gender</label> <?php echo $form->field($model, 'gender')->dropDownList(['0' => 'Select', 'M' => 'Male', 'F' => 'Female'], ['class' => 'singleSelectBox'])->label(false); ?> </div> <div class="col col2"> <label>Mobile Number</label> <?php echo $form->field($user, 'phone')->textInput(['value' => $user->phone, 'class' => 'form-control'])->label(false); ?>
?> <?php echo $form->field($implink, 'url')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'logo')->fileInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'banner')->fileInput(['maxlength' => true]); ?> <?php echo '<label class="control-label">Establish</label>'; echo DatePicker::widget(['name' => 'College[establish]', 'value' => '01/01/1990', 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true, 'todayBtn' => true, 'format' => 'dd/mm/yyyy']]); ?> <?php echo $form->field($addresmodel, 'address')->textInput(['maxlength' => true]); ?> <?php echo $form->field($addresmodel, 'landmark')->textInput(['maxlength' => true]); ?> <?php if (empty($addresmodel->country_id)) { $addresmodel->country_id = 'IND'; } $coutrylist = ArrayHelper::map(\common\models\Countries::findAll(['is_visible' => 1, 'status' => 1]), 'countryID', 'countryName');
echo Html::activeDropDownList($model, "[{$num}]tipDokumenta", TipDokumentaObObrazovanii::namesMap(), ['class' => 'form-control']); echo Html::tag('div', $model->getFirstError('tipDokumenta'), ['class' => 'help-block']); echo '</div>'; echo '<div class="col-md-4 no-right-padding ' . (($model->hasErrors('kvalifikaciyaId') or $model->hasErrors('kvalifikaciyaNazvanie')) ? 'has-error' : '') . '">'; echo Select3::widget(['model' => $model, 'attribute' => "[{$num}]kvalifikaciyaId", 'secondAttribute' => "[{$num}]kvalifikaciyaNazvanie", 'data' => $kvalifikaciya, 'placeholder' => 'Выберите квалификацию', 'secondPlaceholder' => 'Введите наименование квалификации']); echo '</div>'; echo '<div class="col-md-3 no-left-padding field-seriya ' . ($model->hasErrors('seriya') ? 'has-error' : '') . '">'; echo Html::activeLabel($model, "[{$num}]seriya"); echo Html::activeTextInput($model, "[{$num}]seriya", ['class' => 'form-control', 'placeholder' => '', 'maxlength' => 40]); echo Html::tag('div', $model->getFirstError('seriya'), ['class' => 'help-block']); echo '</div>'; echo '<div class="col-md-3 ' . ($model->hasErrors('nomer') ? 'has-error' : '') . '">'; echo Html::activeLabel($model, "[{$num}]nomer"); echo Html::activeTextInput($model, "[{$num}]nomer", ['class' => 'form-control', 'maxlength' => 40]); echo Html::tag('div', $model->getFirstError('nomer'), ['class' => 'help-block']); echo '</div>'; echo '<div class="col-md-3 ' . ($model->hasErrors('dataVidachi') ? 'has-error' : '') . '">'; echo Html::activeLabel($model, '[{$num}]dataVidachi'); echo DatePicker::widget(['model' => $model, 'attribute' => "[{$num}]dataVidachi", 'language' => 'ru', 'type' => DatePicker::TYPE_COMPONENT_PREPEND, 'pluginOptions' => ['autoclose' => true, 'format' => 'dd.mm.yyyy'], 'options' => ['placeholder' => 'Выберите дату выдачи']]); echo Html::tag('div', $model->getFirstError('dataVidachi'), ['class' => 'help-block']); echo '</div>'; echo '<div class="col-md-3 no-right-padding ' . ($model->hasErrors('documentKopiya') ? 'has-error' : '') . '">'; echo Html::activeLabel($model, "[{$num}]documentKopiya"); echo \app\widgets\Files2Widget::widget(['model' => $model, 'attribute' => "[{$num}]documentKopiya"]); echo Html::tag('div', $model->getFirstError('documentKopiya'), ['class' => 'help-block']); echo Html::activeHiddenInput($model, "[{$num}]udalit", ['class' => 'udalit_input']); echo '</div>'; //panel-body end echo '</div>'; //panel end echo '</div>';
?> " class="btn btn-default right" style="margin-right:10px;"><i class="glyphicon glyphicon-repeat"></i></a> <br/> <br/> </div> <div style="clear:both"></div> <div id="jurnalar"> <?php $form = ActiveForm::begin(['id' => 'jurnalArForm', 'action' => [''], 'options' => ['target' => '_blank'], 'method' => 'get']); ?> <?php echo $form->field($model, 'partner')->widget(Select2::classname(), ['options' => ['placeholder' => 'All Customer ...'], 'pluginOptions' => ['tags' => true, 'allowClear' => true, 'minimumInputLength' => 2, 'ajax' => ['url' => $url, 'dataType' => 'json', 'data' => new JsExpression('function(term,page) { return {search:term}; }'), 'results' => new JsExpression('function(data,page) { return {results:data.results}; }')], 'initSelection' => new JsExpression($initScript)]]); ?> <br/> <?php echo DatePicker::widget(['model' => $model, 'attribute' => 'date_from', 'attribute2' => 'date_to', 'options' => ['placeholder' => 'Start date'], 'options2' => ['placeholder' => 'End date'], 'type' => DatePicker::TYPE_RANGE, 'form' => $form, 'pluginOptions' => ['format' => 'yyyy-MM-dd', 'autoclose' => true, 'startDate' => '01/07/2014'], 'convertFormat' => true]); ?> <div class="form-group"> <br/> <?php echo Html::submitButton('Search', ['class' => 'btn btn-primary']); ?> </div> <?php ActiveForm::end(); ?> </div> <div style="clear:both"></div> </div>
$this->params['breadcrumbs'][] = $this->title; ?> <div class="user-index"> <div class="page-header"> <h4><?php // Html::encode($this->title) ?> </h4> </div> <?php Pjax::begin(['id' => 'pjax-gridview']); ?> <?php $toolbars = [['content' => Html::a('<i class="glyphicon glyphicon-plus"></i>', ['user/create'], ['type' => 'button', 'title' => 'Add ' . $this->title, 'class' => 'btn btn-success']) . ' ' . Html::a('<i class="glyphicon glyphicon-repeat"></i>', ['user/index'], ['data-pjax' => 0, 'class' => 'btn btn-default', 'title' => 'Reset Grid'])], ['content' => '{dynagridFilter}{dynagridSort}{dynagrid}'], '{export}']; $panels = ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-book"></i> ' . $this->title . '</h3>']; $columns = [['class' => 'kartik\\grid\\SerialColumn', 'order' => DynaGrid::ORDER_FIX_LEFT], 'username', 'email', 'registration_ip:html', ['attribute' => 'created_at', 'format' => 'date', 'value' => function ($model) { return $model->created_at; }, 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'created_at', 'pluginOptions' => ['format' => 'dd-M-yyyy', 'todayHighlight' => true], 'options' => ['class' => 'form-control']])], ['class' => 'kartik\\grid\\BooleanColumn', 'attribute' => 'flags', 'vAlign' => 'middle'], ['class' => 'kartik\\grid\\ActionColumn', 'dropdown' => false, 'vAlign' => 'middle', 'viewOptions' => ['title' => 'view', 'data-toggle' => 'tooltip'], 'updateOptions' => ['title' => 'update', 'data-toggle' => 'tooltip'], 'deleteOptions' => ['title' => 'delete', 'data-toggle' => 'tooltip']]]; $dynagrid = DynaGrid::begin(['id' => 'user-grid', 'columns' => $columns, 'theme' => 'panel-primary', 'showPersonalize' => true, 'storage' => 'db', 'allowSortSetting' => true, 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'showPageSummary' => true, 'floatHeader' => true, 'pjax' => false, 'panel' => $panels, 'toolbar' => $toolbars], 'options' => ['id' => 'user']]); DynaGrid::end(); Pjax::end(); ?> </div>
<?php use yii\helpers\Html; use yii\bootstrap\Modal; use kartik\widgets\ActiveForm; use kartik\widgets\DatePicker; /* @var $this yii\web\View */ /* @var $model app\models\Peso */ $this->title = 'Nuevo Peso'; $this->params['breadcrumbs'][] = ['label' => 'Pesos', 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; ?> <div class="peso-create"> <h1><?php echo Html::encode($this->title); ?> </h1> <?php echo '<label class="control-label">Birth Date</label>'; echo DatePicker::widget(['model' => $model, 'attribute' => 'date_1', 'options' => ['placeholder' => 'Enter birth date ...'], 'pluginOptions' => ['autoclose' => true]]); ?> <?php echo $this->render('_form', ['model' => $model]); ?> </div>
if (id !== "") { $.ajax("' . Url::to(['service/search-customer']) . '?id=" + id, { dataType: "json" }).done(function(data) { callback(data.results); } ); } }')], 'options' => ['placeholder' => 'Select Sales ...']]); ?> </div> <div class="form-group"> <?php echo DatePicker::widget(['model' => $model, 'attribute' => 'date_begin', 'options' => ['placeholder' => 'Start date'], 'form' => $form, 'pluginOptions' => ['format' => 'yyyy-MM-dd', 'autoclose' => true, 'startDate' => '2014-07-01'], 'convertFormat' => true]); ?> </div> <div class="form-group"> <?php echo Html::submitButton('Search', ['class' => 'btn btn-primary']); ?> <?php echo Html::resetButton('Reset', ['class' => 'btn btn-default']); ?> </div> <?php ActiveForm::end(); ?>
<?php $form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]); ?> <div class="row"> <div class="col-xs-2"> <?php echo Html::a('Nueva Actividad', ['create'], ['class' => 'btn btn-success']); ?> </div> <div class="col-xs-3"> <?php $inicial = empty($searchModel->rango_inicial) ? date('Y-m-d') : $searchModel->rango_inicial; $final = empty($searchModel->rango_final) ? date('Y-m-d') : $searchModel->rango_final; echo DatePicker::widget(['name' => 'rango_inicial', 'value' => $inicial, 'type' => DatePicker::TYPE_RANGE, 'name2' => 'rango_final', 'value2' => $final, 'separator' => 'a', 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-m-dd']]); ?> </div> <div class="col-xs-2"> <?php echo Html::dropDownList('usuario', Yii::$app->user->identity->id, ArrayHelper::map(\common\models\User::find()->orderBy('nombre')->all(), 'id', 'nombre'), array('class' => 'form-control')); ?> </div> <div class="col-xs-2"> <?php echo Html::submitButton('Filtrar Fechas', ['class' => 'btn btn-primary']);
//use kartik\grid\GridView; use yii\grid\GridView; use miloschuman\highcharts\Highcharts; $this->title = 'Yandex метрика'; $this->params['breadcrumbs'][] = $this->title; if (Yii::$app->user->identity->hasRouter('/default/settings')) { echo Html::a('<i class="glyphicon glyphicon-cog"></i> Настройки', ['settings'], ['class' => 'btn btn-default']); } ?> <div style="width: 300px;float: right;"> <?php $form = ActiveForm::begin(['method' => 'get']); ?> <div style="width: 252px;display: inline-block;"> <?php echo DatePicker::widget(['name' => 'date1', 'value' => date('Y-m-d', strtotime($returt->date1)), 'type' => DatePicker::TYPE_RANGE, 'name2' => 'date2', 'value2' => date('Y-m-d', strtotime($returt->date2)), 'separator' => '<i class="glyphicon glyphicon-resize-horizontal"></i>', 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]); ?> </div> <?php echo Html::submitButton('<i class="glyphicon glyphicon-refresh"></i>', ['class' => 'btn btn-default', 'style' => 'vertical-align: top;']); ?> <?php ActiveForm::end(); ?> </div> <div class="clearfix"></div> <?php echo Highcharts::widget(['options' => ['title' => false, 'xAxis' => ['categories' => ArrayHelper::getColumn($returt->row, function ($element) { return date('d.m', strtotime($element['date'])); })], 'yAxis' => ['title' => ['text' => 'Количество']], 'series' => [['name' => 'Визиты', 'data' => ArrayHelper::getColumn($returt->row, function ($element) { return (int) $element['visits'];
$this->params['breadcrumbs'][] = $this->title; ?> <div class="pembelian-index"> <!-- <div class="ui divider"></div> --> <?php // echo $this->render('_search', ['model' => $searchModel]); ?> <?php Pjax::begin(['id' => 'pembelian-index-pjax']); ?> <?php $total_lot = 1; ?> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'responsive' => true, 'hover' => true, 'resizableColumns' => false, 'showPageSummary' => true, 'showFooter' => true, 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-shopping-cart"></i> ' . Html::encode($this->title) . ' - ' . '(<span class="hidden-xs">tanggal</span> transaksi terakhir ' . ($latestDate[1] == 1 ? 'belum ada' : $latestDate[1]) . ')</h3>', 'before' => '<div class="row">' . '<div class="col-xs-2 col-lg-1">' . (Mimin::filterRoute($this->context->id . '/create') ? Html::a('Create', ['create', 'date' => $dates[1]], ['class' => 'btn btn-success', 'data-pjax' => '0', 'data-toggle' => "modal", 'data-target' => "#myModal", 'data-title' => "Create Data Pembelian", 'data-size' => "modal-lg"]) : '') . ' ' . '</div>' . '<div class="col-xs-2 col-md-1">' . Html::dropDownList('per-page', $perpage, ['5' => '5', '10' => '10', '20' => '20', '50' => '50', '100' => '100', 'all' => 'all'], ['id' => 'per-page', 'class' => 'form-control']) . '</div>' . '<div class="col-xs-5 col-sm-4 col-md-3 col-lg-2">' . DatePicker::widget(['name' => 'grid_date', 'value' => $dates[1], 'removeButton' => false, 'options' => ['placeholder' => 'Tgl Grid ...'], 'readonly' => true, 'pluginOptions' => ['todayHighlight' => true, 'todayBtn' => true, 'format' => 'dd-M-yyyy', 'autoclose' => true, 'buttonClose' => false], 'pluginEvents' => ["changeDate" => "function(e) {\n \$.pjax.reload({\n \t\t\t\t\t\t\t\turl: '" . Url::to(['index']) . "?per-page='+" . $perpage . "+'&date='+e.format(0,'yyyy-m-d'),\n \t\t\t\t\t\t\t\tcontainer: '#pembelian-index-pjax',\n \t\t\t\t\t\t\t\ttimeout: 1,\n \t\t\t\t\t\t\t});\n }"]]) . '</div>' . '</div>'], 'toolbar' => [['content' => Html::a('<i class="glyphicon glyphicon-repeat"></i>', ['index'], ['data-pjax' => 0, 'class' => 'btn btn-default', 'title' => 'Reset Grid'])], ButtonExport::widget()], 'export' => ['fontAwesome' => true], 'columns' => [['class' => 'kartik\\grid\\SerialColumn'], ['attribute' => 'TGL', 'header' => 'Tanggal', 'filter' => false, 'format' => ['date', 'php:d M Y'], 'options' => ['width' => '125px'], 'hAlign' => 'center', 'vAlign' => 'middle'], ['attribute' => 'NOMOR', 'label' => 'Nomor', 'options' => ['width' => '100px'], 'hAlign' => 'center', 'vAlign' => 'middle'], ['attribute' => 'EMITEN_KODE', 'label' => 'Emiten', 'options' => ['width' => '100px'], 'hAlign' => 'center', 'vAlign' => 'middle'], ['attribute' => 'SECURITAS_KODE', 'label' => 'Securitas', 'options' => ['width' => '100px'], 'hAlign' => 'center', 'vAlign' => 'middle'], ['attribute' => 'JMLLOT', 'label' => 'Jml Lot', 'format' => ['decimal', 2], 'options' => ['width' => '100px'], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle', 'pageSummary' => true, 'pageSummaryFunc' => GridView::F_SUM], ['attribute' => 'JMLSAHAM', 'label' => 'Jml Saham', 'format' => ['decimal', 2], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle', 'pageSummary' => true, 'pageSummaryFunc' => GridView::F_SUM], ['attribute' => 'HARGA', 'label' => 'Harga', 'format' => ['decimal', 2], 'options' => ['width' => '100px'], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle', 'pageSummary' => true, 'pageSummaryFunc' => GridView::F_SUM], ['attribute' => 'KOM_BELI', 'label' => 'Komisi', 'format' => ['decimal', 2], 'options' => ['width' => '100px'], 'headerOptions' => ['style' => 'text-align:center'], 'value' => function ($data) { // 2. Perhitungan Total Komisi = kom_beli * harga * share / 100 $bruto = $data->JMLSAHAM * $data->HARGA; $komisi_total = $data->KOM_BELI * $bruto / 100; return $komisi_total; }, 'hAlign' => 'right', 'vAlign' => 'middle', 'pageSummary' => true, 'pageSummaryFunc' => GridView::F_SUM], ['attribute' => 'TOTAL_BELI', 'format' => ['decimal', 2], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle', 'pageSummary' => true, 'pageSummaryFunc' => GridView::F_SUM], ['class' => 'kartik\\grid\\ActionColumn', 'hAlign' => 'center', 'vAlign' => 'middle', 'options' => ['width' => '100px'], 'template' => Mimin::filterTemplateActionColumn(['update', 'delete'], $this->context->route), 'buttons' => ['update' => function ($url, $model) { $icon = '<span class="glyphicon glyphicon-pencil"></span>'; return Html::a($icon, $url, ['class' => 'btn btn-default btn-xs', 'data-pjax' => '0', 'data-toggle' => "modal", 'data-target' => "#myModal", 'data-title' => "Update Data Pembelian", 'data-size' => "modal-lg"]); }, 'delete' => function ($url, $model) { $icon = '<span class="glyphicon glyphicon-trash"></span>'; return Html::a($icon, $url, ['class' => 'btn btn-default btn-xs', 'data-confirm' => "Apakah anda mau menghapus data ini?", 'data-method' => 'post']); }]]]]); ?> <?php $this->registerJs(' $("#per-page").on("change", function () {
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'formConfig' => ['showLabels' => true, 'showErrors' => true, 'labelSpan' => 2, 'deviceSize' => ActiveForm::SIZE_SMALL]]); //////////////////////////////////////////////////////////// // Формируем список из базы по типам контрактов. ?> <div class="contract-form"> <?php echo $form->field($model, 'ContractNumber')->textInput(['maxlength' => true]); ?> <?php echo DatePicker::widget(['model' => $model, 'form' => $form, 'attribute' => 'Period', 'language' => 'ru', 'options' => ['placeholder' => 'Начало действия'], 'type' => DatePicker::TYPE_COMPONENT_APPEND, 'pluginOptions' => ['format' => 'yyyy/mm/dd', 'autoclose' => true]]); ?> <?php echo DatePicker::widget(['model' => $model, 'form' => $form, 'attribute' => 'DateOfSigning', 'language' => 'ru', 'options' => ['placeholder' => 'Конец действия'], 'type' => DatePicker::TYPE_COMPONENT_APPEND, 'pluginOptions' => ['format' => 'yyyy/mm/dd', 'autoclose' => true]]); ?> <?php echo $form->field($model, 'Name')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'status')->radioList(array('1' => 'В работе', 0 => 'Закрыт')); ?> <?php echo $form->field($model, 'AlfrescoLink')->input('url', ['placeholder' => 'Введите ссылку на электронную версию документа...']); ?>
?> </div> </div> <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo"> <div class="panel-body"> <h2>Expense Form</h2><br/> <?php $form = ActiveForm::begin(['action' => Yii::$app->getUrlManager()->createUrl('transactions/createexpense')]); ?> <div class="form-group"> <?php echo DatePicker::widget(['model' => $ledgerModel, 'attribute' => 'transactionDate', 'options' => ['placeholder' => 'Enter Transactions Date'], 'pluginOptions' => ['todayHighlight' => true, 'todayBtn' => true, 'format' => 'dd-mm-yyyy', 'autoclose' => true]]); ?> </div> <div class="form-group"> <?php echo $form->field($ledgerModel, 'subHeadID')->dropDownList(ArrayHelper::map($expenseSubheadList, 'subHeadID', 'name'), ['prompt' => 'Select Subhead', 'id' => 'subHeadID-expense']); ?> </div> <div class="form-group"> <?php echo $form->field($ledgerModel, 'headID')->dropDownList([''], ['prompt' => 'Select Subhead', 'id' => 'headID-expense']); ?> </div> <div class="form-group"> <?php echo $form->field($ledgerModel, 'voucherNO')->textInput(['placeholder' => 'Select Voucher No']);
<div class="tab-pane active" id="home"> <?php echo $form->field($model, 'type_id')->radioList(['1' => Yii::t('app', 'Revenue'), '2' => Yii::t('app', 'Expense')], ['itemOptions' => ['class' => 'radio-inline', 'labelOptions' => array('style' => 'padding:5px;')]])->label(''); ?> <div class="row"> <div class="col-sm-2"> <?php echo $form->field($model, 'account_id')->dropDownList($accountItems); ?> </div> </div> <div class="row"> <div class="col-sm-2"> <?php echo DatePicker::widget(['model' => $model, 'form' => $form, 'attribute' => 'date', 'type' => DatePicker::TYPE_INPUT, 'size' => 'sm', 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true, 'format' => 'yyyy-mm-dd']]); ?> </div> </div> <div class="row"> <div class="col-sm-2"> <?php echo $form->field($model, 'value')->textInput(['size' => 10]); ?> </div> </div> <div class="row"> <div class="col-sm-3"> <?php
break; case 5: // Текст echo Html::activeTextarea($model, $attr_value, ['class' => 'form-control', 'id' => $attr_id]); break; case 6: // Список (дочерние документы echo Select2::widget(['model' => $model, 'attribute' => $attr_value, 'data' => Document::getAll($field['param']), 'options' => ['id' => $attr_id, 'placeholder' => ''], 'pluginOptions' => ['allowClear' => true, 'class' => 'form-control', 'id' => $attr_id]]); break; case 8: // Файл (выбор с сервера) echo InputFile::widget(['controller' => 'elfinder', 'template' => '<div class="input-group">{input}<span class="input-group-btn">{button}</span></div>', 'options' => ['class' => 'form-control', 'id' => $attr_id], 'buttonOptions' => ['class' => 'btn btn-default'], 'buttonName' => Yii::t('document', 'Выбрать файл'), 'multiple' => false, 'name' => 'Document[fields][' . $field_id . '][data][' . $data_id . '][value]', 'value' => isset($model->fields[$field_id]['data'][$data_id]['value']) ? $model->fields[$field_id]['data'][$data_id]['value'] : null]); break; case 7: // Дата echo DatePicker::widget(['model' => $model, 'attribute' => $attr_value, 'options' => ['id' => $attr_id, 'placeholder' => ''], 'pluginOptions' => ['format' => 'dd.mm.yyyy', 'class' => 'form-control', 'id' => $attr_id]]); break; } } ?> </div> <div class="help-block"> <?php echo $attr_error; ?> </div> </div> </div> <div class="col-lg-6"> <div class="<?php echo $attr_pos_class;
// echo $this->render('_search', ['model' => $searchModel]); ?> <p> <?php echo Html::a(Yii::t('app', 'เพิ่มรายการกิจกรรม'), ['create'], ['class' => 'btn btn-success']); ?> </p> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'rowOptions' => function ($model) { if ($model->patient_flag == 1) { return ['class' => 'info']; } else { return []; } }, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'date', 'value' => 'date', 'options' => ['class' => 'col-md-3'], 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'date', 'language' => 'th', 'options' => ['placeholder' => 'เลือกวันที่'], 'pluginOptions' => ['format' => 'yyyy-mm-dd', 'todayHighlight' => true, 'autoclose' => true]]), 'format' => 'html'], ['attribute' => 'period', 'filter' => NurseEvent::itemAlias('shift'), 'value' => function ($model) { return $model->shiftName; }], ['value' => function ($model) { return Html::a('เพิ่มข้อมูลผู้ป่วย', ['nurse-patient/create', 'event_ref' => $model->ref], ['class' => 'btn btn-default btn-block']); }, 'format' => 'html'], ['value' => function ($model) { return Html::a('เพิ่มข้อมูล Staff Mix', ['nurse-staffevent/create', 'event_ref' => $model->ref], ['class' => 'btn btn-default btn-block']); }, 'format' => 'html'], ['value' => function ($model) { return Html::a('พิมพ์ใบมอบหมายงาน', ['nurse-patient/assign-report', 'event_ref' => $model->ref], ['target' => '_blank', 'class' => 'btn btn-primary btn-block']); }, 'format' => 'raw'], ['value' => function ($model) { return Html::a('พิมพ์ใบรายชื่อผู้ป่วย', ['nurse-patient/daily-report', 'event_ref' => $model->ref], ['target' => '_blank', 'class' => 'btn btn-default btn-block']); }, 'format' => 'raw'], ['class' => 'yii\\grid\\ActionColumn', 'header' => 'ลบ', 'template' => '{delete}']]]); ?> </div>
/* @var $searchModel app\models\EventSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ ?> <div class="event-index"> <h1><?php echo Html::encode($this->title); ?> </h1> <?php // echo $this->render('_search', ['model' => $searchModel]); ?> <?php $form = ActiveForm::begin(['action' => '/event/otchet', 'options' => ['target' => '_blank']]); echo DatePicker::widget(['name' => 'from_date', 'type' => DatePicker::TYPE_RANGE, 'name2' => 'to_date', 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]); echo '<br>'; echo Html::submitButton('Создать отчет', ['class' => 'btn btn-primary']); ActiveForm::end(); ?> <br><br> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'rowOptions' => function ($model, $key, $index, $grid) { if ($model->updated_at !== $model->created_at) { return ['style' => 'background-color:#8ECEE7;']; }
<div class="col-md-4"> <?php echo $form->field($model, 'firstName'); ?> </div> <div class="col-md-4"> <?php echo $form->field($model, 'lastName'); ?> </div> <div class="col-md-4"> <?php echo '<label class="control-label">Birth Date</label>'; ?> <?php echo DatePicker::widget(['model' => $model, 'attribute' => 'dob', 'name' => 'dob', 'size' => 'md', 'options' => ['placeholder' => 'Enter birth date ...'], 'pluginOptions' => ['autoclose' => true, 'format' => 'mm/dd/yyyy']]); ?> </div> </div> <div class="row"> <div class="col-md-4"> <?php echo $form->field($model, 'age'); ?> </div> <div class="col-md-4"> <?php echo $form->field($model, 'gender')->radioList(['1' => 'Male', 2 => 'Female']); ?> </div> <div class="col-md-4">
/* @var $this yii\web\View */ /* @var $model app\models\ReportSearch */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="report-search"> <?php $form = ActiveForm::begin(['action' => ['index'], 'method' => 'get']); ?> <div class="row"> <div class="col-md-4"> <?php echo '<label class="control-label">Período</label>'; echo DatePicker::widget(['model' => $model, 'attribute' => 'start_date', 'attribute2' => 'end_date', 'language' => 'pt', 'type' => DatePicker::TYPE_RANGE, 'separator' => 'até', 'options' => ['placeholder' => ''], 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true, 'format' => 'yyyy-mm-dd']]); ?> </div> <div class="col-md-4"> <?php echo $form->field($model, 'user_id')->dropDownList(ArrayHelper::map(User::find()->where(['role_id' => 2])->orderBy("username ASC")->all(), 'id', 'username'), ['prompt' => 'Todos']); ?> </div> <div class="col-md-4"> <?php echo $form->field($model, 'location_id')->dropDownList(ArrayHelper::map(Location::find()->where(['is_active' => 1])->orderBy("fullname ASC")->all(), 'id', 'fullname'), ['prompt' => 'Todos']); ?> </div> </div> <div class="row"> <div class="col-md-4">
<div class="col col1"> <label>Dates Attend</label> <?php echo DatePicker::widget(['name' => 'Certification[attended_date]', 'value' => '01/01/1990', 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true, 'todayBtn' => true, 'format' => 'dd/mm/yyyy']]); ?> </div> <div class="col col2 clearfix"> <label>Dates of Completion</label> <?php echo DatePicker::widget(['name' => 'Certification[completion_date]', 'value' => '01/01/1990', 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true, 'todayBtn' => true, 'format' => 'dd/mm/yyyy']]); ?> </div> <div class="col col3 clearfix"> <label>Valid Up To</label> <?php echo DatePicker::widget(['name' => 'Certification[valid_upto]', 'value' => '01/01/1990', 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true, 'todayBtn' => true, 'format' => 'dd/mm/yyyy']]); ?> </div> </div> <!--<div class="common smallCheckBox"> <input type="checkbox" id="forCertificateExpire" name="Certification[is_expired]" /> <label for="forCertificateExpire">This certificate doesn't expire</label> </div>--> <?php echo Html::submitButton($certfmodel->isNewRecord ? 'Add <i class="plus-small"></i>' : 'Update', ['class' => 'btn btn-default addmarginR10', 'id' => 'certification-subbtn']); ?> <?php echo Html::resetButton('Cancle', array('class' => 'btn btn-default')); ?> <?php ActiveForm::end();
$form = ActiveForm::begin(['action' => ['index'], 'method' => 'get']); ?> <div class="row"> <div class="col-sm-11"> <?php echo '<label class="control-label">' . Yii::t('app', 'From') . '</label>'; echo DatePicker::widget(['model' => $model, 'attribute' => 'start_date', 'type' => DatePicker::TYPE_COMPONENT_PREPEND, 'options' => ['placeholder' => ''], 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true, 'format' => 'yyyy-mm-dd']]); ?> </div> </div><p> <div class="row"> <div class="col-sm-11"> <?php echo '<label class="control-label">' . Yii::t('app', 'To') . '</label>'; echo DatePicker::widget(['model' => $model, 'attribute' => 'end_date', 'type' => DatePicker::TYPE_COMPONENT_PREPEND, 'options' => ['placeholder' => ''], 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true, 'format' => 'yyyy-mm-dd']]); ?> </div> </div><p> <?php echo $form->field($model, 'type_id')->dropDownList(['1' => Yii::t('app', 'Revenue'), '2' => Yii::t('app', 'Expense')], ['prompt' => Yii::t('app', 'All')]); //->dropDownList(ArrayHelper::map(Type::find()->all(), 'id_type', 'desc_type'),['prompt'=>Yii::t('app', 'All')]) ?> <?php echo $form->field($model, 'category_id')->dropDownList(ArrayHelper::map(Category::find()->where(['user_id' => Yii::$app->user->identity->id])->orderBy("desc_category ASC")->all(), 'id_category', 'desc_category'), ['prompt' => Yii::t('app', 'All')]); ?> <?php echo $form->field($model, 'value');
public function date($options = []) { $this->parts['{input}'] = DatePicker::widget(['model' => $this->model, 'attribute' => $this->attribute, 'options' => $options]); return $this; }
?> <div class="user-statistics-form"> <?php $js = 'function beforeValidate(form) {if ( form.data("cancel") {this.validateOnSubmit = false;this.beforeValidate = "";form.submit();return false;}return true;}'; $form = ActiveForm::begin([]); ?> <div class="one-column pdt-one-column help-bg-gray" style="width: 50%; height: 400px; float: left;"> <div class="control-group"> <label class="control-label-f">TRANSACTION DATE</label> <div class="f-full-size" style="margin-bottom: 10px;"> <?php echo DatePicker::widget([ 'name' => 'trx_start_date', 'value' => Yii::$app->request->post('trx_start_date'), 'name2' => 'trx_end_date', 'value2' => Yii::$app->request->post('trx_end_date'), 'options' => ['placeholder' => 'Start date'], 'options2' => ['placeholder' => 'End date'], 'type' => DatePicker::TYPE_RANGE, 'pluginOptions' => [ 'autoclose' => true, ] ]); ?> <?= Html::submitButton('', ['class' => 'glyphicon glyphicon-search', 'name' => 'processTransactionDateFilter']) ?> </div> </div> <!-- <div class="control-group"> <label class="control-label-f">USER</label> <div class="f-full-size"> <?= Html::dropDownList
/** * @param null $options * @param null $pluginOptions * * @return string * @throws \Exception */ public function getItem($options = null, $pluginOptions = null) { switch ($this->type) { case self::TYPE_TEXT: return Html::input('text', 'Setting[' . $this->code . ']', $this->value, $options != null ? $options : ['placeholder' => $this->getName(), 'class' => 'form-control']); case self::TYPE_EMAIL: return Html::input('email', 'Setting[' . $this->code . ']', $this->value, $options != null ? $options : ['placeholder' => $this->getName(), 'class' => 'form-control']); case self::TYPE_NUMBER: return Html::input('number', 'Setting[' . $this->code . ']', $this->value, $options != null ? $options : ['placeholder' => $this->getName(), 'class' => 'form-control']); case self::TYPE_TEXTAREA: return Html::textarea('Setting[' . $this->code . ']', $this->value, $options != null ? $options : ['placeholder' => $this->getName(), 'class' => 'form-control']); case self::TYPE_COLOR: return ColorInput::widget(['value' => $this->value, 'name' => 'Setting[' . $this->code . ']', 'options' => $options != null ? $options : ['class' => 'form-control']]); case self::TYPE_DATE: return DatePicker::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['format' => 'yyyy-mm-dd', 'todayHighlight' => true]]); case self::TYPE_TIME: return TimePicker::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['minuteStep' => 1, 'showSeconds' => true, 'showMeridian' => false]]); case self::TYPE_DATETIME: return DateTimePicker::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => ['format' => 'yyyy-mm-dd H:i:s', 'todayHighlight' => true]]); case self::TYPE_PASSWORD: return PasswordInput::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['showMeter' => true, 'toggleMask' => false]]); case self::TYPE_ROXYMCE: return RoxyMceWidget::widget(['id' => 'Setting_' . $this->code, 'name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'action' => Url::to(['roxymce/default']), 'options' => $options != null ? $options : ['title' => $this->getName()], 'clientOptions' => $pluginOptions != null ? $pluginOptions : []]); case self::TYPE_SELECT: return Select2::widget(['value' => $this->value, 'name' => 'Setting[' . $this->code . ']', 'data' => $this->getStoreRange(), 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => ['allowClear' => true]]); case self::TYPE_MULTI_SELECT: $options['multiple'] = true; if (!isset($options['class'])) { $options['class'] = 'form-control'; } return Select2::widget(['name' => 'Setting[' . $this->code . ']', 'value' => explode(",", $this->value), 'data' => $this->getStoreRange(), 'options' => $options, 'pluginOptions' => ['allowClear' => true]]); case self::TYPE_FILE_PATH: $value = Yii::getAlias($this->store_dir) . DIRECTORY_SEPARATOR . $this->value; return FileInput::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $value, 'options' => $options != null ? $options : ['class' => 'form-control', 'multiple' => false], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['previewFileType' => 'any', 'showRemove' => false, 'showUpload' => false, 'initialPreview' => !$this->isNewRecord ? [$this->value] : []]]); case self::TYPE_FILE_URL: $value = $this->store_url . '/' . $this->value; return FileInput::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $value, 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['previewFileType' => 'any', 'showRemove' => false, 'showUpload' => false, 'initialPreviewAsData' => true, 'initialPreviewFileType' => self::fileType(pathinfo($this->value, PATHINFO_EXTENSION)), 'initialPreview' => !$this->isNewRecord ? $value : [], 'initialCaption' => $this->value]]); case self::TYPE_PERCENT: return RangeInput::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'html5Options' => ['min' => 0, 'max' => 100, 'step' => 1], 'options' => $options != null ? $options : ['class' => 'form-control'], 'addon' => ['append' => ['content' => '%']]]); case self::TYPE_SWITCH: $selector = explode(',', $this->store_range); if (count($selector) != 2) { throw new ErrorException(Yii::t('setting', 'Switch Field should have store with 2 value, and negative is first. Example: no,yes'), 500); } return Html::hiddenInput('Setting[' . $this->code . ']', $selector[0]) . SwitchInput::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $selector[1], 'containerOptions' => ['class' => 'nv-switch-container'], 'options' => $options != null ? $options : [], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['state' => $this->value == $selector[1], 'size' => 'small', 'offText' => ucfirst($selector[0]), 'onText' => ucfirst($selector[1])]]); case self::TYPE_CHECKBOX: $random = rand(1000, 9999); return Html::checkboxList('Setting[' . $this->code . ']', explode(",", $this->value), $this->getStoreRange(), $options != null ? $options : ['class' => 'nv-checkbox-list checkbox', 'item' => function ($index, $label, $name, $checked, $value) use($random) { $html = Html::beginTag('div'); $html .= Html::checkbox($name, $checked, ['id' => 'Setting_checkbox_' . $label . '_' . $index . '_' . $random, 'value' => $value]); $html .= Html::label($label, 'Setting_checkbox_' . $label . '_' . $index . '_' . $random); $html .= Html::endTag('div'); return $html; }]); case self::TYPE_RADIO: $random = rand(1000, 9999); return Html::radioList('Setting[' . $this->code . ']', $this->value, $this->getStoreRange(), $options != null ? $options : ['class' => 'nv-checkbox-list radio', 'item' => function ($index, $label, $name, $checked, $value) use($random) { $html = Html::beginTag('div'); $html .= Html::radio($name, $checked, ['id' => 'Setting_radio_' . $label . '_' . $index . '_' . $random, 'value' => $value]); $html .= Html::label($label, 'Setting_radio_' . $label . '_' . $index . '_' . $random); $html .= Html::endTag('div'); return $html; }]); case self::TYPE_SEPARATOR: return '<hr>'; default: return Html::input('text', 'Setting[' . $this->code . ']', $this->value, $options != null ? $options : ['placeholder' => $this->getName(), 'class' => 'form-control']); } }
?> <div class="asset-index"> <?php // echo $this->render('_search', ['model' => $searchModel]); ?> <?php Pjax::begin(['id' => 'pjax-gridview']); ?> <?php $this->registerJs(' var startDate = "' . $dates[0] . '"; var endDate = "' . $dates[2] . '"; '); ?> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'responsive' => true, 'responsiveWrap' => true, 'hover' => true, 'resizableColumns' => false, 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-th"></i> <span class="hidden-xs"></span> ' . Html::encode($this->title) . '</h3>', 'before' => '<div class="row">' . '<div class="col-xs-2 col-lg-1">' . (Mimin::filterRoute($this->context->id . '/create') ? Html::a('Create', ['create'], ['class' => 'btn btn-success', 'data-pjax' => '0', 'data-toggle' => "modal", 'data-title' => "Create Data Asset"]) : '') . ' ' . '</div>' . '</div><br>' . '<table class="table table-condensed" style="width:50%">' . '<tr>' . '<td> start' . DatePicker::widget(['name' => 'start', 'value' => $dates[1], 'removeButton' => false, 'options' => ['placeholder' => 'Start ...'], 'readonly' => true, 'pluginOptions' => ['todayHighlight' => true, 'todayBtn' => true, 'format' => 'dd-M-yyyy', 'autoclose' => true, 'buttonClose' => false], 'pluginEvents' => ["changeDate" => "function(e) {\n startDate = e.format(0,'yyyy-m-d');\n \$.pjax.reload({\n \t\t\t\t\t\t\t\turl: '" . Url::to(['index']) . "?start='+startDate+'&end='+endDate,\n \t\t\t\t\t\t\t\tcontainer: '#pjax-gridview',\n \t\t\t\t\t\t\t\ttimeout: 1,\n \t\t\t\t\t\t\t});\n }"]]) . '</td>' . '<td> <br>s.d </td>' . '<td> end' . DatePicker::widget(['name' => 'end', 'value' => $dates[3], 'removeButton' => false, 'options' => ['placeholder' => 'End ...'], 'readonly' => true, 'pluginOptions' => ['todayHighlight' => true, 'todayBtn' => true, 'format' => 'dd-M-yyyy', 'autoclose' => true, 'buttonClose' => false], 'pluginEvents' => ["changeDate" => "function(e) {\n endDate = e.format(0,'yyyy-m-d');\n \$.pjax.reload({\n \t\t\t\t\t\t\t\turl: '" . Url::to(['index']) . "?start='+startDate+'&end='+endDate,\n \t\t\t\t\t\t\t\tcontainer: '#pjax-gridview',\n \t\t\t\t\t\t\t\ttimeout: 1,\n \t\t\t\t\t\t\t});\n }"]]) . '</td>' . '</tr>' . '</table>'], 'toolbar' => [['content' => Html::a('<i class="glyphicon glyphicon-repeat"></i>', ['index'], ['data-pjax' => 0, 'class' => 'btn btn-default', 'title' => 'Reset Grid'])], ButtonExport::widget()], 'export' => ['fontAwesome' => true], 'columns' => [['class' => 'kartik\\grid\\SerialColumn'], ['attribute' => 'TGL', 'format' => ['date', 'php:d-M-Y'], 'filter' => false, 'hAlign' => 'center', 'vAlign' => 'middle', 'options' => ['width' => '200px']], ['attribute' => 'KAS_BANK', 'format' => ['decimal', 2], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle'], ['attribute' => 'TRAN_JALAN', 'format' => ['decimal', 2], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle'], ['attribute' => 'INV_LAIN', 'format' => ['decimal', 2], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle'], ['attribute' => 'STOK_SAHAM', 'format' => ['decimal', 2], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle'], ['class' => 'kartik\\grid\\ActionColumn', 'hAlign' => 'center', 'vAlign' => 'middle', 'options' => ['width' => '100px'], 'template' => Mimin::filterTemplateActionColumn(['view', 'update', 'delete'], $this->context->route), 'buttons' => ['view' => function ($url, $model) { $icon = '<span class="glyphicon glyphicon-eye-open"></span>'; return Html::a($icon, $url, ['class' => 'btn btn-default btn-xs', 'data-pjax' => '0', 'data-toggle' => "modal", 'data-target' => "#myModal", 'data-title' => "View Data Asset"]); }, 'update' => function ($url, $model) { $icon = '<span class="glyphicon glyphicon-pencil"></span>'; return Html::a($icon, $url, ['class' => 'btn btn-default btn-xs', 'data-pjax' => '0']); }, 'delete' => function ($url, $model) { $icon = '<span class="glyphicon glyphicon-trash"></span>'; return Html::a($icon, $url, ['class' => 'btn btn-default btn-xs', 'data-confirm' => "Apakah anda mau menghapus data ini?", 'data-method' => 'post']); }]]]]); ?> <?php Pjax::end(); ?> </div>
/* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = 'Report Emiten'; $this->params['breadcrumbs'][] = $this->title; Pjax::begin(['id' => 'pjax-report']); ?> <div class="report-emiten-index"> <!-- <div class="ui divider"></div> --> <?php // echo $this->render('_search', ['model' => $searchModel]); ?> <?php $form = ActiveForm::begin(['action' => ['update'], 'options' => []]); ?> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'responsive' => true, 'responsiveWrap' => true, 'hover' => true, 'resizableColumns' => false, 'showPageSummary' => true, 'showFooter' => true, 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-th"></i> <span class="hidden-xs"></span> ' . Html::encode($this->title) . '</h3>', 'before' => '<div class="row">' . '<div class="col-xs-5 col-md-4 col-md-3 col-lg-2">' . DatePicker::widget(['name' => 'reportDate', 'value' => $reportDates[1], 'options' => ['id' => 'reportDate', 'placeholder' => 'Tgl Emiten ...'], 'readonly' => true, 'removeButton' => false, 'pluginOptions' => ['todayHighlight' => true, 'todayBtn' => true, 'format' => 'dd-M-yyyy', 'autoclose' => true], 'pluginEvents' => ["changeDate" => "function(e) {\n changeDate(e.format(0,'yyyy-m-d'))\n }"]]) . '</div>' . '<div class="col-xs-5 col-sm-4 col-md-3 col-lg-2">' . '</div>' . '</div>', 'after' => Html::submitButton('<i class="glyphicon glyphicon-floppy-disk"></i> Simpan', ['class' => 'btn btn-success']) . ' ' . Html::a('<i class="glyphicon glyphicon-trash"></i> Hapus', ['delete', 'date' => $reportDates[1]], ['class' => 'btn btn-danger', 'data-method' => 'post', 'data-pjax' => '0', 'data-confirm' => 'Apakah data akan dihapus?']) . ' ', 'footer' => false], 'toolbar' => [['content' => Html::a('<i class="glyphicon glyphicon-repeat"></i>', ['index'], ['data-pjax' => 0, 'class' => 'btn btn-default', 'title' => 'Reset Grid'])], ButtonExport::widget()], 'export' => ['fontAwesome' => true], 'columns' => [['class' => 'kartik\\grid\\SerialColumn'], ['attribute' => 'EMITEN_KODE', 'label' => 'Kode', 'filter' => false, 'format' => 'raw', 'options' => ['width' => '100px'], 'hAlign' => 'center', 'vAlign' => 'middle', 'value' => function ($data) { return Html::a($data->EMITEN_KODE, '', ['onclick' => 'setFromGridview($(this)); return false;', 'data-pjax' => '0']); }], ['attribute' => 'JMLLOT', 'label' => 'Jml Lot', 'filter' => false, 'format' => ['decimal', 2], 'options' => ['width' => '100px'], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle'], ['attribute' => 'JMLSAHAM', 'label' => 'Jml Saham', 'filter' => false, 'format' => ['decimal', 2], 'options' => ['width' => '100px'], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle', 'pageSummary' => true, 'pageSummaryFunc' => GridView::F_SUM], ['label' => 'Range Beli', 'format' => ['decimal', 2], 'filter' => false, 'options' => ['width' => '100px'], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle', 'value' => function ($data) { // Range Beli = saldob / (jmllotb * jmllbrsaham) -> Ket: saldob, jmllotb dr detemiten; jmllbrsaham dr lotshare. //koreksi: Range Beli = saldob / jmlsahamb -> Ket: saldob, jmlsahamb dr detemiten. $range_beli = (double) @($data->SALDOB / $data->JMLSAHAMB); return $range_beli; }], ['label' => 'Range', 'format' => ['decimal', 2], 'filter' => false, 'options' => ['width' => '100px'], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle', 'value' => function ($data) { //Range = saldo / jmlsaham. $range = (double) @($data->SALDO / $data->JMLSAHAM); return $range; }], ['attribute' => 'SALDO', 'label' => 'Saldo', 'filter' => false, 'format' => ['decimal', 2], 'options' => ['width' => '100px'], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle', 'pageSummary' => true, 'pageSummaryFunc' => GridView::F_SUM], ['attribute' => 'HARGA', 'label' => 'Harga', 'filter' => false, 'format' => 'raw', 'options' => ['width' => '100px'], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle', 'value' => function ($data) { return MaskedInput::widget(['name' => 'harga[' . $data->EMITEN_KODE . ']', 'value' => number_format($data->HARGA, 2), 'clientOptions' => ['alias' => 'numeric', 'groupSeparator' => ',', 'radixPoint' => '.', 'autoGroup' => true, 'removeMaskOnSubmit' => true]]); }], ['attribute' => 'TGLAKHIR', 'label' => 'Tgl Akhir', 'filter' => false, 'options' => ['width' => '100px'], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle'], ['label' => 'Saldo **)', 'format' => ['decimal', 2], 'filter' => false, 'options' => ['width' => '100px'], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle', 'value' => function ($data) { //Saldo**) = jmlsaham * harga $saldo = $data->HARGA * $data->JMLSAHAM;
?> <div style="clear: both;"> <div class="col-md-2" style="margin-left: 0; padding-left: 0;"> <?php echo $form->field($model, 'active')->dropDownList(Tasks::getStatusesArray(), array('prompt' => 'Все')); ?> </div> <div class="col-md-4"> <?php echo $form->field($model, 'client')->dropDownList(Clients::getClients(), array('prompt' => 'Любой')); ?> </div> <div class="col-md-3"> <?php echo '<label class="control-label">Даты</label>'; echo DatePicker::widget(['model' => $model, 'attribute' => 'fromDate', 'attribute2' => 'toDate', 'type' => DatePicker::TYPE_RANGE, 'form' => $form, 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]); ?> </div> <div class="col-md-3"> <?php if (User::isUserAdmin(Yii::$app->user->identity->username) or User::isUserModer(Yii::$app->user->identity->username)) { echo $form->field($model, 'user_ispol')->dropDownList(User::getUsers(), array('prompt' => 'Все')); } else { //echo $form->field($model, 'user_ispol')->dropDownList(Clients::getStatusesArray(), array('prompt'=>'Все')); } ?> </div> </div> <?php //= $form->field($model, 'created')