| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199 |
- <?php
- use yii\helpers\Html;
- use yii\widgets\DetailView;
- use yii\widgets\ActiveForm;
- use kartik\file\FileInput;
- use dosamigos\gallery\Gallery;
- /* @var $this yii\web\View */
- /* @var $model app\models\Publishing */
- $this->title = $model->name;
- $this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Auction ID'), 'url' => ['index']];
- $this->params['breadcrumbs'][] = $this->title;
- ?>
- <div class="container">
- <div class="panel panel-primary">
- <div class="panel-heading"><span class="glyphicon glyphicon-stats"></span><strong>
- <?= Html::encode(Yii::t('app','PublishAuctionMessage ID')." ".$model->name/*.' / '.Yii::t('app','Lot ID')*/.' #'.$model->lot_num) ?></strong></div>
- <div class="panel-body">
- <div class="publishing-view">
- <div class="row">
- <div class="col-md-6">
- <div class="well well-sm">
- <h5><strong><?= Yii::t('app','PublishLotInfo ID') ?></strong></h5>
- <?= DetailView::widget([
- 'model' => $model,
- 'attributes' => [
- 'lotName',
- 'lotDesc',
- 'lotPrice',
- 'lotStep',
- 'statusName',
- [
- 'attribute' => 'lot.count',
- 'value' => $model->lot->count,
- 'visible' => $model->lot->count,
- ],
- [
- 'attribute' => 'lot.price_per_one',
- 'value' => $model->lot->count ? ($model->lot->start_price / $model->lot->count) . ' грн' : '',
- 'visible' => $model->lot->unitId ? true : false,
- ],
- [
- 'attribute' => 'lot.unitName',
- 'value' => $model->lot->unitId ? $model->lot->unit->name : '',
- 'visible' => $model->lot->unitId ? true : false,
- ],
- ],
- ]) ?>
- </div>
- </div>
- <div class="col-md-6">
- <div class="well well-sm">
- <h5><strong><?= Yii::t('app','PublishAucInfo ID') ?></strong></h5>
- <?= DetailView::widget([
- 'model' => $model,
- 'attributes' => [
- //'created_at:datetime',
- 'endBidding',
- 'date_start',
- ],
- ]) ?>
- </div>
- <div>
- <?php
- $items = [];
- $thumbnails = $model->lot->thumbnails;
- $images = $model->lot->images;
- foreach($images as $index => $image){
- $items[] = [
- 'src' => '/' . $thumbnails[$index]->path,
- 'url' => '/'.$images[$index]->path,
- ];
- }
- ?>
- <!-- <?/*='<pre>';*/?>
- --><?php /*print_r($items);die(); */?>
- <?= Gallery::widget(['items' => $items]);?>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-md-12">
- <div class="well well-sm">
- <h5><strong><?= Yii::t('app','PublishMemReq ID') ?></strong></h5>
- <?= DetailView::widget([
- 'model' => $model->lot,
- 'attributes' => [
- [
- 'attribute' => 'member_require',
- 'label' => Yii::t('app','MemberRequire ID'),
- ],
- 'term_procedure',
- /*[
- 'attribute' => 'member_docs',
- 'label' => '',
- ],*/
- ],
- ]) ?>
- <?= DetailView::widget([
- 'model' => $model->lot,
- 'attributes' => [
- [
- 'attribute' => 'address',
- 'label' => Yii::t('app','AddressTo ID'),
- ],
- 'payment_term',
- 'notes',
- //'delivery_time',
- //'delivery_term',
- ],
- ]) ?>
- <h5><strong><?= Yii::t('app','PublishFiles ID') ?></strong></h5>
- <?= $this->render('_alert.php') ?>
- <?php
- if(isset($model->lot->docs_id))
- {
- $docs = Html::a(Yii::t('app','Download ID'), ['/files/download','id'=> $model->lot->docs_id], ['class' => 'glyphicon glyphicon-circle-arrow-down row1']);
- }
- if(empty($docs)) { $docs = null;}
- $dogovor = Html::a(Yii::t('app','Download ID'), ['/files/download','id'=> $model->lot->dogovor_id], ['class' => 'glyphicon glyphicon-circle-arrow-down row1']);
- ?>
- <?= DetailView::widget([
- 'model' => $model->lot,
- 'attributes' => [
- [
- 'attribute' => 'docs_id',
- 'value' => $docs,
- 'format' => 'raw',
- ],
- [
- 'attribute' => 'dogovor_id',
- 'value' => $dogovor,
- 'format' => 'raw',
- ]
- ],
- ]) ?>
- <?php
- $protocol = $model->getProtocol();
- if(Yii::$app->user->can('admin'))
- {
- if(!$protocol&&$model->status==3)
- {
- echo Html::a(Yii::t('app','CreateDoc ID'), ['/publishing/doc','id'=> $model->id], ['class' => 'glyphicon glyphicon-circle-arrow-up']);
- $form = ActiveForm::begin([
- 'options'=>['enctype'=>'multipart/form-data'] // important
- ]);
- $files = new \app\models\Files();
- echo $form->field($files, 'file')->widget(FileInput::classname(),[
- 'model' => $files,
- 'options' => ['multiple' => false],
- 'pluginOptions' => ['showPreview' => false,],
- ])->label(Yii::t('app','DownloadProtocol ID'));
- ActiveForm::end();
- }
- }
- if($protocol)
- {
- //echo Html::a($protocol['name'],'/files/download?id='.$protocol['id'],['class'=>'btn btn-link']);
- echo Html::a(Yii::t('app','DownloadProtocol ID'), ['/files/download','id'=> $protocol['id']], ['class' => 'glyphicon glyphicon-circle-arrow-down']);
- }
- ?>
- </div>
- </div>
- </div>
- <div class="row"><div class="col-md-12">
- <!-- <button id="" type="button" class="btn btn-primary" href="javascript:/" onclick="window.close();" role="button"><span class="glyphicon glyphicon-eye-close"></span> Закрити вікно</button> -->
- <a id="btnPubLot" type="button" class="btn btn-primary" href="/lots/view?id=<?php echo $model->lot->id;?>" role="button"><?= Yii::t('app','GoToBid ID')?><span class="glyphicon glyphicon-chevron-right"></span></a>
- <a id="btnPubLot" type="button" class="btn btn-success" href="/auctions/view?id=<?php echo $model->id;?>" role="button"><?= Yii::t('app','GoToAuction ID')?><span class="glyphicon glyphicon-chevron-right"></span></a>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
|