list.php 2.27 KB
<?php

use yii\helpers\ Html;

use frontend\modules\map\Map;
use frontend\modules\map\widgets\search\SearchString;


$urlMapResource = Map::getUrlListByType('resource');
$urlMapProjects = Map::getUrlListByType('project');
//
echo \thread\modules\seo\widgets\breadcrumbs\Breadcrumbs::widget([
        'links' => $this->context->breadcrumbs ?? []
    ])
    . Html::tag('h1', Yii::t('front', 'Objects base'), [
        'class' => 'page-title title-1'
    ]);
?>
<div class="col-md-3 object_list_filter">
    <div class="text-center">
        <?= Html::tag('div', Yii::t('front', 'choose the type of objects'), [
            'class' => 'object_list_filter_info'
        ]) ?>
    </div>
    <div class="text-center">
        <?= Html::tag('div', Yii::t('front', 'to display additional search options')) ?>
    </div>
    <div class="text-center">
        <?=
        Html::a(Yii::t('front', 'resource potential'), Map::getUrlTypeObjectListPage(Map::TYPE_2), [
            'class' => 'btn btn-new btn_first_step'
        ])
        . Html::a(Yii::t('front', 'projects'), Map::getUrlTypeObjectListPage(Map::TYPE_1), [
            'class' => 'btn btn-new btn_first_step'
        ])
        ?>
    </div>
    <div class="text-center">
        <br>
        <?= Html::tag('div', Yii::t('front', 'or try to find by the name')) ?>
        <br>
    </div>
    <?= SearchString::widget() ?>
</div>
<div class="col-md-9">
    <div class="static-btn-container" style="top: -85px;">
        <?= 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>
    <?php
    foreach ($models as $model):
        echo $this->render('plist/list-item', [
            'model' => $model,
        ]);
    endforeach;
    ?>
</div>
<div class="clearfix"></div>
<div class="pages">
    <?=
    yii\widgets\LinkPager::widget([
        'pagination' => $pages,
        'registerLinkTags' => true,
        'nextPageLabel' => '❯',
        'prevPageLabel' => '❮',
    ]);
    ?>
</div>
<style>
    @media screen and (max-width: 980px) {
        .static-btn-container {
            top: -250px !important;
        }
    }
</style>