Commit f6ea894129243f61068d2ec7130b8b3f5d766d5d

Authored by Administrator
1 parent 3272f030

09.02.16

common/models/Blog.php
@@ -83,6 +83,12 @@ @@ -83,6 +83,12 @@
83 ]; 83 ];
84 } 84 }
85 85
  86 + public function getDateCreate(){
  87 + return date('Y-m-d',strtotime($this->date_add));
  88 + }
  89 +
  90 +
  91 +
86 /** 92 /**
87 * @inheritdoc 93 * @inheritdoc
88 */ 94 */
common/models/Job.php
@@ -41,6 +41,22 @@ class Job extends \yii\db\ActiveRecord @@ -41,6 +41,22 @@ class Job extends \yii\db\ActiveRecord
41 ]; 41 ];
42 } 42 }
43 43
  44 +
  45 +
  46 + public function getExpTime()
  47 + {
  48 + if($this->date_end){
  49 + $date = new \DateTime(date('Y-m-d H:i:s', $this->date_start));
  50 + return \Yii::$app->formatter->asRelativeTime($date->diff(new \DateTime(date('Y-m-d H:i:s', $this->date_end))));
  51 + } else {
  52 + $now = new \DateTime('now');
  53 + $date = new \DateTime(date('Y-m-d H:i:s', $this->date_start));
  54 + return \Yii::$app->formatter->asRelativeTime($date->diff(new \DateTime(date('Y-m-d H:i:s', $now))));
  55 + }
  56 +
  57 + }
  58 +
  59 +
44 /** 60 /**
45 * @inheritdoc 61 * @inheritdoc
46 */ 62 */
common/models/User.php
@@ -343,9 +343,23 @@ @@ -343,9 +343,23 @@
343 return $this->hasOne(CompanyInfo::className(), [ 'user_id' => 'id' ]); 343 return $this->hasOne(CompanyInfo::className(), [ 'user_id' => 'id' ]);
344 } 344 }
345 345
  346 +
  347 + public function getPhones(){
  348 + return Fields::getData($this->id, self::className(),'phone');
  349 + }
  350 +
  351 +
  352 + public function getSite(){
  353 + return Fields::getData($this->id, self::className(),'site');
  354 + }
  355 +
  356 + public function getAddress(){
  357 + return $this->userInfo->country.', '.$this->userInfo->city.', '.$this->companyInfo->street.', '.$this->companyInfo->house;
  358 + }
  359 +
  360 +
346 public function getLiveTime() 361 public function getLiveTime()
347 { 362 {
348 -  
349 $now = new \DateTime('now'); 363 $now = new \DateTime('now');
350 $date1 = new \DateTime(date('Y-m-d H:i:s', $this->created_at)); 364 $date1 = new \DateTime(date('Y-m-d H:i:s', $this->created_at));
351 return \Yii::$app->formatter->asRelativeTime($date1->diff($now)); 365 return \Yii::$app->formatter->asRelativeTime($date1->diff($now));
@@ -385,6 +399,11 @@ @@ -385,6 +399,11 @@
385 return $this->hasMany(Blog::className(), [ 'user_id' => 'id' ]); 399 return $this->hasMany(Blog::className(), [ 'user_id' => 'id' ]);
386 } 400 }
387 401
  402 + public function getJobs()
  403 + {
  404 + return $this->hasMany(Job::className(), [ 'user_id' => 'id' ]);
  405 + }
  406 +
388 public function getSpecializationInput() 407 public function getSpecializationInput()
389 { 408 {
390 return $this->getSpecializations() 409 return $this->getSpecializations()
frontend/config/main.php
@@ -66,6 +66,8 @@ return [ @@ -66,6 +66,8 @@ return [
66 'landing/<view:[\w-]+>' => 'landing/view', 66 'landing/<view:[\w-]+>' => 'landing/view',
67 'performer/blog-view/<performer_id:[\w-]+>/<link:[\w-]+>' => 'performer/blog-view', 67 'performer/blog-view/<performer_id:[\w-]+>/<link:[\w-]+>' => 'performer/blog-view',
68 'performer/<action>/<performer_id:[\w-]+>' => 'performer/<action>', 68 'performer/<action>/<performer_id:[\w-]+>' => 'performer/<action>',
  69 + 'company/blog-view/<company_id:[\w-]+>/<link:[\w-]+>' => 'company/blog-view',
  70 + 'company/<action>/<company_id:[\w-]+>' => 'company/<action>',
69 71
70 ] 72 ]
71 ], 73 ],
frontend/controllers/CompanyController.php
1 <?php 1 <?php
2 namespace frontend\controllers; 2 namespace frontend\controllers;
3 3
  4 +use common\models\Fields;
4 use Yii; 5 use Yii;
5 use common\models\LoginForm; 6 use common\models\LoginForm;
6 use frontend\models\PasswordResetRequestForm; 7 use frontend\models\PasswordResetRequestForm;
@@ -10,6 +11,7 @@ use frontend\models\ContactForm; @@ -10,6 +11,7 @@ use frontend\models\ContactForm;
10 use frontend\models\Options; 11 use frontend\models\Options;
11 use frontend\models\OptionValues; 12 use frontend\models\OptionValues;
12 use yii\base\InvalidParamException; 13 use yii\base\InvalidParamException;
  14 +use yii\helpers\ArrayHelper;
13 use yii\web\BadRequestHttpException; 15 use yii\web\BadRequestHttpException;
14 use yii\web\Controller; 16 use yii\web\Controller;
15 use yii\filters\VerbFilter; 17 use yii\filters\VerbFilter;
@@ -50,52 +52,97 @@ class CompanyController extends Controller @@ -50,52 +52,97 @@ class CompanyController extends Controller
50 52
51 public function actionIndex() 53 public function actionIndex()
52 { 54 {
53 - $this->redirect(['site/index']); 55 + $this->redirect('site/index');
54 } 56 }
55 57
56 - public function actionCommon(/*$company_id*/) 58 + public function actionCommon($company_id)
57 { 59 {
58 - return $this->render('common'); 60 + $company = User::findOne($company_id);
  61 +
  62 + $educations = Fields::getData($company->id,$company->className(),'education');
  63 + $phones = Fields::getData($company->id,$company->className(),'phone');
  64 + $sites = Fields::getData($company->id,$company->className(),'site');
  65 + $soft = implode(', ',ArrayHelper::getColumn(Fields::getData($company->id,$company->className(),'soft'), 'soft'));
  66 +
  67 + return $this->render('common',[
  68 + 'company' => $company,
  69 + 'educations' => $educations,
  70 + 'phones' => $phones,
  71 + 'sites' => $sites,
  72 + 'soft' => $soft
  73 + ]);
59 } 74 }
60 75
61 - public function actionPortfolio(/*$company_id*/) 76 + public function actionPortfolio($company_id)
62 { 77 {
63 - return $this->render('portfolio'); 78 + $company = User::findOne($company_id);
  79 +
  80 + return $this->render('portfolio',[
  81 + 'company' => $company
  82 + ]);
64 } 83 }
65 84
66 - public function actionTeam(/*$company_id*/) 85 + public function actionTeam($company_id)
67 { 86 {
68 - return $this->render('team'); 87 + $company = User::findOne($company_id);
  88 +
  89 + return $this->render('team',[
  90 + 'company' => $company
  91 + ]);
69 } 92 }
70 93
71 - public function actionBlogList(/*$company_id*/) 94 + public function actionBlogList($company_id)
72 { 95 {
73 - return $this->render('blog-list'); 96 + $company = User::findOne($company_id);
  97 +
  98 + return $this->render('blog-list',[
  99 + 'company' => $company
  100 + ]);
74 } 101 }
75 102
76 - public function actionBlogView(/*$company_id, $article_id*/) 103 + public function actionBlogView($company_id, $article_id)
77 { 104 {
78 - return $this->render('blog-view'); 105 + $company = User::findOne($company_id);
  106 +
  107 + return $this->render('blog-view',[
  108 + 'company' => $company
  109 + ]);
79 } 110 }
80 111
81 - public function actionReview(/*$company_id*/) 112 + public function actionReview($company_id)
82 { 113 {
83 - return $this->render('review'); 114 + $company = User::findOne($company_id);
  115 +
  116 + return $this->render('review',[
  117 + 'company' => $company
  118 + ]);
84 } 119 }
85 120
86 - public function actionVacancyList(/*$company_id*/) 121 + public function actionVacancyList($company_id)
87 { 122 {
88 - return $this->render('vacancy-list'); 123 + $company = User::findOne($company_id);
  124 +
  125 + return $this->render('vacancy-list',[
  126 + 'company' => $company
  127 + ]);
89 } 128 }
90 129
91 - public function actionVacancyView(/*$company_id, $vacancy_id*/) 130 + public function actionVacancyView($company_id, $vacancy_id)
92 { 131 {
93 - return $this->render('vacancy-view'); 132 + $company = User::findOne($company_id);
  133 +
  134 + return $this->render('vacancy-view',[
  135 + 'company' => $company
  136 + ]);
94 } 137 }
95 138
96 - public function actionGallery(/*$company_id*/) 139 + public function actionGallery($company_id)
97 { 140 {
  141 + $company = User::findOne($company_id);
  142 +
98 $this->layout = 'gallery-company'; 143 $this->layout = 'gallery-company';
99 - return $this->render('gallery'); 144 + return $this->render('gallery',[
  145 + 'company' => $company
  146 + ]);
100 } 147 }
101 } 148 }
frontend/controllers/PerformerController.php
@@ -109,6 +109,8 @@ class PerformerController extends Controller @@ -109,6 +109,8 @@ class PerformerController extends Controller
109 { 109 {
110 $user = User::findOne($performer_id); 110 $user = User::findOne($performer_id);
111 $article = Blog::findOne(['link'=>$link,'user_id'=>$performer_id]); 111 $article = Blog::findOne(['link'=>$link,'user_id'=>$performer_id]);
  112 + $article->view_count ++;
  113 + $article->save();
112 114
113 115
114 return $this->render('blog-view',[ 116 return $this->render('blog-view',[
@@ -129,6 +131,7 @@ class PerformerController extends Controller @@ -129,6 +131,7 @@ class PerformerController extends Controller
129 public function actionWorkplace($performer_id) 131 public function actionWorkplace($performer_id)
130 { 132 {
131 $user = User::findOne($performer_id); 133 $user = User::findOne($performer_id);
  134 +
132 return $this->render('workplace',[ 135 return $this->render('workplace',[
133 'user' => $user 136 'user' => $user
134 ]); 137 ]);
frontend/views/accounts/general.php
@@ -221,7 +221,7 @@ @@ -221,7 +221,7 @@
221 'model'=> $user_info, 221 'model'=> $user_info,
222 'field'=>'poster', 222 'field'=>'poster',
223 'width'=>1920, 223 'width'=>1920,
224 - 'height'=>235, 224 + 'height'=>380,
225 'multi'=>false, 225 'multi'=>false,
226 'gallery' =>$user_info->poster, 226 'gallery' =>$user_info->poster,
227 'name' => 'Выбрать файл' 227 'name' => 'Выбрать файл'
frontend/views/company/blog-list.php
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 use \yii\helpers\Html; 3 use \yii\helpers\Html;
4 4
5 /* @var $this yii\web\View */ 5 /* @var $this yii\web\View */
6 - 6 +$this->params['company'] = $company;
7 $this->title = 'My Yii Application'; 7 $this->title = 'My Yii Application';
8 ?> 8 ?>
9 <div class="performer-vacancy-vacant-title-reclam-wr style"> 9 <div class="performer-vacancy-vacant-title-reclam-wr style">
frontend/views/company/blog-view.php
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 use \yii\helpers\Html; 2 use \yii\helpers\Html;
3 3
4 /* @var $this yii\web\View */ 4 /* @var $this yii\web\View */
  5 +$this->params['company'] = $company;
5 $this->title = 'My Yii Application'; 6 $this->title = 'My Yii Application';
6 ?> 7 ?>
7 <div class="performer-vacancy-vacant-title-reclam-wr style"> 8 <div class="performer-vacancy-vacant-title-reclam-wr style">
frontend/views/company/common.php
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 use \yii\helpers\Html; 3 use \yii\helpers\Html;
4 4
5 /* @var $this yii\web\View */ 5 /* @var $this yii\web\View */
6 - 6 +$this->params['company'] = $company;
7 $this->title = 'My Yii Application'; 7 $this->title = 'My Yii Application';
8 ?> 8 ?>
9 <div class="company-performer-title style">О компании</div> 9 <div class="company-performer-title style">О компании</div>
frontend/views/company/gallery.php
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 use \yii\helpers\Html; 3 use \yii\helpers\Html;
4 4
5 /* @var $this yii\web\View */ 5 /* @var $this yii\web\View */
6 - 6 +$this->params['company'] = $company;
7 $this->title = 'My Yii Application'; 7 $this->title = 'My Yii Application';
8 ?> 8 ?>
9 <div class="video-performer-wrapper style"> 9 <div class="video-performer-wrapper style">
frontend/views/company/portfolio.php
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 use \yii\helpers\Html; 3 use \yii\helpers\Html;
4 4
5 /* @var $this yii\web\View */ 5 /* @var $this yii\web\View */
6 - 6 +$this->params['company'] = $company;
7 $this->title = 'My Yii Application'; 7 $this->title = 'My Yii Application';
8 ?> 8 ?>
9 <div class="performer-vacancy-vacant-title-reclam-wr style"> 9 <div class="performer-vacancy-vacant-title-reclam-wr style">
frontend/views/company/review.php
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 use \yii\helpers\Html; 3 use \yii\helpers\Html;
4 4
5 /* @var $this yii\web\View */ 5 /* @var $this yii\web\View */
6 - 6 +$this->params['company'] = $company;
7 $this->title = 'My Yii Application'; 7 $this->title = 'My Yii Application';
8 ?> 8 ?>
9 <div class="performer-vacancy-vacant-title-reclam-wr style"> 9 <div class="performer-vacancy-vacant-title-reclam-wr style">
frontend/views/company/team.php
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 use \yii\helpers\Html; 3 use \yii\helpers\Html;
4 4
5 /* @var $this yii\web\View */ 5 /* @var $this yii\web\View */
6 - 6 +$this->params['company'] = $company;
7 $this->title = 'My Yii Application'; 7 $this->title = 'My Yii Application';
8 ?> 8 ?>
9 <div class="command-blocks-wr style"> 9 <div class="command-blocks-wr style">
frontend/views/company/vacancy-list.php
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 use \yii\helpers\Html; 3 use \yii\helpers\Html;
4 4
5 /* @var $this yii\web\View */ 5 /* @var $this yii\web\View */
6 - 6 +$this->params['company'] = $company;
7 $this->title = 'My Yii Application'; 7 $this->title = 'My Yii Application';
8 ?> 8 ?>
9 <div class="performer-vacancy-vacant-title style">Вакансии</div> 9 <div class="performer-vacancy-vacant-title style">Вакансии</div>
frontend/views/company/vacancy-view.php
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 use \yii\helpers\Html; 3 use \yii\helpers\Html;
4 4
5 /* @var $this yii\web\View */ 5 /* @var $this yii\web\View */
6 - 6 +$this->params['company'] = $company;
7 $this->title = 'My Yii Application'; 7 $this->title = 'My Yii Application';
8 ?> 8 ?>
9 <div class="performer-vacancy-list style"><a href="#" >к списку вакансий</a></div> 9 <div class="performer-vacancy-list style"><a href="#" >к списку вакансий</a></div>
frontend/views/layouts/company.php
1 <?php 1 <?php
2 2
  3 +use yii\helpers\Html;
3 use yii\widgets\Breadcrumbs; 4 use yii\widgets\Breadcrumbs;
4 use yii\widgets\Menu; 5 use yii\widgets\Menu;
5 6
@@ -9,7 +10,7 @@ $this-&gt;beginContent(&#39;@app/views/layouts/main.php&#39;); @@ -9,7 +10,7 @@ $this-&gt;beginContent(&#39;@app/views/layouts/main.php&#39;);
9 ?> 10 ?>
10 11
11 <div class="section-box content"> 12 <div class="section-box content">
12 - <div class="section-box-14" style="background: url('/images/performar_vacancy/bg-14.jpg') 50% no-repeat ;"> 13 + <div class="section-box-14" style="background: url(<?= $this->params['company']->userInfo->poster;?>) 50% no-repeat ;">
13 <div class="box-wr"> 14 <div class="box-wr">
14 <div class="box-all"> 15 <div class="box-all">
15 <div class="performance-vacancy-call-back"> 16 <div class="performance-vacancy-call-back">
@@ -39,31 +40,31 @@ $this-&gt;beginContent(&#39;@app/views/layouts/main.php&#39;); @@ -39,31 +40,31 @@ $this-&gt;beginContent(&#39;@app/views/layouts/main.php&#39;);
39 'items' => [ 40 'items' => [
40 [ 41 [
41 'label' => 'Общее', 42 'label' => 'Общее',
42 - 'url' => ['company/common'], 43 + 'url' => ['company/common', 'company_id'=>$this->params['company']->id],
43 ], 44 ],
44 [ 45 [
45 'label' => 'Выполненные работы', 46 'label' => 'Выполненные работы',
46 - 'url' => ['company/portfolio'], 47 + 'url' => ['company/portfolio', 'company_id'=>$this->params['company']->id],
47 ], 48 ],
48 [ 49 [
49 'label' => 'Команда', 50 'label' => 'Команда',
50 - 'url' => ['company/team'], 51 + 'url' => ['company/team', 'company_id'=>$this->params['company']->id],
51 ], 52 ],
52 [ 53 [
53 'label' => 'Вакансии', 54 'label' => 'Вакансии',
54 - 'url' => ['company/vacancy-list'], 55 + 'url' => ['company/vacancy-list', 'company_id'=>$this->params['company']->id],
55 ], 56 ],
56 [ 57 [
57 'label' => 'Блог', 58 'label' => 'Блог',
58 - 'url' => ['company/blog-list'], 59 + 'url' => ['company/blog-list', 'company_id'=>$this->params['company']->id],
59 ], 60 ],
60 [ 61 [
61 'label' => 'Отзывы', 62 'label' => 'Отзывы',
62 - 'url' => ['company/review'], 63 + 'url' => ['company/review', 'company_id'=>$this->params['company']->id],
63 ], 64 ],
64 [ 65 [
65 'label' => 'Галерея', 66 'label' => 'Галерея',
66 - 'url' => ['company/gallery'], 67 + 'url' => ['company/gallery', 'company_id'=>$this->params['company']->id],
67 ], 68 ],
68 ], 69 ],
69 ]); 70 ]);
@@ -102,26 +103,37 @@ $this-&gt;beginContent(&#39;@app/views/layouts/main.php&#39;); @@ -102,26 +103,37 @@ $this-&gt;beginContent(&#39;@app/views/layouts/main.php&#39;);
102 <div class="performance-vacancy-sidebar-comm style">30 отзывов</div> 103 <div class="performance-vacancy-sidebar-comm style">30 отзывов</div>
103 <a href="#" class="performance-vacancy-sidebar-write style">написать отзыв</a> 104 <a href="#" class="performance-vacancy-sidebar-write style">написать отзыв</a>
104 </div> 105 </div>
105 - <div class="performer-vacancy-sidebar-img style"><img src="/images/performar_vacancy/ico-sidebar.jpg" alt=""/></div> 106 + <div class="performer-vacancy-sidebar-img style"><?= Html::img($this->params['company']->userInfo->image);?></div>
106 <div class="performer-vacancy-sidebar-all style"> 107 <div class="performer-vacancy-sidebar-all style">
107 <div class="performer-vacancy-sidebar-soc style"> 108 <div class="performer-vacancy-sidebar-soc style">
108 <ul> 109 <ul>
109 - <li><a target="_blank" href="#"><img src="/images/ico-fb.png" alt=""/></a></li>  
110 - <li><a target="_blank" href="#"><img src="/images/ico-tw.png" alt=""/></a></li>  
111 - <li><a target="_blank" href="#"><img src="/images/ico-in.png" alt=""/></a></li>  
112 - <li><a target="_blank" href="#"><img src="/images/ico-vk.png" alt=""/></a></li> 110 + <li>
  111 + <?= Html::a(Html::img('/images/ico-fb.png'),[$this->params['company']->userInfo->social_fb],['target'=>'_blank'])?>
  112 + </li>
  113 + <li>
  114 + <?= Html::a(Html::img('/images/ico-tw.png'),[$this->params['company']->userInfo->social_t],['target'=>'_blank'])?>
  115 + </li>
  116 + <li>
  117 + <?= Html::a(Html::img('/images/ico-in.png'),[$this->params['company']->userInfo->social_in],['target'=>'_blank'])?>
  118 + </li>
  119 + <li>
  120 + <?= Html::a(Html::img('/images/ico-vk.png'),[$this->params['company']->userInfo->social_vk],['target'=>'_blank'])?>
  121 + </li>
113 </ul> 122 </ul>
114 </div> 123 </div>
115 <div class="performer-vacancy-sidebar-views style"> 124 <div class="performer-vacancy-sidebar-views style">
116 <ul class="style"> 125 <ul class="style">
117 - <li><img src="/images/sidebar-ico/ico-1.png" alt=""/><div class="sidebarvievstxt">2562 просмотра</div></li>  
118 - <li><img src="/images/sidebar-ico/ico-2.png" alt=""/><div class="sidebarvievstxt"><span class="sidebar-views-txt">На сайте: </span>1г. 8 мес.</div></li>  
119 - <li><img src="/images/sidebar-ico/ico-3.png" alt=""/><div class="sidebarvievstxt"><span class="sidebar-views-txt">Последний визит: <br /></span>2 дня назад</div></li>  
120 - <li><img src="/images/sidebar-ico/ico-4.png" alt=""/><div class="sidebarvievstxt"><span class="sidebar-views-txt">Последнее обновление: </span>1 ноября 2015</div></li>  
121 - <li><img src="/images/sidebar-ico/ico-5.png" alt=""/><div class="sidebarvievstxt"><span class="sidebar-views-txt">Сотрудники:<br /></span>Более 400</div></li>  
122 - <li><img src="/images/sidebar-ico/ico-6.png" alt=""/><div class="sidebarvievstxt"><span class="sidebarvievs-phone">+38 (050) 123-45-67</span></div></li>  
123 - <li><img src="/images/sidebar-ico/ico-7.png" alt=""/><div class="sidebarvievstxt"><a target="_blank" href="#">Сайт</a></div></li>  
124 - <li><img src="/images/sidebar-ico/ico-8.png" alt=""/><div class="sidebarvievstxt"><span class="sidebar-views-txt">Адрес:<br /></span>Украина, г. Киев, бульвар Леси Украинки 30В</div></li> 126 + <li><img src="/images/sidebar-ico/ico-1.png" alt=""/><div class="sidebarvievstxt"><?= $this->params['company']->userInfo->view_count;?> просмотра</div></li>
  127 + <li><img src="/images/sidebar-ico/ico-2.png" alt=""/><div class="sidebarvievstxt"><span class="sidebar-views-txt">На сайте: </span><?= $this->params['company']->liveTime?></div></li>
  128 + <li><img src="/images/sidebar-ico/ico-3.png" alt=""/><div class="sidebarvievstxt"><span class="sidebar-views-txt">Последний визит: <br /></span><?= $this->params['company']->userInfo->lastVisit?></div></li>
  129 + <li><img src="/images/sidebar-ico/ico-5.png" alt=""/><div class="sidebarvievstxt"><span class="sidebar-views-txt">Сотрудники:<br /></span><?= $this->params['company']->companyInfo->staff?></div></li>
  130 + <?php foreach($this->params['company']->phones as $phone ):?>
  131 + <li><img src="/images/sidebar-ico/ico-6.png" alt=""/><div class="sidebarvievstxt"><span class="sidebarvievs-phone"><?= $phone['phone'] ?></span></div></li>
  132 + <?php endforeach;?>
  133 + <?php foreach($this->params['company']->site as $site ):?>
  134 + <li><img src="/images/sidebar-ico/ico-7.png" alt=""/><div class="sidebarvievstxt"><a target="_blank" href="<?= $site['site']?>">Сайт</a></div></li>
  135 + <?php endforeach;?>
  136 + <li><img src="/images/sidebar-ico/ico-8.png" alt=""/><div class="sidebarvievstxt"><span class="sidebar-views-txt">Адрес:<br /></span><?= $this->params['company']->address?></div></li>
125 </ul> 137 </ul>
126 </div> 138 </div>
127 </div> 139 </div>
frontend/views/layouts/gallery-company.php
@@ -30,42 +30,42 @@ $this-&gt;beginContent(&#39;@app/views/layouts/main.php&#39;); @@ -30,42 +30,42 @@ $this-&gt;beginContent(&#39;@app/views/layouts/main.php&#39;);
30 <div class="box-wr"> 30 <div class="box-wr">
31 <div class="box-all"> 31 <div class="box-all">
32 <?php 32 <?php
33 - echo Menu::widget([  
34 - 'options' => [  
35 - 'class' => 'menu-content', 33 + echo Menu::widget([
  34 + 'options' => [
  35 + 'class' => 'menu-content',
  36 + ],
  37 + 'activeCssClass' => 'active-menu-content',
  38 + 'items' => [
  39 + [
  40 + 'label' => 'Общее',
  41 + 'url' => ['company/common', 'company_id'=>$this->params['company']->id],
36 ], 42 ],
37 - 'activeCssClass' => 'active-menu-content',  
38 - 'items' => [  
39 - [  
40 - 'label' => 'Общее',  
41 - 'url' => ['company/common'],  
42 - ],  
43 - [  
44 - 'label' => 'Выполненные работы',  
45 - 'url' => ['company/portfolio'],  
46 - ],  
47 - [  
48 - 'label' => 'Команда',  
49 - 'url' => ['company/team'],  
50 - ],  
51 - [  
52 - 'label' => 'Вакансии',  
53 - 'url' => ['company/vacancy-list'],  
54 - ],  
55 - [  
56 - 'label' => 'Блог',  
57 - 'url' => ['company/blog-list'],  
58 - ],  
59 - [  
60 - 'label' => 'Отзывы',  
61 - 'url' => ['company/review'],  
62 - ],  
63 - [  
64 - 'label' => 'Галерея',  
65 - 'url' => ['company/gallery'],  
66 - ], 43 + [
  44 + 'label' => 'Выполненные работы',
  45 + 'url' => ['company/portfolio', 'company_id'=>$this->params['company']->id],
67 ], 46 ],
68 - ]); 47 + [
  48 + 'label' => 'Команда',
  49 + 'url' => ['company/team', 'company_id'=>$this->params['company']->id],
  50 + ],
  51 + [
  52 + 'label' => 'Вакансии',
  53 + 'url' => ['company/vacancy-list', 'company_id'=>$this->params['company']->id],
  54 + ],
  55 + [
  56 + 'label' => 'Блог',
  57 + 'url' => ['company/blog-list', 'company_id'=>$this->params['company']->id],
  58 + ],
  59 + [
  60 + 'label' => 'Отзывы',
  61 + 'url' => ['company/review', 'company_id'=>$this->params['company']->id],
  62 + ],
  63 + [
  64 + 'label' => 'Галерея',
  65 + 'url' => ['company/gallery', 'company_id'=>$this->params['company']->id],
  66 + ],
  67 + ],
  68 + ]);
69 ?> 69 ?>
70 </div> 70 </div>
71 </div> 71 </div>
frontend/views/performer/_blog_list_view.php
@@ -10,7 +10,7 @@ use yii\helpers\Url; @@ -10,7 +10,7 @@ use yii\helpers\Url;
10 </div> 10 </div>
11 <div class="blog-post-icons-wr style"> 11 <div class="blog-post-icons-wr style">
12 <div class="blog-post-date"> 12 <div class="blog-post-date">
13 - <span></span><p><?= $model->date_add?></p> 13 + <span></span><p><?= $model->dateCreate?></p>
14 </div> 14 </div>
15 <div class="blog-post-views"> 15 <div class="blog-post-views">
16 <span></span><p><?= $model->view_count?></p> 16 <span></span><p><?= $model->view_count?></p>
frontend/views/performer/blog-list.php
@@ -24,14 +24,5 @@ $this-&gt;title = &#39;My Yii Application&#39;; @@ -24,14 +24,5 @@ $this-&gt;title = &#39;My Yii Application&#39;;
24 'pagination' => $pagination, 24 'pagination' => $pagination,
25 ]); 25 ]);
26 ?> 26 ?>
27 -<!-- <ul class="pagination">-->  
28 -<!-- <li><a href="#">1</a></li>-->  
29 -<!-- <li><a href="#">2</a></li>-->  
30 -<!-- <li><a href="#">3</a></li>-->  
31 -<!-- <li><a href="#">4</a></li>-->  
32 -<!-- <li><a href="#">5</a></li>-->  
33 -<!-- <li class="dots-next"><a href="#">...</a></li>-->  
34 -<!-- <li><a href="#">156</a></li>-->  
35 -<!-- </ul>-->  
36 </div> 27 </div>
37 28
frontend/views/performer/blog-view.php
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 <div class="blog-post-icons-wr style"> 12 <div class="blog-post-icons-wr style">
13 <div class="blog-post-date"> 13 <div class="blog-post-date">
14 <span></span> 14 <span></span>
15 - <p><?= $article->date_add?></p> 15 + <p><?= $article->dateCreate?></p>
16 </div> 16 </div>
17 <div class="blog-post-views"> 17 <div class="blog-post-views">
18 <span></span> 18 <span></span>
frontend/views/performer/common.php
@@ -145,7 +145,7 @@ $this-&gt;title = &#39;My Yii Application&#39;; @@ -145,7 +145,7 @@ $this-&gt;title = &#39;My Yii Application&#39;;
145 <div class="style"> 145 <div class="style">
146 <div class="profile-site"> 146 <div class="profile-site">
147 <img src="/images/ico-site.png" alt=""/> 147 <img src="/images/ico-site.png" alt=""/>
148 - <a href="#" target="_blank">Сайт</a> 148 + <a href="<?= $site['site']?>" target="_blank">Сайт</a>
149 </div> 149 </div>
150 </div> 150 </div>
151 <?php endforeach; ?> 151 <?php endforeach; ?>
frontend/views/performer/workplace.php
@@ -10,23 +10,17 @@ $this-&gt;title = &#39;My Yii Application&#39;; @@ -10,23 +10,17 @@ $this-&gt;title = &#39;My Yii Application&#39;;
10 <div class="workplace-wr"> 10 <div class="workplace-wr">
11 <div class="workplace-title style"><p>Опыт работы</p></div> 11 <div class="workplace-title style"><p>Опыт работы</p></div>
12 <div class="workplace-experience-wr style"> 12 <div class="workplace-experience-wr style">
13 - <div class="workplace-experience-post">  
14 - <div class="workplace-experience-post-title">Проектное бюра Арсеньева</div>  
15 - <div class="workplace-experience-post-date">08.2014-08.2015 (1 год)</div>  
16 - <div class="workplace-experience-post-vacancy">Архитектор</div>  
17 - </div>  
18 13
19 - <div class="workplace-experience-post">  
20 - <div class="workplace-experience-post-title">Студия Keppy</div>  
21 - <div class="workplace-experience-post-date">06.2009-08.2014 (5 лет 2 месяца)</div>  
22 - <div class="workplace-experience-post-vacancy">Архитектор, дизайнер</div>  
23 - </div> 14 + <?php foreach($user->jobs as $job):?>
  15 + <div class="workplace-experience-post">
  16 + <div class="workplace-experience-post-title"><?= $job->name ?></div>
  17 + <div class="workplace-experience-post-date"><?= $job->date_start ?>-<?= $job->date_end ?> (<?= $job->expTime ?>)</div>
  18 + <div class="workplace-experience-post-vacancy"><?= $job->position ?></div>
  19 + </div>
  20 + <?php endforeach; ?>
  21 +
  22 +
24 23
25 - <div class="workplace-experience-post">  
26 - <div class="workplace-experience-post-title">Фриланс</div>  
27 - <div class="workplace-experience-post-date">09.2008-06.2009 (9 месяцев)</div>  
28 - <div class="workplace-experience-post-vacancy">Дизайнер</div>  
29 - </div>  
30 </div> 24 </div>
31 </div> 25 </div>
32 </div> 26 </div>
33 \ No newline at end of file 27 \ No newline at end of file
frontend/web/css/style.css
@@ -1834,10 +1834,10 @@ input[type=file]::-webkit-file-upload-button { @@ -1834,10 +1834,10 @@ input[type=file]::-webkit-file-upload-button {
1834 1834
1835 /***blog****/ 1835 /***blog****/
1836 .section-box-16 { 1836 .section-box-16 {
1837 - height: 235px; 1837 + height: 380px;
1838 } 1838 }
1839 .blog-buttons-wr { 1839 .blog-buttons-wr {
1840 - margin-top: 160px; 1840 + margin-top: 305px;
1841 width: 526px; 1841 width: 526px;
1842 float: right; 1842 float: right;
1843 } 1843 }
@@ -5504,4 +5504,4 @@ a.blog-new-link:hover{text-decoration: underline !important;} @@ -5504,4 +5504,4 @@ a.blog-new-link:hover{text-decoration: underline !important;}
5504 display: block; 5504 display: block;
5505 border: none; 5505 border: none;
5506 outline: none; 5506 outline: none;
5507 -}  
5508 \ No newline at end of file 5507 \ No newline at end of file
  5508 +}