Blame view

frontend/views/layouts/main.php 19.8 KB
eb7e82fb   Administrator   29.02.16
1
  <?php

716f52bf   Yarik   Commit
2
      

239b3249   Yarik   test
3
4
      /* @var $this \yii\web\View */

      /* @var $content string */

716f52bf   Yarik   Commit
5
      

236a608c   Yarik   test
6
      use common\modules\comment\models\CommentProject;

239b3249   Yarik   test
7
      use yii\helpers\Html;

93a7a3c1   Yarik   test
8
      use yii\helpers\Url;

239b3249   Yarik   test
9
10
      use yii\widgets\Menu;

      use frontend\assets\AppAsset;

716f52bf   Yarik   Commit
11
      

239b3249   Yarik   test
12
      AppAsset::register($this);

eb7e82fb   Administrator   29.02.16
13
14
15
16
17
18
19
20
21
  ?>

  

  <?php $this->beginPage() ?>

  

  <!DOCTYPE html>

  

  <html lang="<?= Yii::$app->language ?>">

  

  <head>

716f52bf   Yarik   Commit
22
23
      

      

eb7e82fb   Administrator   29.02.16
24
      <meta charset="<?= Yii::$app->charset ?>">

716f52bf   Yarik   Commit
25
      

eb7e82fb   Administrator   29.02.16
26
      <?= Html::csrfMetaTags() ?>

716f52bf   Yarik   Commit
27
      

eb7e82fb   Administrator   29.02.16
28
      <title><?= Html::encode($this->title) ?></title>

eb7e82fb   Administrator   29.02.16
29
      <?php $this->head() ?>

595ab5d0   Alex Savenko   add favicon
30
31
32
33
34
      <?php $this->registerLinkTag([

          'rel' => 'shortcut icon',

          'type' => 'image/x-icon',

          'href' => '/images/favicon.ico',

      ]);?>

eb7e82fb   Administrator   29.02.16
35
36
37
38
39
40
41
42
43
44
  

  </head>

  

  <body onload=" initialize()">

  

  <?php $this->beginBody() ?>

  <div class="section-box header">

      <div class="section-box first-header">

          <div class="box-wr">

              <div class="box-all">

b0fb83c1   Alex Savenko   logo git update
45
                  <a href="/" class="new_logo"><img class="logo" src="/images/logo_proektant_02.png" width="100" height="68" alt=""/></a>

b4b45984   Yarik   Commit
46
                  <div class="header-proektant-slogan"><?php /*Международная Федерация Проектантов<br/>Engineers International Federation*/ ?></div>

eb7e82fb   Administrator   29.02.16
47
                  <ul class="header-contacts-menu">

239b3249   Yarik   test
48
49
50
51
52
53
                      <li>

                          <span><img src="/images/icon_question_01.png" alt=""/></span><?= Html::a('Задать вопрос', '', [ 'class' => 'contactsLinkModalFirst' ]) ?>

                      </li>

                      <li>

                          <span><img src="/images/icon_help_01.png" alt=""/></span><?= Html::a('Помощь', [ '/site/help' ], [ 'class' => 'contactsLinkModal' ]) ?>

                      </li>

eb7e82fb   Administrator   29.02.16
54
55
56
                  </ul>

                  <div class="header-cabinet-wr">

                      <?php

239b3249   Yarik   test
57
                          if(Yii::$app->user->isGuest): ?>

716f52bf   Yarik   Commit
58
                              <div class="header-cabinet-foto"></div>

239b3249   Yarik   test
59
60
                              <div class="header-cabinet-profile not-login">Профиль</div>

                              <div>

716f52bf   Yarik   Commit
61
62
                                  <?= Html::a('Вход', [ '/site/login' ], [ 'class' => 'loginLinkModal header-cabinet-link' ]) ?>

                                  <?= Html::a('Регистрация', [ '/site/registration' ], ['class' => 'header-cabinet-link']) ?>

239b3249   Yarik   test
63
                              </div>

716f52bf   Yarik   Commit
64
                          

239b3249   Yarik   test
65
                          <?php else : ?>

716f52bf   Yarik   Commit
66
67
68
69
70
71
72
73
74
                              <a href="<?php echo \Yii::$app->user->identity->getLink(); ?>">

                                  <div class="header-cabinet-foto">

                                      <?php

                                          if(!empty( \Yii::$app->user->identity->userInfo->image )) {

                                              echo Html::a(Html::img(Yii::$app->user->identity->minImg(Yii::$app->user->identity->userInfo->image, 48, 48)), \Yii::$app->user->identity->getLink());

                                          }

                                      ?>

                                  </div>

                              </a>

239b3249   Yarik   test
75
                              <div class="header-cabinet-profile">Профиль</div>

716f52bf   Yarik   Commit
76
                              <?= Html::a(Yii::$app->user->identity->email, [ '/accounts' ], ['class' => 'header-cabinet-link']) ?>

239b3249   Yarik   test
77
                          <?php endif; ?>

716f52bf   Yarik   Commit
78
                  

eb7e82fb   Administrator   29.02.16
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
                  </div>

              </div>

          </div>

      </div>

  </div>

  <div class="section-box menu-header-all">

      <div class="box-wr">

          <div class="box-all">

              <ul class="main-menu main-menu-buttons">

                  <li>

                      <span>Проектантам</span>

                      <div class="main-menu-hover">

                          <ul>

                              

                              <li>

                                  <?php

239b3249   Yarik   test
95
96
97
98
99
                                      if(\Yii::$app->user->isGuest) {

                                          echo Html::a('Войти в профиль', [ 'site/login' ]);

                                      } else {

                                          echo Html::a('Редактировать профиль', [ 'accounts/' ]);

                                      }

eb7e82fb   Administrator   29.02.16
100
101
102
103
                                  ?>

                              </li>

                          </ul>

                          <ul>

239b3249   Yarik   test
104
105
106
                              <li><?= Html::a(Yii::t('app', 'Project list'), [ 'search/project' ]) ?></li>

                              <li><?= Html::a('Список вакансий', [ 'search/vacancy' ]) ?></li>

                              <li><?= Html::a('Список заказчиков', [ 'search/customer' ]) ?></li>

eb7e82fb   Administrator   29.02.16
107
108
109
110
111
112
113
114
                          </ul>

                      </div>

                  </li>

                  <li>

                      <span>Заказчикам</span>

                      <div class="main-menu-hover">

                          <ul>

                              

239b3249   Yarik   test
115
116
                              <li><?= Html::a(Yii::t('app', 'Add project'), [ 'accounts/projects-create' ]) ?></li>

                              <li><?= Html::a('Разместить вакансию', [ 'accounts/vacancy' ]) ?></li>

eb7e82fb   Administrator   29.02.16
117
118
119
                          </ul>

                          <ul>

                              

239b3249   Yarik   test
120
121
122
123
124
125
126
127
                              <li><?= Html::a('Список проектантов', [

                                      'search/performer',

                                      'SearchPerformerForm[type]' => '1',

                                  ]) ?></li>

                              <li><?= Html::a('Список проектных компаний', [

                                      'search/performer',

                                      'SearchPerformerForm[type]' => '2',

                                  ]) ?></li>

eb7e82fb   Administrator   29.02.16
128
129
130
131
                          </ul>

                      </div>

                  </li>

                  <li>

d53e9f74   Виталий   git
132
                      <span>Компаниям</span>

eb7e82fb   Administrator   29.02.16
133
134
135
                      <div class="main-menu-hover">

                          <ul>

                              

239b3249   Yarik   test
136
137
138
                              <li><?= Html::a(Yii::t('app', 'Add project'), [ 'accounts/projects-create' ]) ?></li>

                              <li><?= Html::a('Разместить вакансию', [ 'accounts/vacancy-create' ]) ?></li>

                              <li><?= Html::a('Редактировать портфолио', [ 'accounts/portfolio' ]) ?></li>

eb7e82fb   Administrator   29.02.16
139
140
                          </ul>

                          <ul>

239b3249   Yarik   test
141
142
143
                              <li><?= Html::a('Список проектантов', [ 'search/performer' ]) ?></li>

                              <li><?= Html::a(Yii::t('app', 'Project list'), [ 'search/project' ]) ?></li>

                              <li><?= Html::a('Список заказчиков', [ 'search/customer' ]) ?></li>

eb7e82fb   Administrator   29.02.16
144
145
146
147
                          </ul>

                      </div>

                  </li>

              </ul>

716f52bf   Yarik   Commit
148
              

eb7e82fb   Administrator   29.02.16
149
              <div class="search-main-menu">

236a608c   Yarik   test
150
                  <form action="<?= Url::to([ 'search/common' ]) ?>" method="get">

93a7a3c1   Yarik   test
151
152
                      <input value="" name="query" type="text"/>

                      <input type="hidden" value="1" name="action"/>

eb7e82fb   Administrator   29.02.16
153
154
                      <button type="submit" value=""></button>

                      <div class="search-list">

239b3249   Yarik   test
155
                          <span><?= Yii::t('app', 'Projects') ?></span>

eb7e82fb   Administrator   29.02.16
156
                          <ul class="search-ul">

239b3249   Yarik   test
157
                              <li><?= Yii::t('app', 'Projects') ?></li>

eb7e82fb   Administrator   29.02.16
158
159
160
161
162
163
164
165
166
                              <li>Исполнители</li>

                              <li>Заказчики</li>

                          </ul>

                      </div>

                  </form>

              </div>

              <?php

                  if(!\Yii::$app->user->isGuest) {

                      echo Menu::widget([

239b3249   Yarik   test
167
168
                          'options'     => [

                              'tag'   => 'div',

eb7e82fb   Administrator   29.02.16
169
170
171
172
173
                              'class' => 'main-menu-icons-wr',

                          ],

                          'itemOptions' => [

                              'tag' => false,

                          ],

239b3249   Yarik   test
174
                          'items'       => [

eb7e82fb   Administrator   29.02.16
175
                              [

239b3249   Yarik   test
176
                                  'url'      => [ '/projects' ],

716f52bf   Yarik   Commit
177
                                  'template' => '<a href="{url}" class="main-menu-icons-home">' . ( ( !empty( \Yii::$app->user->identity->commentProjectsActive ) ) ? ( '<span>' . count(\Yii::$app->user->identity->commentProjectsActive) . '</span>' ) : ( '' ) ) . '</a>',

eb7e82fb   Administrator   29.02.16
178
179
                              ],

                              [

239b3249   Yarik   test
180
                                  'url'      => [ 'chat/list' ],

716f52bf   Yarik   Commit
181
                                  'template' => '<a href="{url}" class="main-menu-icons-edit">' . ( ( !empty( \Yii::$app->user->identity->newMessagesCount ) ) ? ( '<span>' . \Yii::$app->user->identity->newMessagesCount . '</span>' ) : ( '' ) ) . '</a>',

eb7e82fb   Administrator   29.02.16
182
183
                              ],

                              [

239b3249   Yarik   test
184
                                  'url'      => [ '/bookmarks' ],

716f52bf   Yarik   Commit
185
                                  'template' => '<a href="{url}" class="main-menu-icons-copy">' . ( ( !empty( \Yii::$app->user->identity->bookmarks ) ) ? ( '<span>' . count(\Yii::$app->user->identity->bookmarks) . '</span>' ) : ( '' ) ) . '</a>',

eb7e82fb   Administrator   29.02.16
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
                              ],

                          ],

                      ]);

                  }

              ?>

          </div>

      </div>

  </div>

  <!--end header-->

  

  <div class="section-box content">

      <?= $content ?>

  </div>

  

  

  <div class="section-box footer">

      <div class="section-box footer-all">

          <div class="box-wr">

              <div class="box-all">

                  <div class="footer-all-wr">

                      <div class="footer-menu-wrapper first-footer-menu">

                          <?php

239b3249   Yarik   test
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
                              $items = [

                                  [

                                      'label' => Yii::t('app', 'Projects'),

                                      'url'   => [ 'search/project' ],

                                  ],

                                  [

                                      'label' => 'Вакансии',

                                      'url'   => [ 'search/vacancy' ],

                                  ],

                                  [

                                      'label' => 'Рейтинг проектантов',

                                      'url'   => [ 'search/performer' ],

                                  ],

                              ];

                              if(empty( \Yii::$app->user->id )) {

                                  array_unshift($items, [

                                      'label' => 'Регистрация проектанта',

                                      'url'   => [ '/site/registration' ],

                                  ]);

                              }

eb7e82fb   Administrator   29.02.16
228
229
230
231
                              echo Menu::widget([

                                  'options' => [

                                      'class' => 'footer-menu',

                                  ],

236a608c   Yarik   test
232
                                  'items'   => $items,

eb7e82fb   Administrator   29.02.16
233
                              ]);

236a608c   Yarik   test
234
                              unset( $items );

eb7e82fb   Administrator   29.02.16
235
236
                          ?>

                      </div>

716f52bf   Yarik   Commit
237
                      

eb7e82fb   Administrator   29.02.16
238
239
                      <div class="footer-menu-wrapper second-footer-menu">

                          <?php

239b3249   Yarik   test
240
241
242
                              $items = [

                                  [

                                      'label' => 'Рейтинг компаний',

236a608c   Yarik   test
243
244
245
246
247
                                      'url'   => [

                                          'search/performer',

                                          'SearchPerformerForm[type]' => 2,

                                      ],

                                  ],

239b3249   Yarik   test
248
249
250
251
252
253
254
                              ];

                              if(empty( \Yii::$app->user->id )) {

                                  array_unshift($items, [

                                      'label' => 'Регистрация заказчика',

                                      'url'   => [ '/site/registration' ],

                                  ]);

                              }

eb7e82fb   Administrator   29.02.16
255
256
257
258
                              echo Menu::widget([

                                  'options' => [

                                      'class' => 'footer-menu',

                                  ],

239b3249   Yarik   test
259
                                  'items'   => $items,

eb7e82fb   Administrator   29.02.16
260
                              ]);

236a608c   Yarik   test
261
                              unset( $items );

eb7e82fb   Administrator   29.02.16
262
263
264
265
                          ?>

                          <div class="footer-menu-project">

                              <?php

                                  echo Menu::widget([

239b3249   Yarik   test
266
267
                                      'options'      => [

                                          'tag'   => 'div',

eb7e82fb   Administrator   29.02.16
268
269
270
                                          'class' => 'footer-menu-project-ico',

                                      ],

                                      'encodeLabels' => false,

239b3249   Yarik   test
271
                                      'itemOptions'  => [

eb7e82fb   Administrator   29.02.16
272
273
274
                                          'tag' => false,

                                      ],

                                      'linkTemplate' => '<a target="_blank" href="{url}">{label}</a>',

239b3249   Yarik   test
275
                                      'items'        => [

eb7e82fb   Administrator   29.02.16
276
277
                                          [

                                              'label' => "<img src='/images/soc-ico-1.png' alt=''/>",

239b3249   Yarik   test
278
                                              'url'   => 'http://rss.com',

eb7e82fb   Administrator   29.02.16
279
280
281
                                          ],

                                          [

                                              'label' => "<img src='/images/soc-ico-2.png' alt=''/>",

239b3249   Yarik   test
282
                                              'url'   => 'http://twitter.com',

eb7e82fb   Administrator   29.02.16
283
284
285
286
287
288
289
                                          ],

                                      ],

                                  ]);

                              ?>

                              <div class="footer-menu-project-ico-txt">новые проекты</div>

                          </div>

                      </div>

716f52bf   Yarik   Commit
290
                      

eb7e82fb   Administrator   29.02.16
291
292
                      <div class="footer-menu-wrapper third-footer-menu">

                          <?php

239b3249   Yarik   test
293
                              $items = [

eb7e82fb   Administrator   29.02.16
294
295
                                  [

                                      'label' => 'Рейтинг компаний',

236a608c   Yarik   test
296
297
298
299
                                      'url'   => [

                                          'search/performer',

                                          'SearchPerformerForm[type]' => 2,

                                      ],

eb7e82fb   Administrator   29.02.16
300
                                  ],

239b3249   Yarik   test
301
302
303
304
305
306
307
                              ];

                              if(empty( \Yii::$app->user->id )) {

                                  array_unshift($items, [

                                      'label' => 'Регистрация компаний',

                                      'url'   => [ '/site/registration' ],

                                  ]);

                              }

eb7e82fb   Administrator   29.02.16
308
309
                              echo Menu::widget([

                                  'options' => [

239b3249   Yarik   test
310
                                      'class' => 'footer-menu',

eb7e82fb   Administrator   29.02.16
311
                                  ],

236a608c   Yarik   test
312
                                  'items'   => $items,

239b3249   Yarik   test
313
                              ]);

236a608c   Yarik   test
314
                              unset( $items );

239b3249   Yarik   test
315
316
317
318
319
320
321
                          ?>

                          <div class="footer-menu-project-two">

                              <?php

                                  echo Menu::widget([

                                      'options'      => [

                                          'tag'   => 'div',

                                          'class' => 'footer-menu-project-ico',

eb7e82fb   Administrator   29.02.16
322
                                      ],

239b3249   Yarik   test
323
324
325
                                      'encodeLabels' => false,

                                      'itemOptions'  => [

                                          'tag' => false,

eb7e82fb   Administrator   29.02.16
326
                                      ],

239b3249   Yarik   test
327
328
329
330
331
332
333
334
335
336
337
338
339
340
                                      'linkTemplate' => '<a target="_blank" href="{url}">{label}</a>',

                                      'items'        => [

                                          [

                                              'label' => "<img src='/images/soc-ico-3.png' alt=''/>",

                                              'url'   => 'http://fb.com',

                                          ],

                                          [

                                              'label' => "<img src='/images/soc-ico-4.png' alt=''/>",

                                              'url'   => 'http://vk.com',

                                          ],

                                          [

                                              'label' => "<img src='/images/soc-ico-5.png' alt=''/>",

                                              'url'   => 'http://plus.google.com',

                                          ],

eb7e82fb   Administrator   29.02.16
341
                                      ],

239b3249   Yarik   test
342
                                  ]);

eb7e82fb   Administrator   29.02.16
343
344
345
346
                              ?>

                              <div class="footer-menu-project-ico-txt">новости сервера</div>

                          </div>

                      </div>

716f52bf   Yarik   Commit
347
                      

eb7e82fb   Administrator   29.02.16
348
349
                      <div class="footer-menu-wrapper last-footer-menu">

                          <?php

93a7a3c1   Yarik   test
350
                              /* No content

239b3249   Yarik   test
351
352
353
                              echo Menu::widget([

                                  'options' => [

                                      'class' => 'footer-menu',

eb7e82fb   Administrator   29.02.16
354
                                  ],

239b3249   Yarik   test
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
                                  'items'   => [

                                      [

                                          'label' => 'Русский',

                                          'url'   => [ ' ' ],

                                      ],

                                      [

                                          'label' => 'Конфиденциальность',

                                          'url'   => [ ' ' ],

                                      ],

                                      [

                                          'label' => 'Условия использования',

                                          'url'   => [ ' ' ],

                                      ],

                                      [

                                          'label' => 'Файлы cookie',

                                          'url'   => [ ' ' ],

                                      ],

                                      [

                                          'label' => 'Реклама',

                                          'url'   => [ ' ' ],

                                      ],

                                      [

                                          'label' => 'Ad Choices',

                                          'url'   => [ ' ' ],

                                      ],

                                      [

                                          'label' => 'Еще',

                                          'url'   => [ ' ' ],

                                      ],

eb7e82fb   Administrator   29.02.16
384
                                  ],

239b3249   Yarik   test
385
                              ]);

93a7a3c1   Yarik   test
386
                              */

eb7e82fb   Administrator   29.02.16
387
388
                          ?>

                      </div>

716f52bf   Yarik   Commit
389
                  

eb7e82fb   Administrator   29.02.16
390
391
392
393
                  </div>

              </div>

          </div>

      </div>

716f52bf   Yarik   Commit
394
      

eb7e82fb   Administrator   29.02.16
395
396
397
398
399
400
401
402
403
      <div class="section-box artweb-footer-all">

          <div class="box-wr">

              <div class="box-all">

                  <div class="copyright">

                      Proektant © 2015

                  </div>

                  <div class="artweb-wr">

                      <a target="_blank" href="http://artweb.ua/">Создание сайтов</a>

                      <div class="artweb-img">

239b3249   Yarik   test
404
                          <a target="_blank" href="http://artweb.ua/"><img src="/images/artweb.png"/></a>

eb7e82fb   Administrator   29.02.16
405
406
407
408
409
410
411
412
413
414
415
416
417
                      </div>

                  </div>

              </div>

          </div>

      </div>

  </div>

  <?php $this->endBody() ?>

  

  </body>

  

  </html>

  

  <?php $this->endPage() ?>