list.php
1.61 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
<?php
use yii\helpers\Html;
use frontend\modules\map\models\Type;
use frontend\modules\map\Map;
use frontend\modules\location\models\Region;
$types = Type::findListByType(Yii::$app->request->get('type', 0));
$regions = Region::findList();
$urlMapResource = Map::getUrlListByType('resource');
$urlMapProjects = Map::getUrlListByType('project');
?>
<div class="col-xs-12 text-center">
<div class="main-map-container">
<div class="static-btn-container">
<?= Html::a(Yii::t('front', 'resource potential'), $urlMapResource, [
'class' => 'static-btn static-btn-resours'
])
. Html::a(Yii::t('front', 'projects'), $urlMapProjects, [
'class' => 'static-btn static-btn-project'
])
?>
</div>
<div class="maps-action-elements">
<?= (Yii::$app->request->get('type', 0))
? $this->render('parts/_list_filters', ['types' => $types, 'regions' => $regions])
: Yii::t('front', 'Choose the map')
. Html::a(Yii::t('front', 'resource potential'), Map::getUrlList(['type' => 'resource']), [
'class' => 'static-btn static-btn-resours'
])
. Html::a(Yii::t('front', 'projects'), Map::getUrlList(['type' => 'project']), [
'class' => 'static-btn static-btn-project'
])
?>
</div>
<?php
foreach ($models as $model) {
echo '<h2>' . Html::a(Html::decode($model['lang']['title']), Map::getItemUrl($model['alias'])) . '</h2>';
}
?>
</div>
</div>