#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([
'active' => true
])->orderBy('id DESC')->all();
$cases = CoContent::find()->where([
$caseCount = CoContent::find()->where([
'category_id' => 4,
'active' => true
]);
])->count();
?>
<?php if($models) : ?>
<div class="row">
<div class="col-md-6 col-xs-6 col-sm-12">
<div class="project_st clearfix">
<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>
......@@ -29,8 +29,8 @@ $cases = CoContent::find()->where([
<div class="others_project">
<span class="others_project__subtitle"><?=$model->lang->title?></span>
<p class="others_project__txt"><?=$model->lang->text?></p>
<a href="<?=Url::to(['/' . $model->url])?>" class="others_project__bt">Подробнее</a>
<a href="<?=Url::to(['/portfolio'])?>" class="others_project__link">Все проекты (<?=$cases->count();?>)</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"><?=Yii::t('projects', 'All projects')?> <?if($caseCount>20){?>(<?=$caseCount;?>)<?}?></a>
</div>
<img src="<?=$model->preview?>" height="476" width="489">
</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