_list_item.php
1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/**
* @var Articles $model
* @var mixed $key
* @var integer $index
* @var ListView $widget
*/
use common\components\artboximage\ArtboxImageHelper;
use common\models\Articles;
use yii\helpers\Html;
use yii\widgets\ListView;
?>
<div class="col-xs-12 col-sm-12 articles_data-title">
<div class="articles-date">
<span>
<?php
echo date('d.m.Y', $model->date);
?>
</span>
</div>
<div class="articles-title">
<?php
echo Html::a($model->lang->title, [ 'article/view', 'id' => $model->id ]);
?>
</div>
</div>
<div class="articles col-xs-12 col-sm-12 col-md-12">
<div class="new_article-img">
<?php
if(!empty($model->image)) {
echo Html::a(ArtboxImageHelper::getImage($model->imageUrl, 'article_list'), [ 'article/view', 'id' => $model->id ]);
} else {
echo Html::a(ArtboxImageHelper::getImage('/storage/no-image.png', 'article_list'), [ 'article/view', 'id' => $model->id ]);
}
?>
</div>
<div class="brand-list-desc-txt">
<?php
if(!empty($model->lang->body_preview)) {
echo $model->lang->body_preview;
} else {
echo $model->lang->body;
}
?>
<p>
<?php
echo Html::a(Yii::t('app', 'Подробнее'), [ 'article/view', 'id' => $model->id ]);
?>
</p>
</div>
</div>