本文整理汇总了PHP中app\func\Proc::DGcols方法的典型用法代码示例。如果您正苦于以下问题:PHP Proc::DGcols方法的具体用法?PHP Proc::DGcols怎么用?PHP Proc::DGcols使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\func\Proc
的用法示例。
在下文中一共展示了Proc::DGcols方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<?php
\Yii::$app->getView()->registerJsFile(Yii::$app->request->baseUrl . '/js/recoverysendaktfilter.js');
use yii\helpers\Html;
use kartik\dynagrid\DynaGrid;
use app\func\Proc;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $searchModel app\models\Fregat\RecoverysendaktSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Журнал восстановления материальных ценностей';
$this->params['breadcrumbs'] = Proc::Breadcrumbs($this);
?>
<div class="recoverysendakt-index">
<?php
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'recoverysendaktgrid'], 'columns' => Proc::DGcols(['buttonsfirst' => true, 'columns' => ['recoverysendakt_id', ['attribute' => 'recoverysendakt_date', 'format' => 'date'], 'idOrgan.organ_name'], 'buttons' => array_merge(Yii::$app->user->can('RecoveryEdit') ? ['update' => ['Fregat/recoverysendakt/update', 'recoverysendakt_id'], 'deleteajax' => ['Fregat/recoverysendakt/delete', 'recoverysendakt_id']] : [])]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<i class="glyphicon glyphicon-wrench"></i> ' . $this->title, 'before' => Yii::$app->user->can('RecoveryEdit') ? Html::a('<i class="glyphicon glyphicon-plus"></i> Добавить', ['create'], ['class' => 'btn btn-success', 'data-pjax' => '0']) : ''], 'toolbar' => ['base' => ['content' => \yii\bootstrap\Html::a('<i class="glyphicon glyphicon-filter"></i>', ['recoverysendaktfilter'], ['title' => 'Дополнительный фильтр', 'class' => 'btn btn-default filter_button']) . '{export}{dynagrid}']], 'afterHeader' => $filter]]));
?>
</div>
<div class="form-group">
<div class="panel panel-default">
<div class="panel-heading">
<?php
echo Html::button('<i class="glyphicon glyphicon-list"></i> Выгрузка', ['id' => 'DownloadExportReport', 'class' => 'btn btn-success', 'onclick' => 'ExportExcel("RecoverysendaktSearch","' . \yii\helpers\Url::toRoute('Fregat/recoverysendakt/toexcel') . '", $(this)[0].id);']);
?>
</div>
</div>
</div>
<?php
yii\bootstrap\Modal::begin(['header' => 'Дополнительный фильтр', 'id' => 'RecoverysendaktFilter', 'options' => ['class' => 'modal_filter', 'tabindex' => false]]);
yii\bootstrap\Modal::end();
示例2: isset
<?php
$result = Proc::GetLastBreadcrumbsFromSession();
$foreign = isset($result['dopparams']['foreign']) ? $result['dopparams']['foreign'] : '';
$material_tip = Material::VariablesValues('material_tip');
$material_writeoff = Material::VariablesValues('material_writeoff');
$material_importdo = Material::VariablesValues('material_importdo');
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'materialgrid'], 'columns' => Proc::DGcols(['buttonsfirst' => true, 'columns' => [['attribute' => 'material_tip', 'filter' => $material_tip, 'value' => function ($model) use($material_tip) {
return isset($material_tip[$model->material_tip]) ? $material_tip[$model->material_tip] : '';
}], 'idMatv.matvid_name', 'material_name', ['attribute' => 'material_name1c', 'visible' => false], ['attribute' => 'material_1c', 'visible' => false], 'material_inv', 'material_number', 'idIzmer.izmer_name', 'material_price', ['attribute' => 'material_serial', 'visible' => false], ['attribute' => 'material_release', 'format' => 'date', 'visible' => false], ['attribute' => 'material_writeoff', 'filter' => $material_writeoff, 'value' => function ($model) use($material_writeoff) {
return isset($material_writeoff[$model->material_writeoff]) ? $material_writeoff[$model->material_writeoff] : '';
}], ['attribute' => 'material_username', 'visible' => false], ['attribute' => 'material_lastchange', 'format' => 'datetime', 'visible' => false], ['attribute' => 'material_importdo', 'filter' => $material_importdo, 'value' => function ($model) use($material_importdo) {
return isset($material_importdo[$model->material_importdo]) ? $material_importdo[$model->material_importdo] : '';
}, 'visible' => false], ['attribute' => 'mattraffics.mattraffic_username', 'value' => function ($model) {
return $model->mattraffics[0]->mattraffic_username;
}, 'visible' => false], ['attribute' => 'mattraffics.mattraffic_lastchange', 'value' => function ($model) {
return Yii::$app->formatter->asDatetime($model->mattraffics[0]->mattraffic_lastchange);
}, 'visible' => false], ['attribute' => 'currentMattraffic.idMol.idperson.auth_user_fullname', 'visible' => false, 'label' => 'ФИО текущего МОЛ', 'value' => function ($model) {
return $model->material_tip == 1 || $model->material_tip == 3 ? $model->currentMattraffic->idMol->idperson->auth_user_fullname : '';
}], ['attribute' => 'currentMattraffic.idMol.iddolzh.dolzh_name', 'visible' => false, 'label' => 'Должность текущего МОЛ', 'value' => function ($model) {
return $model->material_tip == 1 || $model->material_tip == 3 ? $model->currentMattraffic->idMol->iddolzh->dolzh_name : '';
}], ['attribute' => 'currentMattraffic.idMol.idbuild.build_name', 'visible' => false, 'label' => 'Здание текущего МОЛ', 'value' => function ($model) {
return $model->material_tip == 1 || $model->material_tip == 3 ? $model->currentMattraffic->idMol->idbuild->build_name : '';
}], ['attribute' => 'idSchetuchet.schetuchet_kod', 'visible' => false], ['attribute' => 'idSchetuchet.schetuchet_name', 'visible' => false]], 'buttons' => array_merge(empty($foreign) ? ['karta' => function ($url, $model) {
$customurl = Yii::$app->getUrlManager()->createUrl(['Fregat/material/update', 'id' => $model->material_id]);
return \yii\helpers\Html::a('<i class="glyphicon glyphicon-pencil"></i>', $customurl, ['title' => 'Карта материальной ценности', 'class' => 'btn btn-xs btn-warning', 'data-pjax' => '0']);
}] : ['chooseajax' => ['Fregat/material/assign-to-select2']])]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<i class="glyphicon glyphicon-picture"></i> ' . $this->title, 'before' => Yii::$app->user->can('MaterialEdit') ? Html::a('<i class="glyphicon glyphicon-plus"></i> Составить акт прихода материальнной ценности', ['create'], ['class' => 'btn btn-success', 'data-pjax' => '0']) : ''], 'toolbar' => ['base' => ['content' => \yii\bootstrap\Html::a('<i class="glyphicon glyphicon-filter"></i>', ['materialfilter'], ['title' => 'Дополнительный фильтр', 'class' => 'btn btn-default filter_button']) . \yii\bootstrap\Html::button('<i class="glyphicon glyphicon-floppy-disk"></i>', ['id' => 'Materialexcel', 'type' => 'button', 'title' => 'Экспорт в Excel', 'class' => 'btn btn-default button_export', 'onclick' => 'ExportExcel("MaterialSearch","' . \yii\helpers\Url::toRoute('Fregat/material/toexcel') . '", $(this)[0].id);']) . '{export}{dynagrid}']], 'afterHeader' => $filter]]));
?>
<?php
yii\bootstrap\Modal::begin(['header' => 'Дополнительный фильтр', 'id' => 'MaterialFilter', 'options' => ['class' => 'modal_filter', 'tabindex' => false]]);
yii\bootstrap\Modal::end();
示例3: UploadedFiles
use yii\bootstrap\ActiveForm;
use yii\helpers\Html;
use kartik\dynagrid\DynaGrid;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $searchModel app\models\Fregat\DocfilesSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Загруженные файлы';
$this->params['breadcrumbs'] = Proc::Breadcrumbs($this);
?>
<div class="docfiles-index">
<?php
$form = ActiveForm::begin();
?>
<?php
echo $form->field($model, 'docFile')->widget(FileInput::classname(), ['pluginOptions' => ['uploadUrl' => Url::to(['Fregat/docfiles/create']), 'dropZoneEnabled' => false, 'previewZoomSettings' => ['image' => ['width' => 'auto', 'height' => '100%']]], 'pluginEvents' => ["fileuploaded" => 'function(event, data, previewId, index) { UploadedFiles("docfilesgrid", event, data); }']]);
?>
<?php
ActiveForm::end();
?>
<?php
$result = Proc::GetLastBreadcrumbsFromSession();
$foreign = isset($result['dopparams']['foreign']) ? $result['dopparams']['foreign'] : '';
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'docfilesgrid'], 'columns' => Proc::DGcols(['columns' => [['attribute' => 'docfiles_ext', 'format' => 'raw', 'value' => 'docfiles_iconshow', 'contentOptions' => ['style' => 'width: 40px; text-align: center;'], 'filter' => false], ['attribute' => 'docfiles_name', 'format' => 'raw', 'value' => 'docfiles_name_html'], ['attribute' => 'docfiles_hash', 'visible' => false]], 'buttons' => array_merge(empty($foreign) ? [] : ['chooseajax' => ['Fregat/docfiles/assign-to-select2']], Yii::$app->user->can('DocfilesEdit') ? ['deleteajax' => ['Fregat/docfiles/delete']] : [])]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<i class="glyphicon glyphicon-file"></i> ' . $this->title]]]));
?>
</div>
示例4: Employee
<?php
echo $form->field($model, 'osmotraktmat_date')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'options' => ['options' => ['placeholder' => 'Выберите дату ...', 'class' => 'form-control setsession']]]);
?>
<?php
echo $form->field($model, 'id_master')->widget(Select2::classname(), Proc::DGselect2(['model' => $model, 'resultmodel' => new Employee(), 'fields' => ['keyfield' => 'id_master', 'resultfield' => 'idperson.auth_user_fullname'], 'placeholder' => 'Выберете пользователя', 'fromgridroute' => 'Fregat/employee/index', 'resultrequest' => 'Fregat/employee/selectinputemloyee', 'thisroute' => $this->context->module->requestedRoute, 'methodquery' => 'selectinput']));
?>
<?php
ActiveForm::end();
?>
<?php
if (!$model->isNewRecord) {
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'tr-mat-osmotrgrid'], 'columns' => Proc::DGcols(['columns' => ['idTrMat.idMattraffic.idMaterial.idMatv.matvid_name', 'idTrMat.idMattraffic.idMaterial.material_name', 'idTrMat.idMattraffic.idMaterial.material_inv', ['attribute' => 'idTrMat.idMattraffic.mattraffic_number', 'label' => 'Всего количество у материально-ответственного лица', 'visible' => false], 'tr_mat_osmotr_number', ['attribute' => 'idTrMat.idMattraffic.idMol.idperson.auth_user_fullname', 'label' => 'ФИО материально-ответственного лица'], ['attribute' => 'idTrMat.idMattraffic.idMol.iddolzh.dolzh_name', 'label' => 'Должность материально-ответственного лица'], ['attribute' => 'idTrMat.idParent.idMaterial.material_name', 'label' => 'В составе материальной ценности'], ['attribute' => 'idTrMat.idParent.idMaterial.material_inv', 'label' => 'Инвентарный номер материальной ценности в которую укомплектовано'], 'idReason.reason_text', 'tr_mat_osmotr_comment'], 'buttons' => ['update' => ['Fregat/tr-mat-osmotr/update'], 'deleteajax' => ['Fregat/tr-mat-osmotr/delete']]]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-compressed"></i> Осмотренные материалы</h3>', 'before' => Html::a('<i class="glyphicon glyphicon-download"></i> Добавить материал', ['Fregat/tr-mat-osmotr/create', 'foreignmodel' => 'TrMatOsmotr', 'url' => $this->context->module->requestedRoute, 'field' => 'id_osmotraktmat', 'id' => $model->primaryKey], ['class' => 'btn btn-success', 'data-pjax' => '0'])]]]));
}
?>
<div class="form-group">
<div class="panel panel-default">
<div class="panel-heading">
<?php
echo Html::submitButton($model->isNewRecord ? '<i class="glyphicon glyphicon-plus"></i> Создать' : '<i class="glyphicon glyphicon-edit"></i> Обновить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary', 'form' => 'Osmotraktmatform']);
?>
<?php
if (!$model->isNewRecord) {
echo Html::button('<i class="glyphicon glyphicon-list"></i> Скачать акт', ['id' => 'DownloadReport', 'class' => 'btn btn-info', 'onclick' => 'DownloadReport("' . Url::to(['Fregat/osmotraktmat/osmotraktmat-report']) . '", $(this)[0].id, {id: ' . $model->primaryKey . '} )']);
}
?>
示例5: function
echo $form->field($dopparams['Glaukuchet'], 'glaukuchet_lastmetabol')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'options' => ['options' => ['placeholder' => 'Выберите дату ...', 'class' => 'form-control', 'disabled' => $dopparams['DisableElements']]], 'saveOptions' => ['class' => 'form-control setsession', 'form' => $formname]]);
?>
<?php
if ($model->isNewRecord || $dopparams['Glaukuchet']->isNewRecord) {
?>
<div class="alert alert-warning" role="alert">Для назначения лекарственных препаратов сохраните карту пациента.</div>
<?php
}
?>
<?php
if (!$model->isNewRecord && !$dopparams['Glaukuchet']->isNewRecord) {
$glprep_rlocat = app\models\Glauk\Glprep::VariablesValues('glprep_rlocat');
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'glprepgrid'], 'columns' => Proc::DGcols(['columns' => ['idPreparat.preparat_name', ['attribute' => 'glprep_rlocat', 'filter' => $glprep_rlocat, 'value' => function ($model) use($glprep_rlocat) {
return isset($glprep_rlocat[$model->glprep_rlocat]) ? $glprep_rlocat[$model->glprep_rlocat] : '';
}]], 'buttons' => array_merge(!$dopparams['DisableElements'] ? ['deleteajax' => ['Glauk/glprep/delete', 'glprep_id']] : [])]), 'gridOptions' => ['dataProvider' => $dopparams['dataProviderglprep'], 'filterModel' => $dopparams['searchModelglprep'], 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-tint"></i> Препараты</h3>', 'before' => !$dopparams['DisableElements'] ? Html::a('<i class="glyphicon glyphicon-download"></i> Добавить препарат', ['Glauk/glprep/create', 'idglaukuchet' => $model->glaukuchets->glaukuchet_id], ['class' => 'btn btn-success', 'data-pjax' => '0']) : '']]]));
}
?>
<div class="panel panel-<?php
echo Yii::$app->params['panelStyle'];
?>
">
<div class="panel-heading"><?php
echo Html::encode('Снятие с учета');
?>
</div>
<div class="panel-body">
<?php
echo $form->field($dopparams['Glaukuchet'], 'glaukuchet_deregdate')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'options' => ['options' => ['placeholder' => 'Выберите дату ...', 'class' => 'form-control', 'disabled' => $dopparams['DisableElements']]], 'saveOptions' => ['class' => 'form-control setsession', 'form' => $formname]]);
示例6: function
?>
<?php
echo $form->field($model, 'name')->textInput(['maxlength' => true, 'class' => 'form-control setsession', 'disabled' => !$model->isNewRecord]);
?>
<?php
ActiveForm::end();
?>
<?php
if (!$model->isNewRecord && $model->type == 1) {
$type = \app\models\Config\Authitem::VariablesValues('type');
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'authitemchildgrid'], 'columns' => Proc::DGcols(['columns' => ['children.description', ['attribute' => 'children.type', 'filter' => $type, 'value' => function ($model) use($type) {
return isset($type[$model->children->type]) ? $type[$model->children->type] : '';
}], 'children.name'], 'buttons' => ['deletecustom' => function ($url, $model) use($params) {
$customurl = Yii::$app->getUrlManager()->createUrl(['Config/authitemchild/delete', 'parent' => $model->parent, 'child' => $model->child]);
return Html::button('<i class="glyphicon glyphicon-trash"></i>', ['type' => 'button', 'title' => 'Удалить', 'class' => 'btn btn-xs btn-danger', 'onclick' => 'ConfirmDeleteDialogToAjax("Вы уверены, что хотите удалить запись?", "' . $customurl . '")']);
}]]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-paperclip"></i> Дочерние авторизационные единицы</h3>', 'before' => Html::a('<i class="glyphicon glyphicon-download"></i> Добавить дочернюю авторизационную единицу', ['Config/authitem/forauthitemchild', 'foreignmodel' => 'Authitemchild', 'url' => $this->context->module->requestedRoute, 'field' => 'child', 'id' => $model->primaryKey], ['class' => 'btn btn-success', 'data-pjax' => '0'])]]]));
}
?>
<div class="panel panel-default">
<div class="panel-heading">
<?php
echo Html::submitButton($model->isNewRecord ? '<i class="glyphicon glyphicon-plus"></i> Создать' : '<i class="glyphicon glyphicon-edit"></i> Обновить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary', 'form' => 'Authitemform']);
?>
</div>
</div>
</div>
示例7: function
<?php
use app\func\Proc;
use kartik\dynagrid\DynaGrid;
use yii\bootstrap\Html;
use yii\helpers\Url;
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'recoverymatgrid'], 'columns' => Proc::DGcols(['columns' => ['idOsmotraktmat.osmotraktmat_id', ['attribute' => 'idOsmotraktmat.osmotraktmat_date', 'format' => 'date'], 'tr_mat_osmotr_number', 'idReason.reason_text', 'tr_mat_osmotr_comment', 'idOsmotraktmat.idMaster.idperson.auth_user_fullname', 'idOsmotraktmat.idMaster.iddolzh.dolzh_name'], 'buttons' => ['osmotraktmatreport' => function ($url, $model) use($params) {
return Html::button('<i class="glyphicon glyphicon-list"></i>', ['type' => 'button', 'title' => 'Скачать акт осмотра материала', 'class' => 'btn btn-xs btn-default', 'onclick' => 'DownloadReport("' . Url::to(['Fregat/osmotraktmat/osmotraktmat-report']) . '", null, {id: ' . $model->id_osmotraktmat . '} )']);
}]]), 'gridOptions' => ['dataProvider' => $dataProvider_recoverymat, 'filterModel' => $searchModel_recoverymat, 'panel' => ['heading' => '<i class="glyphicon glyphicon-search"></i> Осмотр, как материал']]]));
示例8: function
$patient_pol = Patient::VariablesValues('patient_pol');
$glaukuchet_detect = Glaukuchet::VariablesValues('glaukuchet_detect');
$glaukuchet_deregreason = Glaukuchet::VariablesValues('glaukuchet_deregreason');
$glaukuchet_stage = Glaukuchet::VariablesValues('glaukuchet_stage');
$glaukuchet_invalid = Glaukuchet::VariablesValues('glaukuchet_invalid');
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'patientglaukgrid'], 'columns' => Proc::DGcols(['buttonsfirst' => true, 'columns' => ['patient_fam', 'patient_im', 'patient_ot', ['attribute' => 'patient_dr', 'format' => 'date'], ['attribute' => 'patient_pol', 'filter' => $patient_pol, 'value' => function ($model) use($patient_pol) {
return isset($patient_pol[$model->patient_pol]) ? $patient_pol[$model->patient_pol] : '';
}, 'visible' => false], ['attribute' => 'idFias.fias_city', 'visible' => false], ['attribute' => 'idFias.fias_street', 'visible' => false], ['attribute' => 'patient_dom', 'visible' => false], ['attribute' => 'patient_korp', 'visible' => false], ['attribute' => 'patient_kvartira', 'visible' => false], ['attribute' => 'glaukuchets.glaukuchet_uchetbegin', 'format' => 'date', 'visible' => false], ['attribute' => 'glaukuchets.glaukuchet_detect', 'filter' => $glaukuchet_detect, 'value' => function ($model) use($glaukuchet_detect) {
return isset($glaukuchet_detect[$model->glaukuchets->glaukuchet_detect]) ? $glaukuchet_detect[$model->glaukuchets->glaukuchet_detect] : '';
}, 'visible' => false], ['attribute' => 'glaukuchets.glaukuchet_deregdate', 'format' => 'date', 'visible' => false], ['attribute' => 'glaukuchets.glaukuchet_deregreason', 'filter' => $glaukuchet_deregreason, 'value' => function ($model) use($glaukuchet_deregreason) {
return isset($glaukuchet_deregreason[$model->glaukuchets->glaukuchet_deregreason]) ? $glaukuchet_deregreason[$model->glaukuchets->glaukuchet_deregreason] : '';
}, 'visible' => false], ['attribute' => 'glaukuchets.glaukuchet_stage', 'filter' => $glaukuchet_stage, 'value' => function ($model) use($glaukuchet_stage) {
return isset($glaukuchet_stage[$model->glaukuchets->glaukuchet_stage]) ? $glaukuchet_stage[$model->glaukuchets->glaukuchet_stage] : '';
}, 'visible' => false], ['attribute' => 'glaukuchets.glaukuchet_operdate', 'format' => 'date', 'visible' => false], ['attribute' => 'glaukuchets.glaukuchet_invalid', 'filter' => $glaukuchet_invalid, 'value' => function ($model) use($glaukuchet_invalid) {
return isset($glaukuchet_invalid[$model->glaukuchets->glaukuchet_invalid]) ? $glaukuchet_invalid[$model->glaukuchets->glaukuchet_invalid] : '';
}, 'visible' => false], ['attribute' => 'glaukuchets.glaukuchet_lastvisit', 'format' => 'date'], ['attribute' => 'glaukuchets.glaukuchet_lastmetabol', 'format' => 'date', 'visible' => false], ['attribute' => 'glaukuchets.idEmployee.idperson.auth_user_fullname', 'label' => 'ФИО врача'], ['attribute' => 'glaukuchets.idEmployee.iddolzh.dolzh_name', 'label' => 'Специальность врача', 'visible' => false], ['attribute' => 'glaukuchets.idEmployee.idpodraz.podraz_name', 'label' => 'Подразделение врача', 'visible' => false], ['attribute' => 'glaukuchets.idEmployee.idbuild.build_name', 'label' => 'Местонахождение врача'], ['attribute' => 'glaukuchets.idClassMkb.code', 'visible' => false], ['attribute' => 'glaukuchets.idClassMkb.name', 'visible' => false], ['attribute' => 'glaukuchets.glpreps.glaukuchet_preparats', 'filter' => false, 'value' => function ($model) {
$a = '';
return isset($model->glaukuchets->glpreps[0]->glaukuchet_preparats) ? $model->glaukuchets->glpreps[0]->glaukuchet_preparats : '';
}, 'headerOptions' => ['attr_fullname' => 'glaukuchets.glpreps.glaukuchet_preparats'], 'visible' => false], ['attribute' => 'patient_username', 'visible' => false], ['attribute' => 'patient_lastchange', 'format' => 'datetime', 'visible' => false], ['attribute' => 'glaukuchets.glaukuchet_username', 'visible' => false], ['attribute' => 'glaukuchets.glaukuchet_lastchange', 'format' => 'datetime', 'visible' => false]], 'buttons' => array_merge(Yii::$app->user->can('GlaukUserPermission') ? ['update' => function ($url, $model, $key) {
$customurl = Url::to(['Base/patient/update', 'id' => $model->primarykey, 'patienttype' => 'glauk']);
if (!(isset($model->glaukuchets) || Yii::$app->user->can('GlaukOperatorPermission'))) {
return '';
} else {
return \yii\helpers\Html::a(isset($model->glaukuchets) ? '<i class="glyphicon glyphicon-pencil"></i>' : '<i class="glyphicon glyphicon-plus"></i>', $customurl, ['title' => isset($model->glaukuchets) ? 'Обновить' : 'Создать карту глаукомного пациента', 'class' => isset($model->glaukuchets) ? 'btn btn-xs btn-warning' : 'btn btn-xs btn-info', 'data-pjax' => '0']);
}
}] : [], Yii::$app->user->can('PatientRemoveRole') ? ['deleteajax' => ['Base/patient/delete', 'patient_id']] : [])]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<i class="glyphicon glyphicon-search"></i> ' . $this->title, 'before' => Yii::$app->user->can('GlaukOperatorPermission') ? Html::a('<i class="glyphicon glyphicon-plus"></i> Добавить нового пациента', ['create', 'patienttype' => 'glauk'], ['class' => 'btn btn-success', 'data-pjax' => '0']) : ''], 'toolbar' => ['base' => ['content' => \yii\bootstrap\Html::a('<i class="glyphicon glyphicon-filter"></i>', ['glaukfilter'], ['title' => 'Дополнительный фильтр', 'class' => 'btn btn-default filter_button']) . \yii\bootstrap\Html::button('<i class="glyphicon glyphicon-floppy-disk"></i>', ['id' => 'Patientglaukexcel', 'type' => 'button', 'title' => 'Экспорт в Excel', 'class' => 'btn btn-default button_export', 'onclick' => 'ExportExcel("PatientSearch","' . \yii\helpers\Url::toRoute('Base/patient/toexcel') . '", $(this)[0].id, {"PatientSearch[glaukuchets.glpreps.glaukuchet_preparats]": ""});']) . '{export}{dynagrid}']], 'afterHeader' => $filter]]));
?>
<?php
yii\bootstrap\Modal::begin(['header' => 'Дополнительный фильтр', 'id' => 'PatientFilter', 'options' => ['class' => 'modal_filter', 'tabindex' => false]]);
yii\bootstrap\Modal::end();
示例9: JsExpression
?>
<?php
ActiveForm::end();
?>
<?php
if (!$model->isNewRecord) {
echo $form->field(new app\models\Fregat\Osmotrakt(), 'osmotrakt_id')->widget(Select2::classname(), ['options' => ['placeholder' => 'Введите инвентарный номер материальной ценности', 'class' => 'form-control'], 'theme' => Select2::THEME_BOOTSTRAP, 'pluginOptions' => ['allowClear' => true, 'minimumInputLength' => 3, 'ajax' => ['url' => \yii\helpers\Url::to(['Fregat/osmotrakt/selectinputforrecoverysendakt']), 'dataType' => 'json', 'data' => new JsExpression('function(params) { return {q:params.term} }')], 'escapeMarkup' => new JsExpression('function (markup) { return markup; }')], 'addon' => ['append' => ['content' => Html::button('<i class="glyphicon glyphicon-arrow-down"></i> Вставить в таблицу', ['class' => 'btn btn-success', 'id' => 'addrecoveryrecieveakt', 'onclick' => 'AddOsmotrakt(' . $_GET['id'] . ')']), 'asButton' => true]]])->label('Для быстрого добавления материальных ценностей');
$recoveryrecieveakt_repaired = Recoveryrecieveakt::VariablesValues('recoveryrecieveakt_repaired');
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'recoveryrecieveaktgrid'], 'columns' => Proc::DGcols(['columns' => ['idOsmotrakt.osmotrakt_id', 'idOsmotrakt.idTrosnov.idMattraffic.idMaterial.material_inv', 'idOsmotrakt.idTrosnov.idMattraffic.idMaterial.material_name', 'idOsmotrakt.idTrosnov.idMattraffic.idMol.idbuild.build_name', 'idOsmotrakt.idTrosnov.tr_osnov_kab', 'idOsmotrakt.idReason.reason_text', 'idOsmotrakt.osmotrakt_comment', ['attribute' => 'idOsmotrakt.idMaster.idperson.auth_user_fullname', 'label' => 'ФИО составителя акта осмотра'], ['attribute' => 'idOsmotrakt.osmotrakt_date', 'format' => 'date', 'visible' => false], ['attribute' => 'idOsmotrakt.idMaster.iddolzh.dolzh_name', 'label' => 'Должность составителя акта осмотра', 'visible' => false], 'recoveryrecieveakt_result', ['attribute' => 'recoveryrecieveakt_repaired', 'filter' => $recoveryrecieveakt_repaired, 'value' => function ($model) use($recoveryrecieveakt_repaired) {
return isset($recoveryrecieveakt_repaired[$model->recoveryrecieveakt_repaired]) ? $recoveryrecieveakt_repaired[$model->recoveryrecieveakt_repaired] : '';
}], ['attribute' => 'recoveryrecieveakt_date', 'format' => 'date']], 'buttons' => ['update' => ['Fregat/recoveryrecieveakt/update'], 'deleteajax' => ['Fregat/recoveryrecieveakt/delete', 'recoveryrecieveakt_id', 'recoveryrecieveaktgrid']]]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-compressed"></i> Восстанавливаемые материальные ценности</h3>', 'before' => Html::a('<i class="glyphicon glyphicon-download"></i> Добавить акт осмотра', ['Fregat/osmotrakt/forrecoveryrecieveakt', 'foreignmodel' => 'Recoveryrecieveakt', 'url' => $this->context->module->requestedRoute, 'field' => 'id_osmotrakt', 'id' => $model->primaryKey], ['class' => 'btn btn-success', 'data-pjax' => '0'])]]]));
$recoveryrecieveaktmat_repaired = Recoveryrecieveaktmat::VariablesValues('recoveryrecieveaktmat_repaired');
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'recoveryrecieveaktmatgrid'], 'columns' => Proc::DGcols(['columns' => ['idTrMatOsmotr.idOsmotraktmat.osmotraktmat_id', ['attribute' => 'idTrMatOsmotr.idOsmotraktmat.osmotraktmat_date', 'format' => 'date'], 'idTrMatOsmotr.idTrMat.idMattraffic.idMaterial.material_inv', 'idTrMatOsmotr.idTrMat.idMattraffic.idMaterial.material_name', 'idTrMatOsmotr.tr_mat_osmotr_number', ['attribute' => 'idTrMatOsmotr.idTrMat.idMattraffic.idMol.idperson.auth_user_fullname', 'label' => 'ФИО материально-ответственного лица'], ['attribute' => 'idTrMatOsmotr.idTrMat.idMattraffic.idMol.iddolzh.dolzh_name', 'label' => 'Должность материально-ответственного лица'], 'idTrMatOsmotr.idTrMat.idMattraffic.idMol.idbuild.build_name', 'idTrMatOsmotr.idReason.reason_text', 'idTrMatOsmotr.tr_mat_osmotr_comment', 'recoveryrecieveaktmat_result', ['attribute' => 'recoveryrecieveaktmat_repaired', 'filter' => $recoveryrecieveaktmat_repaired, 'value' => function ($model) use($recoveryrecieveaktmat_repaired) {
return isset($recoveryrecieveaktmat_repaired[$model->recoveryrecieveaktmat_repaired]) ? $recoveryrecieveaktmat_repaired[$model->recoveryrecieveaktmat_repaired] : '';
}], ['attribute' => 'recoveryrecieveaktmat_date', 'format' => 'date']], 'buttons' => ['update' => ['Fregat/recoveryrecieveaktmat/update'], 'deleteajax' => ['Fregat/recoveryrecieveaktmat/delete', 'recoveryrecieveaktmat_id', 'recoveryrecieveaktmatgrid']]]), 'gridOptions' => ['dataProvider' => $dataProvidermat, 'filterModel' => $searchModelmat, 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-compressed"></i> Восстанавливаемые материалы</h3>', 'before' => Html::a('<i class="glyphicon glyphicon-download"></i> Добавить материала для восстановления', ['Fregat/tr-mat-osmotr/forrecoveryrecieveaktmat', 'foreignmodel' => 'Recoveryrecieveaktmat', 'url' => $this->context->module->requestedRoute, 'field' => 'id_tr_mat_osmotr', 'id' => $model->primaryKey], ['class' => 'btn btn-success', 'data-pjax' => '0'])]]]));
}
?>
<div class="form-group">
<div class="panel panel-default">
<div class="panel-heading">
<?php
echo Html::submitButton($model->isNewRecord ? '<i class="glyphicon glyphicon-plus"></i> Создать' : '<i class="glyphicon glyphicon-edit"></i> Обновить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary', 'form' => 'Recoverysendaktform']);
?>
<?php
if (!$model->isNewRecord) {
echo ButtonDropdown::widget(['label' => '<i class="glyphicon glyphicon-list"></i> Скачать акт', 'encodeLabel' => false, 'id' => 'DownloadReport', 'dropdown' => ['encodeLabels' => false, 'items' => [['label' => '<i class="glyphicon glyphicon-export"></i> Акт передачи материальных ценностей сторонней организации', 'url' => '#', 'linkOptions' => ['onclick' => 'DownloadReport("' . Url::to(['Fregat/recoverysendakt/recoverysendakt-report']) . '", "DownloadReport", {id: ' . $model->recoverysendakt_id . '} ); return false;']], ['label' => '<i class="glyphicon glyphicon-import"></i> Акт получения материальных ценностей от сторонней организации', 'url' => '#', 'linkOptions' => ['onclick' => 'DownloadReport("' . Url::to(['Fregat/recoveryrecieveakt/recoveryrecieveakt-report']) . '", "DownloadReport", {id: ' . $model->recoverysendakt_id . '} ); return false;']], ['label' => '<i class="glyphicon glyphicon-chevron-up"></i> Акт передачи материалов сторонней организации', 'url' => '#', 'linkOptions' => ['onclick' => 'DownloadReport("' . Url::to(['Fregat/recoverysendakt/recoverysendaktmat-report']) . '", "DownloadReport", {id: ' . $model->recoverysendakt_id . '} ); return false;']], ['label' => '<i class="glyphicon glyphicon-chevron-down"></i> Акт получения материалов от сторонней организации', 'url' => '#', 'linkOptions' => ['onclick' => 'DownloadReport("' . Url::to(['Fregat/recoveryrecieveaktmat/recoveryrecieveaktmat-report']) . '", "DownloadReport", {id: ' . $model->recoverysendakt_id . '} ); return false;']]]], 'options' => ['class' => 'btn btn-info'], 'containerOptions' => ['style' => 'padding-right: 4px;']]);
echo ButtonDropdown::widget(['label' => '<i class="glyphicon glyphicon-send"></i> Отправить акт по электронной почте', 'encodeLabel' => false, 'id' => 'SendReport', 'dropdown' => ['encodeLabels' => false, 'items' => [['label' => '<i class="glyphicon glyphicon-export"></i> Акт передачи материальных ценностей сторонней организации', 'url' => '#', 'linkOptions' => ['onclick' => 'SendReport("' . Url::to(['Fregat/recoverysendakt/recoverysendakt-reportsend']) . '", "SendReport", {id: ' . $model->recoverysendakt_id . ',emailfrom:"' . $emailfrom . '",emailto:"' . $model->idOrgan->organ_email . '",emailtheme:"' . addslashes($emailtheme) . '"} ); return false;']], ['label' => '<i class="glyphicon glyphicon-chevron-up"></i> Акт передачи материалов сторонней организации', 'url' => '#', 'linkOptions' => ['onclick' => 'SendReport("' . Url::to(['Fregat/recoverysendakt/recoverysendaktmat-reportsend']) . '", "SendReport", {id: ' . $model->recoverysendakt_id . ',emailfrom:"' . $emailfrom . '",emailto:"' . $model->idOrgan->organ_email . '",emailtheme:"' . addslashes($emailtheme) . '"} ); return false;']]]], 'options' => ['class' => 'btn btn-success'], 'containerOptions' => ['style' => 'padding-right: 4px;']]);
示例10: UploadedFiles
?>
<?php
echo $form->field($model, 'recoveryrecieveakt_repaired')->widget(Select2::classname(), ['hideSearch' => true, 'data' => $model::VariablesValues('recoveryrecieveakt_repaired'), 'pluginOptions' => ['allowClear' => true], 'options' => ['placeholder' => 'Выберете статус восстановления', 'class' => 'form-control setsession'], 'theme' => Select2::THEME_BOOTSTRAP]);
?>
<?php
echo $form->field($model, 'recoveryrecieveakt_date')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'options' => ['options' => ['placeholder' => 'Выберите дату ...', 'class' => 'form-control setsession']]]);
?>
<?php
ActiveForm::end();
?>
<?php
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'rraDocfilesgrid'], 'columns' => Proc::DGcols(['columns' => [['attribute' => 'idDocfiles.docfiles_ext', 'format' => 'raw', 'value' => 'idDocfiles.docfiles_iconshow', 'contentOptions' => ['style' => 'width: 40px; text-align: center;'], 'filter' => false], ['attribute' => 'idDocfiles.docfiles_name', 'format' => 'raw', 'value' => 'idDocfiles.docfiles_name_html'], ['attribute' => 'idDocfiles.docfiles_hash', 'visible' => false]], 'buttons' => array_merge(Yii::$app->user->can('DocfilesEdit') ? ['deleteajax' => ['Fregat/rra-docfiles/delete', 'rra_docfiles_id', 'rraDocfilesgrid']] : [])]), 'gridOptions' => ['dataProvider' => $dataProviderrra, 'filterModel' => $searchModelrra, 'panel' => ['heading' => '<i class="glyphicon glyphicon-file"></i> Прикрепленные файлы']]]));
?>
<?php
$form2 = ActiveForm::begin(['id' => 'UploadDocform']);
?>
<?php
echo $form2->field($UploadFile, 'docFile')->widget(FileInput::classname(), ['pluginOptions' => ['uploadUrl' => Url::to(['Fregat/rra-docfiles/create']), 'uploadExtraData' => ['id_recoveryrecieveakt' => $_GET['id']], 'dropZoneEnabled' => false, 'previewZoomSettings' => ['image' => ['width' => 'auto', 'height' => '100%']]], 'pluginEvents' => ["fileuploaded" => 'function(event, data, previewId, index) { UploadedFiles("rraDocfilesgrid", event, data); }']]);
?>
<?php
ActiveForm::end();
?>
<div class="form-group">
示例11: function
<?php
use app\func\Proc;
use kartik\dynagrid\DynaGrid;
use yii\bootstrap\Html;
use yii\helpers\Url;
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'mattraffic_contain_grid'], 'columns' => Proc::DGcols(['columns' => ['id_installakt', ['attribute' => 'idInstallakt.installakt_date', 'format' => 'date'], 'idMattraffic.idMaterial.material_name', 'idMattraffic.idMaterial.material_inv', 'idMattraffic.mattraffic_number', ['attribute' => 'idMattraffic.idMol.idperson.auth_user_fullname', 'label' => 'Материально-ответственное лицо'], ['attribute' => 'idMattraffic.idMol.iddolzh.dolzh_name', 'label' => 'Должность материально-ответственного лица'], ['attribute' => 'idMattraffic.idMol.idbuild.build_name', 'label' => 'Здание материально-ответственного лица'], ['attribute' => 'idMattraffic.mattraffic_username', 'visible' => false], ['attribute' => 'idMattraffic.mattraffic_lastchange', 'format' => 'datetime', 'visible' => false]], 'buttons' => array_merge(['installaktmatreport' => function ($url, $model) {
return Html::button('<i class="glyphicon glyphicon-list"></i>', ['type' => 'button', 'title' => 'Скачать акт перемещения матер-ой цен-ти', 'class' => 'btn btn-xs btn-default', 'onclick' => 'DownloadReport("' . Url::to(['Fregat/installakt/installakt-report']) . '", null, {id: ' . $model->id_installakt . '} )']);
}])]), 'gridOptions' => ['dataProvider' => $dataProvider_mattraffic_contain, 'filterModel' => $searchModel_mattraffic_contain, 'panel' => ['heading' => '<i class="glyphicon glyphicon-th-list"></i> Состав материальной ценности']]]));
示例12: function
echo Html::encode('Настройки');
?>
</div>
<div class="panel-body">
<?php
echo $form->field($Importconfig, 'importconfig_do')->checkbox()->label(null, ['class' => 'control-label']);
?>
</div>
</div>
<?php
ActiveForm::end();
?>
<?php
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'logreportgrid'], 'columns' => Proc::DGcols(['columns' => ['logreport_id', ['attribute' => 'logreport_executetime', 'format' => 'time'], ['attribute' => 'logreport_memoryused', 'value' => function ($model, $key, $index, $column) {
Yii::$app->formatter->sizeFormatBase = 1000;
return Yii::$app->formatter->asShortSize($model->logreport_memoryused);
}], ['attribute' => 'logreport_date', 'format' => 'date'], 'logreport_errors', 'logreport_updates', 'logreport_additions', 'logreport_amount', 'logreport_missed'], 'buttons' => ['download' => function ($url, $model) {
return Html::a('<i class="glyphicon glyphicon-download-alt"></i>', 'importreports/Отчет импорта в систему Фрегат N' . $model['logreport_id'] . '.xlsx', ['title' => 'Скачать отчет', 'class' => 'btn btn-xs btn-info', 'data-pjax' => '0']);
}]]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<i class="glyphicon glyphicon-inbox"></i> ' . $this->title, 'before' => Html::button('<i class="glyphicon glyphicon-trash"></i> Очистить отчеты', ['type' => 'button', 'title' => 'Удалить', 'class' => 'btn btn-danger', 'onclick' => 'ConfirmDeleteDialogToAjax("Вы уверены, что хотите очистить все отчеты?", "' . Yii::$app->getUrlManager()->createUrl(['Fregat/logreport/clear']) . '")'])]]]));
?>
<div class="form-group">
<div class="panel panel-default">
<div class="panel-heading">
<?php
echo Html::submitButton('<i class="glyphicon glyphicon-edit"></i> Обновить', ['class' => 'btn btn-primary', 'form' => 'configinpmort']);
?>
</div>
</div>
</div>
</div>
示例13: function
<?php
use app\func\Proc;
use app\models\Fregat\Recoveryrecieveaktmat;
use kartik\dynagrid\DynaGrid;
use yii\bootstrap\Html;
use yii\helpers\Url;
$recoveryrecieveaktmat_repaired = Recoveryrecieveaktmat::VariablesValues('recoveryrecieveaktmat_repaired');
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'recoverysendmat_grid'], 'columns' => Proc::DGcols(['columns' => ['id_recoverysendakt', ['attribute' => 'idRecoverysendakt.recoverysendakt_date', 'format' => 'date'], ['attribute' => 'recoveryrecieveaktmat_date', 'format' => 'date'], 'recoveryrecieveaktmat_result', ['attribute' => 'recoveryrecieveaktmat_repaired', 'filter' => $recoveryrecieveaktmat_repaired, 'value' => function ($model) use($recoveryrecieveaktmat_repaired) {
return isset($recoveryrecieveaktmat_repaired[$model->recoveryrecieveaktmat_repaired]) ? $recoveryrecieveaktmat_repaired[$model->recoveryrecieveaktmat_repaired] : '';
}], 'idTrMatOsmotr.id_osmotraktmat'], 'buttons' => ['recoveryrecieveaktmatreport' => function ($url, $model) use($params) {
return Html::button('<i class="glyphicon glyphicon-list"></i>', ['type' => 'button', 'title' => 'Скачать акт получения материалов от сторонней организации', 'class' => 'btn btn-xs btn-default', 'onclick' => 'DownloadReport("' . Url::to(['Fregat/recoveryrecieveaktmat/recoveryrecieveaktmat-report']) . '", null, {id: ' . $model->id_recoverysendakt . '} )']);
}]]), 'gridOptions' => ['dataProvider' => $dataProvider_recoverysendmat, 'filterModel' => $searchModel_recoverysendmat, 'panel' => ['heading' => '<i class="glyphicon glyphicon-wrench"></i> Восстановление, как материал']]]));
示例14: function
?>
<?php
echo $form->field($model, 'grupa_name')->textInput(['maxlength' => true, 'class' => 'form-control setsession inputuppercase', 'autofocus' => true]);
?>
<?php
ActiveForm::end();
?>
<?php
if (!$model->isNewRecord) {
$grupavid_main = app\models\Fregat\Grupavid::VariablesValues('grupavid_main');
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'grupavidgrid'], 'columns' => Proc::DGcols(['columns' => ['idmatvid.matvid_name', ['attribute' => 'grupavid_main', 'filter' => $grupavid_main, 'value' => function ($model) use($grupavid_main) {
return isset($grupavid_main[$model->grupavid_main]) ? $grupavid_main[$model->grupavid_main] : '';
}]], 'buttons' => ['createmain' => function ($url, $model) {
$customurl = Yii::$app->getUrlManager()->createUrl(['Fregat/grupavid/createmain', 'grupavid_id' => $model->grupavid_id, 'id_grupa' => $model->id_grupa]);
return Html::button('<i class="glyphicon glyphicon-magnet"></i>', ['type' => 'button', 'title' => 'Сделать главной', 'class' => 'btn btn-xs btn-info', 'onclick' => 'ConfirmDeleteDialogToAjax("Сделать вид материальной ценности основным?", "' . $customurl . '")']);
}, 'deleteajax' => ['Fregat/grupavid/delete', 'grupavid_id']]]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-paperclip"></i> Привязать к группе</h3>', 'before' => Html::a('<i class="glyphicon glyphicon-download"></i> Добавить вид материальной ценности', ['Fregat/matvid/forgrupavid', 'foreignmodel' => 'Grupavid', 'url' => $this->context->module->requestedRoute, 'field' => 'id_matvid', 'id' => $model->primaryKey], ['class' => 'btn btn-success', 'data-pjax' => '0'])]]]));
}
?>
<div class="form-group">
<div class="panel panel-default">
<div class="panel-heading">
<?php
echo Html::submitButton($model->isNewRecord ? '<i class="glyphicon glyphicon-plus"></i> Создать' : '<i class="glyphicon glyphicon-edit"></i> Обновить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary', 'form' => 'Grupavidform']);
?>
</div>
示例15: isset
<?php
use app\models\Config\Profile;
use yii\helpers\Html;
use kartik\dynagrid\DynaGrid;
use app\func\Proc;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $searchModel app\models\Fregat\BuildSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = $emp ? 'Сотрудники' : 'Пользователи';
$this->params['breadcrumbs'] = Proc::Breadcrumbs($this);
?>
<div class="authuser-index">
<?php
$result = Proc::GetLastBreadcrumbsFromSession();
$foreign = isset($result['dopparams']['foreign']) ? $result['dopparams']['foreign'] : '';
$profile_pol = Profile::VariablesValues('profile_pol');
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'authusergrid'], 'columns' => Proc::DGcols(['columns' => array_merge(['auth_user_id', 'auth_user_fullname'], $emp ? [] : ['auth_user_login'], Yii::$app->user->can('Administrator') ? [['attribute' => 'profile.profile_pol', 'filter' => $profile_pol, 'value' => function ($model) use($profile_pol) {
return isset($profile_pol[$model->profile->profile_pol]) ? $profile_pol[$model->profile->profile_pol] : '';
}, 'visible' => false], ['attribute' => 'profile.profile_dr', 'format' => 'date', 'visible' => false], ['attribute' => 'profile.profile_address', 'visible' => false], ['attribute' => 'profile.profile_inn', 'visible' => false], ['attribute' => 'profile.profile_snils', 'visible' => false]] : []), 'buttons' => array_merge(Yii::$app->user->can('UserEdit') && !$emp ? ['changepassword' => function ($url, $model, $key) {
$customurl = Url::to(['Config/authuser/changepassword', 'id' => $model['auth_user_id']]);
return \yii\helpers\Html::a('<i class="glyphicon glyphicon-lock"></i>', $customurl, ['title' => 'Изменить пароль', 'class' => 'btn btn-xs btn-info', 'data-pjax' => '0']);
}] : [], Yii::$app->user->can('UserEdit') || Yii::$app->user->can('EmployeeEdit') || Yii::$app->user->can('EmployeeSpecEdit') ? ['update' => function ($url, $model) use($emp) {
$customurl = Yii::$app->getUrlManager()->createUrl(['Config/authuser/update', 'id' => $model['auth_user_id'], 'emp' => $emp]);
return \yii\helpers\Html::a('<i class="glyphicon glyphicon-pencil"></i>', $customurl, ['title' => 'Обновить', 'class' => 'btn btn-xs btn-warning', 'data-pjax' => '0']);
}] : [], Yii::$app->user->can('UserEdit') ? ['deleteajax' => ['Config/authuser/delete', 'auth_user_id']] : [])]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<i class="glyphicon glyphicon-user"></i> ' . $this->title, 'before' => Yii::$app->user->can('UserEdit') ? Html::a('<i class="glyphicon glyphicon-plus"></i> Добавить', ['create'], ['class' => 'btn btn-success', 'data-pjax' => '0']) : '']]]));
?>
</div>