Skip to content

Instantly share code, notes, and snippets.

@swuppio
Last active August 3, 2017 15:21
Show Gist options
  • Save swuppio/edfcf7128d991faf8a42833131b76a5d to your computer and use it in GitHub Desktop.
Save swuppio/edfcf7128d991faf8a42833131b76a5d to your computer and use it in GitHub Desktop.
govnogod
exportSellerOffersTable = function (url,id)
{
window.open(url+'?id='+id);
};
<?php
echo Html::button(
'Экспорт данных',
array('class' => 'btn btn-primary pull-left',
'onClick'=>sprintf('exportSellerOffersTable("' . Yii::$app->urlManager->createUrl(['/lk/exportselleroffers']) . '",'.$model->lot_data['id'].')'))
);
?>
////////////////////
<div class="col-lg-2 col-md-3 col-sm-3 col-xs-4" >
<?=
Html::activeDropDownList($model
, 'lot'
, ArrayHelper::map(ArrayHelper::merge([-1 => ['id' => -1, 'identify' => 'Портфели']], $model->lots), 'id', 'identify')
, [
'title' => 'Портфели'
, 'class' => 'form-control col-md-9'
, 'onchange' => 'window.location = "' . Yii::$app->urlManager->createUrl(['/lk/accepted']) . '?id="+this.value'
, 'options selected' => [Yii::$app->request->getQueryParam('id', -1)]
]
)
?>
</div>
//////////////////
public function init() {
parent::init();
}
/////////////////
$this->dataProvider = new ArrayDataProvider([
'allModels' => $command->queryAll(),
'pagination' => ['pageSize' => 999999999]
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment