Initial import
This commit is contained in:
@@ -0,0 +1,170 @@
|
||||
<?php
|
||||
|
||||
use app\services\UrlReg;
|
||||
use app\models\Ts;
|
||||
|
||||
/**
|
||||
* @var \app\models\Navigation[] $main_navigation
|
||||
* @var \app\models\Navigation[] $hidden_navigation
|
||||
*/
|
||||
$urlReg = UrlReg::generate();
|
||||
$webPage = \Yii::$app->request->get('webPage');
|
||||
$center = '';
|
||||
$partnerHeader = false;
|
||||
|
||||
$guide_link = Yii::$app->language == 'en' ?
|
||||
'/file-system/public/Ръководство_на_потребителя_Публичен_портал_EN.pdf/' :
|
||||
'/file-system/public/Ръководство_на_потребителя_Публичен_портал.pdf/';
|
||||
|
||||
$page = \app\models\Pages::findOne(18);
|
||||
|
||||
if ($webPage == 'partnjor' || $webPage == 'partner' || Yii::$app->controller->id == 'partner') {
|
||||
$partnerHeader = true;
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if (!$partnerHeader): ?>
|
||||
<header>
|
||||
<div class="hidden-nav-button la la-navicon"></div>
|
||||
<div class="content flex">
|
||||
<nav>
|
||||
<?php foreach ($main_navigation as $button): ?>
|
||||
<a class="text-uppercase middle-margin hover-text first-no-margin"
|
||||
<?= $button->url ? 'target="_blank"' : '' ?>
|
||||
href="<?= $button->parsed->relation ?>"><?= $button->parsed->name ?></a>
|
||||
<?php endforeach; ?>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<nav class="header-right-nav mobile-hide">
|
||||
<a class="text-uppercase middle-margin hover-text"
|
||||
href="<?= $urlReg->uri ?>"><?= $urlReg->locale ?><i
|
||||
class="icon-shadow lg lg-<?= $urlReg->locale ?>"></i></a>
|
||||
<a href="<?= $page->getUrl() ?>"><i class="la la-question-circle-o"></i></a>
|
||||
<div class="hover-text drop-btn h-user-btn">
|
||||
<i class="la la-user"></i>
|
||||
<div class="user-menu">
|
||||
<?php if (empty($_SESSION['register_user'])): ?>
|
||||
<a href="<?= Yii::$app->goToAction('user/cart') ?>" class="flex flex-left"><i
|
||||
class="la la-shopping-cart"></i><?= Ts::get(87) ?></a>
|
||||
<?php endif; ?>
|
||||
<?php if (!\app\services\Auth::getUser()): ?>
|
||||
<?php if (empty($_SESSION['register_user'])): ?>
|
||||
<a class="flex flex-left" href="<?= Yii::$app->goToAction('user/login') ?>"><i
|
||||
class="la la-sign-in"></i><?= Ts::get(53) ?></a>
|
||||
<a class="flex flex-left" href="<?= Yii::$app->goToAction('user/sign-up') ?>"><i
|
||||
class="la la-user-plus"></i><?= Ts::get(54) ?></a>
|
||||
<?php else: ?>
|
||||
<a class="flex flex-left" href="<?= Yii::$app->goToAction('user/logout-all') ?>"><i
|
||||
class="la la-sign-out"></i><?= Ts::get(73) ?></a>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<a class="flex flex-left" href="<?= Yii::$app->goToAction('user') ?>">
|
||||
<i class="la la-user-cog"></i><?= Ts::get(74) ?></a>
|
||||
<a class="flex flex-left" href="<?= Yii::$app->goToAction('user/logout-all') ?>"><i
|
||||
class="la la-sign-out"></i><?= Ts::get(73) ?></a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<a onclick="modal.modalSearchBox(this)" data-lang="<?= Yii::$app->language ?>"
|
||||
data-title="<?= Ts::get(181) ?>" class="hover-text"><i class="la la-search pointer"></i></a>
|
||||
</nav>
|
||||
</header>
|
||||
<div class="mobile-logo">
|
||||
<a href="<?= Yii::$app->goHome() ?>">
|
||||
<?php if (Yii::$app->language == 'en'): ?>
|
||||
<img src="/_public/images/logo_en/N-logo-02.png">
|
||||
<?php else: ?>
|
||||
<img src="/_public/images/logo-b.png">
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<header class="partner-header" style="border-bottom: 0">
|
||||
<div class="hidden-nav-button la la-navicon"></div>
|
||||
<div class="content flex">
|
||||
<a class="header-partner-page-logo" href="<?= Yii::$app->goHome() ?>">
|
||||
<?php if (Yii::$app->language == 'en'): ?>
|
||||
<img src="/_public/images/logo_en/N-logo-02.png" style="height: 40px; margin-top: 10px">
|
||||
<?php else: ?>
|
||||
<img src="/_public/images/logo-b.png" style="height: 40px; margin-top: 10px">
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
<nav class="flex-center full-width">
|
||||
<a href="<?= Yii::$app->partnerGoto(Yii::$app->request->get('partnerSlug')) ?>"
|
||||
class="text-uppercase middle-margin hover-text"><?= Ts::get(49) //Home ?></a>
|
||||
<?php foreach ($main_navigation as $button): ?>
|
||||
<a class="text-uppercase middle-margin hover-text"
|
||||
<?= $button->url ? 'target="_blank"' : '' ?>
|
||||
href="<?= $button->parsed->relation ?>"><?= $button->parsed->name ?></a>
|
||||
<?php endforeach; ?>
|
||||
</nav>
|
||||
<nav style="margin-left: auto">
|
||||
<a class="text-uppercase middle-margin hover-text last-no-margin"
|
||||
href="<?= $urlReg->uri ?>"><?= $urlReg->locale ?>
|
||||
<i class="icon-shadow lg lg-<?= $urlReg->locale ?>"></i>
|
||||
</a>
|
||||
<a onclick="modal.modalSearchBox(this)" data-lang="<?= Yii::$app->language ?>"
|
||||
data-title="<?= Ts::get(181) ?>" class="hover-text"><i
|
||||
class="la la-search"></i></a>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
<div class="mobile-logo">
|
||||
<a href="<?= Yii::$app->goHome() ?>">
|
||||
<?php if (Yii::$app->language == 'en'): ?>
|
||||
<img src="/_public/images/logo_en/N-logo-02.png">
|
||||
<?php else: ?>
|
||||
<img src="/_public/images/logo-b.png">
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="hidden-nav">
|
||||
<div class="main-mobile-nav" style="display: none">
|
||||
<div class="flex flex-right">
|
||||
<a href="<?= $guide_link ?>"><i class="la la-question-circle-o"
|
||||
style="font-size: 30px; margin-top: 0; margin-right: 10px"></i></a>
|
||||
<div onclick="modal.modalSearchBox(this)" data-lang="<?= Yii::$app->language ?>"
|
||||
data-title="<?= Ts::get(181) ?>" class="search pointer right-15"
|
||||
style="margin-top: -2px">
|
||||
<i class="la la-search"></i>
|
||||
</div>
|
||||
<div class="mobile-language-switch">
|
||||
<a class="text-uppercase middle-margin hover-text last-no-margin"
|
||||
href="<?= $urlReg->uri ?>"><?= $urlReg->locale ?>
|
||||
<i class="icon-shadow lg lg-<?= $urlReg->locale ?>"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (!\app\services\Auth::getUser()): ?>
|
||||
<a class="text-uppercase hover-text first-no-margin"
|
||||
href="<?= Yii::$app->goToAction('user/login') ?>"><?= Ts::get(53) ?> <i class="la la-chevron-right"></i></a>
|
||||
<a class="text-uppercase hover-text first-no-margin"
|
||||
href="<?= Yii::$app->goToAction('user/sign-up') ?>"><?= Ts::get(54) ?> <i
|
||||
class="la la-chevron-right"></i></a>
|
||||
<?php else: ?>
|
||||
<a class="text-uppercase hover-text first-no-margin"
|
||||
href="<?= Yii::$app->goToAction('user') ?>"><?= Ts::get(74) ?> <i
|
||||
class="la la-chevron-right"></i></a>
|
||||
<a class="text-uppercase hover-text first-no-margin"
|
||||
href="<?= Yii::$app->goToAction('user/logout-all') ?>"><?= Ts::get(73) ?> <i
|
||||
class="la la-chevron-right"></i></a>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="mobile-nav-divider"></div>
|
||||
|
||||
<?php foreach ($main_navigation as $button): ?>
|
||||
<a class="text-uppercase hover-text first-no-margin"
|
||||
<?= $button->url ? 'target="_blank"' : '' ?>
|
||||
href="<?= $button->parsed->relation ?>"><?= $button->parsed->name ?> <i class="la la-chevron-right"></i></a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php foreach ($hidden_navigation as $button): ?>
|
||||
|
||||
<a class="text-uppercase hover-text first-no-margin"
|
||||
<?= $button->url ? 'target="_blank"' : '' ?>
|
||||
href="<?= $button->parsed->relation ?>"><?= $button->parsed->name ?> <i class="la la-chevron-right"></i></a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
Reference in New Issue
Block a user