#959 - Вынести в редактирование отдельно инфо-блок "Наши проекты"

parent 3a37c7f7
<?php
return [
'Explore our projects' => 'Другие наши проекты',
'See more' => 'Подробнее',
'All projects' => 'Все проекты',
];
\ No newline at end of file
...@@ -8,17 +8,17 @@ $models = CoContent::find()->where([ ...@@ -8,17 +8,17 @@ $models = CoContent::find()->where([
'active' => true 'active' => true
])->orderBy('id DESC')->all(); ])->orderBy('id DESC')->all();
$cases = CoContent::find()->where([ $caseCount = CoContent::find()->where([
'category_id' => 4, 'category_id' => 4,
'active' => true 'active' => true
]); ])->count();
?> ?>
<?php if($models) : ?> <?php if($models) : ?>
<div class="row"> <div class="row">
<div class="col-md-6 col-xs-6 col-sm-12"> <div class="col-md-6 col-xs-6 col-sm-12">
<div class="project_st clearfix"> <div class="project_st clearfix">
<div class="project_tit"> <div class="project_tit">
<span class="others_project__title wow zoomIn" data-wow-offset="50">Другие наши проекты</span> <span class="others_project__title wow zoomIn" data-wow-offset="50"><?=Yii::t('projects', 'Explore our projects')?></span>
</div> </div>
</div> </div>
</div> </div>
...@@ -29,8 +29,8 @@ $cases = CoContent::find()->where([ ...@@ -29,8 +29,8 @@ $cases = CoContent::find()->where([
<div class="others_project"> <div class="others_project">
<span class="others_project__subtitle"><?=$model->lang->title?></span> <span class="others_project__subtitle"><?=$model->lang->title?></span>
<p class="others_project__txt"><?=$model->lang->text?></p> <p class="others_project__txt"><?=$model->lang->text?></p>
<a href="<?=Url::to(['/' . $model->url])?>" class="others_project__bt">Подробнее</a> <a href="<?=Url::to(['/' . $model->url])?>" class="others_project__bt"><?=Yii::t('projects', 'See more')?></a>
<a href="<?=Url::to(['/portfolio'])?>" class="others_project__link">Все проекты (<?=$cases->count();?>)</a> <a href="<?=Url::to(['/portfolio'])?>" class="others_project__link"><?=Yii::t('projects', 'All projects')?> <?if($caseCount>20){?>(<?=$caseCount;?>)<?}?></a>
</div> </div>
<img src="<?=$model->preview?>" height="476" width="489"> <img src="<?=$model->preview?>" height="476" width="489">
</div> </div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment