| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- <?php
- use yii\helpers\Html;
- use yii\grid\GridView;
- use kartik\select2\Select2;
- use app\models\Publishing;
- use yii\widgets\ListView;
- use yii\widgets\ActiveForm;
- use yii\helpers\ArrayHelper;
- /* @var $this yii\web\View */
- /* @var $searchModel app\models\PublishingSearch */
- /* @var $dataProvider yii\data\ActiveDataProvider */
- $this->title = Yii::t('app', 'Publishing ID');
- $this->params['breadcrumbs'][] = $this->title;
- $this->registerJs(<<<JS
- $('#index-form *').on('change', function(){
- $('#index-form').submit();
- });
- JS
- );
- ?>
- <div class="container">
- <section class="publications">
- <div class="container">
- <div class="row">
- <div class="col-12 publications-search">
- <?php $form = ActiveForm::begin([
- 'method' => 'get',
- 'action' => ['/publishing'],
- 'id' => 'index-form'
- ])?>
- <div class="input-group mb-2">
- <?= Html::activeInput('text', $searchModel, 'main_search',
- ['class' => 'form-control', 'placeholder'=>'Назва або ідентифікатор аукціону'])?>
- <?= Html::submitButton(Html::img('/images/icon-search.png'), ['class' => 'btn btn-primary'])?>
- </div>
- <input class="link-secondary p-0" data-toggle="collapse" data-target="#expandedSearch" type="button" value="Розширений пошук">
- <img src="/images/icon-plus.png" alt="">
- <div class="collapse <?= $searchModel->isClear() ? '' : 'show'?>" id="expandedSearch">
- <div class="row ">
- <div class="form-group col-md-6 col-lg-3 mb-0">
- <label for="search-filter-admin">Організатор торгів</label>
- <?= Html::activeInput('text', $searchModel, 'org_name',
- ['class' => 'form-control', 'placeholder'=>'Організатор', 'id' =>'search-filter-region'])?>
- </div>
- <div class="form-group col-md-6 col-lg-3 mb-0">
- <label for="search-filter-id">Категорія</label>
- <?=Html::activeDropDownList($searchModel, 'category',
- ArrayHelper::merge(['' => Yii::t('app','Choose')], ArrayHelper::map(\app\models\Category::find()->all(), 'id', 'name')),
- [
- 'class' => 'form-control',
- 'id' => 'search-filter-category'
- ]) ?>
- </div>
- <div class="form-group col-md-6 col-lg-3 mb-0">
- <label for="search-filter-status">Стан торгів</label>
- <?=Html::activeDropDownList($searchModel, 'status',
- [
- '' => Yii::t('app','Choose'),
- '0' => Yii::t('app','pMakeBidding ID'),
- '1' => Yii::t('app','pWaitAuction ID'),
- '2' => Yii::t('app','pMakeAuction ID'),
- '3' => Yii::t('app','pMakeFinal ID'),
- '4' => Yii::t('app','pEndTorg ID')
- ],
- [
- 'class' => 'form-control',
- 'id' => 'search-filter-status'
- ]) ?>
- </div>
- <div class="form-group col-md-6 col-lg-3 mb-0">
- <label for="search-filter-type">Тип аукціону</label>
- <?=Html::activeDropDownList($searchModel, 'type',
- [
- '' => Yii::t('app','Choose'),
- '1' => 'Аукціон на підвищення',
- '2' => 'Голландський аукціон'
- ],
- [
- 'class' => 'form-control',
- 'id' => 'search-filter-type'
- ]) ?>
- </div>
- </div>
- <div class="row no-gutters">
- <div class="col mt-3">
- <a class="link-secondary" href="/publishing" id="reset-btn" name="search-clear">Очистити фільтр</a>
- </div>
- </div>
- </div>
- <?php ActiveForm::end();?>
- </div>
- <!-- start items -->
- </div>
- <section class="content bordered">
- <?= ListView::widget([
- 'dataProvider'=>$dataProvider ,
- 'itemView' => '_forms/_auctions',
- 'layout' => "{items}",
- ]) ?>
- </section>
- <?= \yii\widgets\LinkPager::widget([
- 'pagination'=>$dataProvider->pagination,
- 'prevPageLabel' => '←',
- 'nextPageLabel' => '→',
- 'options' => [
- 'class' => 'pagination justify-content-center',
- ],
- // Customzing CSS class for pager link
- 'linkOptions' => ['class' => 'page-link'],
- 'activePageCssClass' => 'page-item active',
- 'disabledPageCssClass' => 'hidden page-item',
- ]); ?>
- </div>
- </section>
- </div>
|