Blame view

frontend/views/tender/view.php 14.7 KB
97fb6489   Yarik   test
1
2
  <?php
  
2261f70a   Yarik   test
3
4
5
6
7
      /**
       * @var View $this
       * @var Project $model
       */
      use common\models\Project;
b5becf98   Yarik   test
8
      use common\modules\comment\models\Comment;
2261f70a   Yarik   test
9
      use \yii\helpers\Html;
7e6d3f52   Administrator   24.02.16
10
  use yii\helpers\Url;
2261f70a   Yarik   test
11
12
      use yii\web\View;
      use yii\widgets\DetailView;
97fb6489   Yarik   test
13
14
15
  
  $this->title = 'My Yii Application';
  ?>
97fb6489   Yarik   test
16
17
  <div class="section-box content">
      <div class="section-box-tender">
7e6d3f52   Administrator   24.02.16
18
          <div class="section-box-tender-title"><?= $model->name ?></div>
97fb6489   Yarik   test
19
20
21
22
23
          <div class="section-box">
              <div class="box-wr">
                  <div class="box-all">
                      <div class="tender-contract-wr style">
                          <div class="tender-contract-left">
7e6d3f52   Administrator   24.02.16
24
                              <?php if(!empty($model->parent->name)):?>
97fb6489   Yarik   test
25
26
                              <div class="srch-prof-contract-button">ПОДРЯД</div>
                              <div class="srch-prof-contract-txt">
b9a54f61   Yarik   test
27
                                  <span>Из заказа: </span><?= Html::a($model->parent->name, Url::toRoute(['tender/view', 'tender_id' =>$model->parent->project_id ])) ?>
97fb6489   Yarik   test
28
                              </div>
7e6d3f52   Administrator   24.02.16
29
                              <?php endif; ?>
97fb6489   Yarik   test
30
31
                          </div>
                          <div class="tender-contract-right">
7e6d3f52   Administrator   24.02.16
32
                              <span>Бюджет: <?= $model->budget?> <?= $model->budgetCurrency->label?></span>
97fb6489   Yarik   test
33
34
35
36
37
                              <img src="/images/tender/ico-1.png" alt=""/>
                          </div>
                      </div>
                      <div class="tender-date style">
                          <div class="srch-prof-params srch-prof-params-clock">
7e6d3f52   Administrator   24.02.16
38
                              <img src="/images/ico-clock.png" alt=""><span><?= Yii::$app->formatter->asDatetime($model->date_end, 'dd.MM.Y')?></span>
97fb6489   Yarik   test
39
40
41
42
43
44
45
46
47
48
49
50
                          </div>
                      </div>
                  </div>
              </div>
          </div>
      </div>
      <div class="section-box-15 tender-page">
          <div class="box-wr">
              <div class="box-all">
                  <div class="section-box">
                      <div class="cabinet-message-read-autor-wr style">
                          <div class="cabinet-message-read-foto-wr">
4ff3ca88   Yarik   test
51
                              <div class="cabinet-message-read-foto"><img src="<?= ($model->user->userInfo->image)?:'' ?>" alt=""/></div>
97fb6489   Yarik   test
52
53
                          </div>
                          <div class="cab-mes-read-cont">
eb7e82fb   Administrator   29.02.16
54
                              <div class="cab-mes-read-cont-title"><?= $model->user->owner->name ?></div>
97fb6489   Yarik   test
55
56
57
58
59
60
61
62
                              <div class="cab-mes-read-cont-stars">
                                  <div class="rating">
                                      <!--оценка-->
                                      <input type="hidden" class="val" value="4"/>
                                  </div>
                              </div>
                              <div class="cab-mes-read-cont-com">30 отзывов</div>
                              <div class="cab-mes-read-cont-soc">
eb7e82fb   Administrator   29.02.16
63
64
65
66
                                  <?= Html::a(Html::img('/images/ico-fb.png'),"{$model->user->userInfo->social_fb}",['target'=>'_blank'])?>
                                  <?= Html::a(Html::img('/images/ico-tw.png'),"{$model->user->userInfo->social_t}", ['target'=>'_blank'])?>
                                  <?= Html::a(Html::img('/images/ico-in.png'),"{$model->user->userInfo->social_in}",['target'=>'_blank'])?>
                                  <?= Html::a(Html::img('/images/ico-vk.png'),"{$model->user->userInfo->social_vk}",['target'=>'_blank'])?>
97fb6489   Yarik   test
67
68
                              </div>
                          </div>
cc4e7c12   Yarik   test
69
70
71
72
73
74
75
                          <?php
                              if(!empty( \Yii::$app->user->identity )) {
                                  ?>
                                  <div class="performance-vacancy-add-favorite">
                                      <?php
                                          if($model->isBookmarked) {
                                              echo Html::a('', [ '#' ], [
3c618303   Yarik   test
76
                                                  'class'   => 'artbox_bookmark_remove_project',
cc4e7c12   Yarik   test
77
78
79
80
                                                  'data-id' => $model->project_id,
                                              ]);
                                          } else {
                                              echo Html::a('', [ '#' ], [
3c618303   Yarik   test
81
                                                  'class'   => 'artbox_bookmark_add_project',
cc4e7c12   Yarik   test
82
83
84
85
86
87
88
89
                                                  'data-id' => $model->project_id,
                                              ]);
                                          }
                                      ?>
                                  </div>
                                  <?php
                              }
                          ?>
97fb6489   Yarik   test
90
91
92
93
94
95
                          <div class="cab-mes-read-last-visit">
                              <div class="cab-mes-read-min-bl" style="width: 204px">
                                  <div class="profile-phone-site style">
                                      <div class="style">
                                          <div class="profile-phone">
                                              <img src="/images/sidebar-ico/ico-2.png" alt="">
eb7e82fb   Administrator   29.02.16
96
                                              <span style="font-size: 13px" class="sidebar-views-txt">На сайте: </span><?= $model->user->liveTime?>
97fb6489   Yarik   test
97
98
99
100
                                          </div>
                                      </div>
                                  </div>
                              </div>
eb7e82fb   Administrator   29.02.16
101
102
103
104
105
106
107
108
109
110
  <!--                            <div class="cab-mes-read-min-bl">-->
  <!--                                <div class="profile-phone-site style">-->
  <!--                                    <div class="style">-->
  <!--                                        <div class="profile-phone" style="width: 175px">-->
  <!--                                            <img src="/images/sidebar-ico/ico-4.png" alt="">-->
  <!--                                            <span style="font-size: 13px" class="sidebar-views-txt">Последнее обновление:<br></span><p style="padding-left: 24px">1 ноября 2015</p>-->
  <!--                                        </div>-->
  <!--                                    </div>-->
  <!--                                </div>-->
  <!--                            </div>-->
97fb6489   Yarik   test
111
112
113
114
115
                              <div class="cab-mes-read-min-bl" style="margin-top: 25px; width: 204px">
                                  <div class="profile-phone-site style">
                                      <div class="style">
                                          <div class="profile-phone">
                                              <img src="/images/sidebar-ico/ico-3.png" alt="">
eb7e82fb   Administrator   29.02.16
116
                                              <span style="font-size: 13px; margin-left: 7px" class="sidebar-views-txt">Последний визит:<br></span><p style="padding-left: 25px"><?= $model->user->userInfo->lastVisit?></p>
97fb6489   Yarik   test
117
118
119
120
                                          </div>
                                      </div>
                                  </div>
                              </div>
eb7e82fb   Administrator   29.02.16
121
                              <?php if($model->user->type == 2):?>
97fb6489   Yarik   test
122
123
124
125
126
                              <div class="cab-mes-read-min-bl" style="margin-top: 25px">
                                  <div class="profile-phone-site style">
                                      <div class="style">
                                          <div class="profile-phone" style="width: 175px">
                                              <img src="/images/sidebar-ico/ico-5.png" alt="">
eb7e82fb   Administrator   29.02.16
127
                                              <span style="font-size: 13px" class="sidebar-views-txt">Сотрудники: </span><?= $model->user->companyInfo->staff?>
97fb6489   Yarik   test
128
129
130
131
                                          </div>
                                      </div>
                                  </div>
                              </div>
eb7e82fb   Administrator   29.02.16
132
133
                              <?php endif; ?>
  
97fb6489   Yarik   test
134
                              <div class="cab-mes-read-min-bl" style="margin-top: 25px; width: 204px">
eb7e82fb   Administrator   29.02.16
135
                              <?php foreach($model->user->phones as $phone ):?>
97fb6489   Yarik   test
136
137
138
139
                                  <div class="profile-phone-site style">
                                      <div class="style">
                                          <div class="profile-phone">
                                              <img src="/images/ico-phone.png" alt="">
eb7e82fb   Administrator   29.02.16
140
                                              <span style="margin-left: 3px"><?= $phone['phone'] ?></span>
97fb6489   Yarik   test
141
142
143
                                          </div>
                                      </div>
                                  </div>
eb7e82fb   Administrator   29.02.16
144
                              <?php endforeach;?>
97fb6489   Yarik   test
145
146
                              </div>
                              <div class="cab-mes-read-min-bl" style="margin-top: 25px">
eb7e82fb   Administrator   29.02.16
147
                              <?php foreach($model->user->site as $site ):?>
97fb6489   Yarik   test
148
149
150
151
                                  <div class="profile-phone-site style">
                                      <div class="style">
                                          <div class="profile-site">
                                              <img src="/images/ico-site.png" alt="">
eb7e82fb   Administrator   29.02.16
152
                                              <a href="<?= $site['site']?>" target="_blank">Сайт</a>
97fb6489   Yarik   test
153
154
155
                                          </div>
                                      </div>
                                  </div>
eb7e82fb   Administrator   29.02.16
156
                              <?php endforeach;?>
97fb6489   Yarik   test
157
158
159
160
161
162
                              </div>
                          </div>
                      </div>
  
                  </div>
                  <div class="section-box-tender-navi">
7e6d3f52   Administrator   24.02.16
163
                      <?php if(!empty($model->parent->name)):?>
b9a54f61   Yarik   test
164
                          <span>Подряд</span><img src="/images/tender/ico-2.png" alt=""/><?= Html::a(Yii::t('app', 'Main project'), Url::toRoute(['tender/view', 'tender_id' =>$model->parent->project_id ])) ?>
7e6d3f52   Administrator   24.02.16
165
                      <?php endif; ?>
97fb6489   Yarik   test
166
167
                  </div>
                  <div class="section-box-tender-info-wr">
b9a54f61   Yarik   test
168
                      <div class="tender-info-title style">Краткая информация о заказе</div>
97fb6489   Yarik   test
169
                      <div class="section-box-tender-txt">
7e6d3f52   Administrator   24.02.16
170
                          <?= $model->description ?>
97fb6489   Yarik   test
171
172
173
174
175
                      </div>
                  </div>
                  <div class="section-box-tender-tags-wr">
                      <div class="section-box-tender-tags-title style">Специализации</div>
                      <div class="section-box-tender-tags style">
7e6d3f52   Administrator   24.02.16
176
177
178
                          <?php foreach($model->specializations as $specialization):?>
                              <span><a href="#"><?= $specialization->specialization_name ?></a>, </span>
                          <?php endforeach; ?>
97fb6489   Yarik   test
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
                      </div>
                  </div>
              </div>
  
          </div>
  
      </div>
      <div class="section-box-map tender-map">
          <div class="shadow-map"></div>
          <div id="map_cloud" style="display: none;">
              <script type="text/javascript">
                  function initialize() {
                      var start_position = new google.maps.LatLng('56', '30');
                      var settings = {
                          zoom: 7,
                          scrollwheel: false,
                          center: start_position,
                          mapTypeControl: false,
                          mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},
                          navigationControl: false,
                          navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL},
                          scaleControl: false,
                          streetViewControl: false,
                          rotateControl: false,
                          zoomControl:true,
                          mapTypeId: google.maps.MapTypeId.ROADMAP};
                      var map = new google.maps.Map(document.getElementById("map_canvas"), settings);
  
                      var image1 = new google.maps.MarkerImage('images/markers/marker-we-1.png',
                          new google.maps.Size(21, 32),
                          new google.maps.Point(0,0),
                          new google.maps.Point(16, 35)
                      );
  
                      var marker = new google.maps.Marker({
                          position: new google.maps.LatLng('56', '35.3'),
                          map: map,
                          title: 'Marker Title2',
                          icon: image1
                      });
  
                  }
              </script>
          </div>
          <div id="map_canvas" style="width: 100%; height:100%;"></div>
      </div>
2261f70a   Yarik   test
225
226
227
      <?php
          echo \common\modules\comment\widgets\CommentWidget::widget([
              'context'       => $this,
b5becf98   Yarik   test
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
              'model'         => $model->className(),
              'model_id'      => $model->project_id,
              'comment_class' => \common\modules\comment\models\CommentProjectAnswer::className(),
              'class_options' => [
                  'scenario'     => is_int(\Yii::$app->user->getId()) ? \common\modules\comment\models\Comment::SCENARIO_USER : \common\modules\comment\models\Comment::SCENARIO_GUEST,
                  'user_id'      => \Yii::$app->user->getId(),
                  'guestComment' => false,
                  'status'       => \common\modules\comment\models\Comment::STATUS_ACTIVE,
              ],
              'list_options'  => [
                  'view' => 'list-comment-question',
              ],
              'form_options'  => [
                  'view' => 'form-comment-answer',
                  'tag'  => 'span',
              ],
              'options'       => [
                  'class' => 'proektant-comments-wr style',
              ],
          ]);
      ?>
      <?php
          echo \common\modules\comment\widgets\CommentWidget::widget([
              'context'       => $this,
2261f70a   Yarik   test
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
              'model'         => $model::className(),
              'model_id'      => $model->project_id,
              'comment_class' => \common\modules\comment\models\CommentProject::className(),
              'class_options' => [
                  'scenario'     => is_int(\Yii::$app->user->getId()) ? \common\modules\comment\models\Comment::SCENARIO_USER : \common\modules\comment\models\Comment::SCENARIO_GUEST,
                  'user_id'      => \Yii::$app->user->getId(),
                  'guestComment' => false,
                  'status'       => \common\modules\comment\models\CommentProject::STATUS_ACTIVE,
              ],
              'list_options'  => [
                  'view' => 'list-project-comment',
                  'class' => 'section box tender-offer-proj-wr',
              ],
              'form_options'  => [
                  'view'  => 'form-project-comment',
                  'tag'   => 'div',
                  'class' => 'artbox_comment_form section-box tender-add-answer',
              ],
              'options'       => [
                  'tag' => false,
              ],
          ]);
      ?>
97fb6489   Yarik   test
275
  
d02fd466   Yarik   test
276
277
278
279
280
281
282
283
  </div>
  <script>
      $('div.rating, div.rating-new').rating({
          fx: 'full',
          readOnly: 'true',
          url: 'rating.php'
      });
  </script>