Initial import
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<link rel="stylesheet" href="/_public/assets/css/page.css">
|
||||
<link rel="stylesheet" href="/_public/assets/css/article-module.css">
|
||||
<?php
|
||||
|
||||
use app\models\Pages;
|
||||
use app\models\Ts;
|
||||
use app\widgets\Carousel;
|
||||
use app\widgets\Includes;
|
||||
|
||||
/**
|
||||
* @var Pages $model
|
||||
* @var \yii\web\View $this
|
||||
*/
|
||||
Ts::set([3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]);
|
||||
|
||||
Yii::$app->controller->pageTitle = $model->headerTitle();
|
||||
Includes::widget([
|
||||
'type' => 'page_header',
|
||||
'model' => $model,
|
||||
'bottom_care' => $model->headerTitle()
|
||||
]);
|
||||
echo $this->render('/site/includes/list_e_library')
|
||||
?>
|
||||
<script>
|
||||
function loadSpecificFilter(e) {
|
||||
let container = document.querySelector(`[data-content-id="${e.dataset.filterInput}"]`)
|
||||
if (e.value) {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open('get', '/remote/get-specific-filter/?parent_id=' + e.value)
|
||||
xhr.onload = function () {
|
||||
if (container)
|
||||
container.innerHTML = xhr.responseText
|
||||
}
|
||||
xhr.send();
|
||||
} else {
|
||||
if (container)
|
||||
container.innerHTML = ""
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
<link rel="stylesheet" href="/_public/assets/css/page.css">
|
||||
<link rel="stylesheet" href="/_public/assets/css/article-module.css">
|
||||
<link rel="stylesheet" href="/_public/assets/css/user.css">
|
||||
<script src='/_public/assets/js/user.js'></script>
|
||||
<style>
|
||||
header {
|
||||
border-bottom: 0 !important;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @var \app\models\Pages $model ;
|
||||
*/
|
||||
|
||||
use app\models\Subscriptions;
|
||||
use app\models\Ts;
|
||||
|
||||
Ts::set([42, 47, 84, 85, 86, 78, 7, 104, 112, 113, 12, 13, 14, 114, 115, 116, 117, 118, 119, 120, 121, 179]);
|
||||
|
||||
$site_bar = false;
|
||||
|
||||
if (!empty($_GET['tab'])) {
|
||||
if ($_GET['tab'] == 'collections' || $_GET['tab'] == 'publications') {
|
||||
$site_bar = true;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="content">
|
||||
<div class="flex site-bar-page e-magazine">
|
||||
|
||||
<div class="content-body" style="width: 100%;">
|
||||
<div class="page-header">
|
||||
<a href="<?= Yii::$app->goHome() ?>" class="top-care">
|
||||
<?php if (Yii::$app->language == 'en'): ?>
|
||||
<img src="/_public/images/logo_en/N-logo-03.png">
|
||||
<?php else: ?>
|
||||
<img src="/_public/images/logo-b.png">
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
<?php if ($model && $model->headerImage('21:5')): ?>
|
||||
<img class="header-img" src="<?= $model->headerImage('21:5') ?>" ">
|
||||
<?php endif; ?>
|
||||
<div class="header-site-page-title">
|
||||
<?= $model->headerTitle() ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (empty($_GET['collection'])): ?>
|
||||
<div class="filter-buttons top25">
|
||||
<button data-href="<?= $model->getUrl() ?>"
|
||||
class="<?= empty($_GET['tab']) ? 'active' : '' ?>"><?= Ts::get(113) ?></button>
|
||||
<button class="<?= !empty($_GET['tab']) && $_GET['tab'] == 'subscriptions' ? 'active' : '' ?>"
|
||||
data-href="?tab=subscriptions"><?= Ts::get(78) ?></button>
|
||||
<button data-href="?tab=events"
|
||||
class="<?= !empty($_GET['tab']) && $_GET['tab'] == 'events' ? 'active' : '' ?>"><?= Ts::get(7) ?></button>
|
||||
<button data-href="?tab=collections"
|
||||
class="<?= !empty($_GET['tab']) && $_GET['tab'] == 'collections' ? 'active' : '' ?>"><?= Ts::get(104) ?></button>
|
||||
<button data-href="?tab=publications"
|
||||
class="<?= !empty($_GET['tab']) && $_GET['tab'] == 'publications' ? 'active' : '' ?>"><?= Ts::get(112) ?></button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="top50"></div>
|
||||
|
||||
<?php if (empty($_GET['tab']) && empty($_GET['collection']) && empty($_GET['publication'])): ?>
|
||||
<?= $this->render('/site/inner-pages/modules/_last_added', ['page' => $model]) ?>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($_GET['tab'])): ?>
|
||||
<?= $this->render('/site/inner-pages/modules/_'.$_GET['tab'], ['page' => $model]) ?>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($_GET['collection'])): ?>
|
||||
<?= $this->render('/site/inner-pages/modules/_detail_collection', ['page' => $model]) ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
@@ -0,0 +1,30 @@
|
||||
<link rel="stylesheet" href="/_public/assets/css/page.css">
|
||||
<link rel="stylesheet" href="/_public/assets/css/article-module.css">
|
||||
<link href="/_public/plugins/splitejs/css/splide.min.css" rel="stylesheet">
|
||||
<link href="/_public/assets/css/search-box.css" rel="stylesheet">
|
||||
<script src="/_public/plugins/splitejs/js/splide.min.js"></script>
|
||||
<?php
|
||||
|
||||
use app\models\Pages;
|
||||
use app\models\Ts;
|
||||
use app\widgets\Carousel;
|
||||
use app\widgets\Includes;
|
||||
|
||||
/**
|
||||
* @var Pages $model
|
||||
* @var \yii\web\View $this
|
||||
*/
|
||||
Ts::set([45, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 48]);
|
||||
Yii::$app->controller->pageTitle = $model->headerTitle();
|
||||
Includes::widget([
|
||||
'type' => 'page_header',
|
||||
'model' => $model,
|
||||
'bottom_care' => $model->headerTitle()
|
||||
]);
|
||||
Carousel::widget([
|
||||
'type' => 'positions_inner_page_expositions',
|
||||
'id' => 1
|
||||
]);
|
||||
echo $this->render('/site/includes/list_exposition')
|
||||
?>
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<link rel="stylesheet" href="/_public/assets/css/page.css">
|
||||
<link rel="stylesheet" href="/_public/assets/css/article-module.css">
|
||||
<?php
|
||||
|
||||
use app\models\Pages;
|
||||
use app\models\Ts;
|
||||
use app\widgets\Carousel;
|
||||
use app\widgets\Includes;
|
||||
|
||||
/**
|
||||
* @var Pages $model
|
||||
* @var \yii\web\View $this
|
||||
*/
|
||||
|
||||
Yii::$app->controller->pageTitle = $model->headerTitle();
|
||||
Ts::set([3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]);
|
||||
Includes::widget([
|
||||
'type' => 'page_header',
|
||||
'model' => $model,
|
||||
'bottom_care' => $model->headerTitle()
|
||||
]);
|
||||
Carousel::widget([
|
||||
'type' => 'positions_inner_page',
|
||||
'id' => 1
|
||||
]);
|
||||
echo $this->render('/site/includes/list_article')
|
||||
?>
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
<link rel="stylesheet" href="/_public/assets/css/page.css">
|
||||
<link rel="stylesheet" href="/_public/assets/css/article-module.css">
|
||||
<link href="/_public/assets/css/search-box.css" rel="stylesheet">
|
||||
<script src="/_public/assets/js/search-box.js"></script>
|
||||
<?php
|
||||
|
||||
use app\models\Pages;
|
||||
use app\models\Ts;
|
||||
use app\widgets\Carousel;
|
||||
use app\widgets\Includes;
|
||||
|
||||
/**
|
||||
* @var Pages $model
|
||||
* @var \yii\web\View $this
|
||||
*/
|
||||
|
||||
Yii::$app->controller->pageTitle = $model->headerTitle();
|
||||
Ts::set([15, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 48]);
|
||||
Includes::widget([
|
||||
'type' => 'page_header',
|
||||
'model' => $model,
|
||||
'bottom_care' => $model->headerTitle()
|
||||
]);
|
||||
Carousel::widget([
|
||||
'type' => 'positions_inner_page_collections',
|
||||
'id' => 1
|
||||
]);
|
||||
echo $this->render('/site/includes/list_collection', ['partner_id' => null])
|
||||
?>
|
||||
|
||||
<script>
|
||||
function loadSpecificCollectionFilter(e) {
|
||||
|
||||
console.log(e.dataset.filterInput, e.value)
|
||||
let container = document.querySelector(`[data-content-id="${e.dataset.filterInput}"]`)
|
||||
if (e.value) {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open('get', `/<?= Yii::$app->language ?>/remote/get-specific-filter/?parent_id=${e.value}&lib_type=1`)
|
||||
xhr.onload = function () {
|
||||
if (container)
|
||||
container.innerHTML = xhr.responseText
|
||||
}
|
||||
xhr.send();
|
||||
} else {
|
||||
if (container)
|
||||
container.innerHTML = ""
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,65 @@
|
||||
<link rel="stylesheet" href="/_public/assets/css/page.css">
|
||||
<link rel="stylesheet" href="/_public/assets/css/article-module.css">
|
||||
<?php
|
||||
|
||||
use app\models\Ts;
|
||||
use app\services\ViewReg;
|
||||
use app\widgets\Carousel;
|
||||
use app\widgets\Includes;
|
||||
|
||||
/**
|
||||
* @var \yii\web\View $this
|
||||
* @var \app\models\Pages $model ;
|
||||
* @var $type
|
||||
*/
|
||||
Ts::set([51, 52, 132, 133, 156, 182, 183]);
|
||||
Yii::$app->controller->pageTitle = $model->headerTitle();
|
||||
?>
|
||||
|
||||
<div class="content">
|
||||
<div class="page-header simple-page-header" style="height: 80px">
|
||||
<div class="header-logo top-care" style="display: block"><?= Ts::get(51) ?></div>
|
||||
</div>
|
||||
<a href="/<?= Yii::$app->language ?>/">
|
||||
<?php if (Yii::$app->language == 'en'): ?>
|
||||
<img src="/_public/images/logo_en/N-logo-02.png" class="logo-center-absolute">
|
||||
<?php else: ?>
|
||||
<img src="/_public/images/logo-b.png" class="logo-center-absolute">
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
<div class="flex top50 page-contacts">
|
||||
<div class="cw8" style="text-align: justify; padding-right: 15px">
|
||||
<?= $model->text() ?>
|
||||
</div>
|
||||
<?php if ($model->contacts) ?>
|
||||
<div class="cw4">
|
||||
<div class="article-site-bar">
|
||||
<div class="row font-bold" style="padding: 0 0 10px 0"><?= Ts::get(52) ?>:</div>
|
||||
<div class="row">
|
||||
<div class="sub-row">
|
||||
<i class="las la-map-marker-alt" style="font-size: 25px"></i> <?= Ts::get(133) ?>:<span
|
||||
class="font-bold left-15"><?= $model->contacts->getAddress() ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="sub-row">
|
||||
<i class="la la-globe"></i><?= Ts::get(156) ?>:<span
|
||||
class="font-bold left-15"><a target="_blank" href="https://<?= $model->contacts->website ?>"><?= $model->contacts->website ?></a></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="sub-row">
|
||||
<i class="la la-phone"></i><?= Ts::get(182) ?>:<span
|
||||
class="font-bold left-15"><a href="tel: <?= $model->contacts->phone ?>"><?= $model->contacts->phone ?></a></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="sub-row">
|
||||
<i class="la la-envelope"></i><?= Ts::get(183) ?>:<span
|
||||
class="font-bold left-15"><a href="mailto: <?= $model->contacts->email ?>"><?= $model->contacts->email ?></a></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use app\models\Ts;
|
||||
|
||||
/**
|
||||
* @var \app\models\Pages $page
|
||||
*/
|
||||
$perPage = 27;
|
||||
$pageNumber = $_GET['page'] ?? 1;
|
||||
$data = \app\models\register\Collections::find()
|
||||
->where(['published' => 1, 'deleted' => 0, 'is_payable' => 1])
|
||||
->andWhere(['>', 'price', 0])
|
||||
->orderBy(['modified_on' => SORT_DESC]);
|
||||
|
||||
$count = $data->count();
|
||||
$pagesCount = ceil($count / $perPage);
|
||||
|
||||
$collections = $data->limit($perPage)
|
||||
->offset($pageNumber * $perPage - $perPage)
|
||||
->all();
|
||||
?>
|
||||
<div class="section-title top25"><?= Ts::get(104) ?></div>
|
||||
|
||||
<div style="width: 100%">
|
||||
<?= $this->render('_list_collection_sq_partial', ['collections' => $collections, 'page' => $page]); ?>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div id="pagination" class="filter-buttons flex-left top50">
|
||||
<?= $this->render('_pagination', [
|
||||
'pagesCount' => $pagesCount,
|
||||
'pageNumber' => $pageNumber,
|
||||
'tab' => 'collections'
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,151 @@
|
||||
<link href="/_public/assets/css/collection-objects-greed.css" rel="stylesheet">
|
||||
<link href="/_public/assets/css/article-module.css" rel="stylesheet">
|
||||
<style>
|
||||
.gallery-preview {
|
||||
position: relative
|
||||
}
|
||||
|
||||
.gallery-preview .gallery-poster {
|
||||
filter: blur(0) brightness(100%);
|
||||
transition: all 0.4s;
|
||||
}
|
||||
|
||||
.gallery-preview:hover .gallery-poster {
|
||||
filter: blur(5px) brightness(50%);
|
||||
}
|
||||
|
||||
.gallery-preview .icon {
|
||||
position: absolute;
|
||||
top: 160px;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
display: none;
|
||||
color: #FFFFFF;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.gallery-preview:hover .icon {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.gallery-preview .icon .la {
|
||||
color: #FFFFFF;
|
||||
font-size: 40px;
|
||||
display: block;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.modal-video.frame {
|
||||
height: 700px !important;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
/**
|
||||
* @var \app\models\Pages $page
|
||||
*/
|
||||
|
||||
use app\models\OrderProduct;
|
||||
use app\models\register\Collections;
|
||||
use app\models\Ts;
|
||||
use app\services\Auth;
|
||||
use app\services\JWT;
|
||||
|
||||
$user = Auth::getUser();
|
||||
|
||||
$lg = Yii::$app->language;
|
||||
$collection = \app\models\register\Collections::findOne($_GET['collection']);
|
||||
?>
|
||||
<div class="filter-buttons">
|
||||
<?php if (!empty($_GET['back'])): ?>
|
||||
<?php if ($_GET['back'] != 'last_added'): ?>
|
||||
<?php if ($_GET['back'] == 'collections'): ?>
|
||||
<button data-href="?tab=collections"><i class="la la-undo"></i> <?= Ts::get(42) ?></button>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<button data-href="<?= $page->getUrl() ?>"><i class="la la-undo"></i> <?= Ts::get(119) ?></button>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php if ($collection): ?>
|
||||
<div class="cw12 flex top25" style="background: #f1f1f1;">
|
||||
<div class="cw4" style="height: 350px">
|
||||
<a href="<?= $collection->getUrl() ?>" class="cell">
|
||||
<div class="list-element-img cell-img"
|
||||
style="background-image: url('<?= $collection->getImg() ?>')"></div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="cw6">
|
||||
<div class="cell">
|
||||
<div class="list-label events"><?= Ts::get('117') ?></div>
|
||||
<div class="top20 detail-e-magazin-title"
|
||||
title="<?= $collection->title() ?>"><?= $collection->title() ?></div>
|
||||
<div class="list-text top20">
|
||||
<?= $collection->textDescription() ?>
|
||||
</div>
|
||||
<div class="e-magazine-price font-bold top20"><?= Ts::get(116) ?>
|
||||
: <?= number_format($collection->price, 2, '.', ' ') ?> лв.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-e-magazin-title top25"><?= $collection->objectCountLabel() ?>
|
||||
/ <?= $collection->imageCountLabel() ?></div>
|
||||
|
||||
<div class="collection-greed top25">
|
||||
<div class="content-out gallery flex-wrap">
|
||||
<?php foreach ($collection->collectionsObjects as $collectionObject): ?>
|
||||
<?php if (!empty($collectionObject->object->registerObjectImages[0])): ?>
|
||||
<?php $file = $collectionObject->object->registerObjectImages[0]; ?>
|
||||
<div class="gallery__item gallery-preview" onclick="openGalleryPreview(this)"
|
||||
data-object-id="<?= $collectionObject->object->id ?>" style="cursor: pointer">
|
||||
<div class="gallery-poster"
|
||||
style="width: 100%; height: 400px; background: url('<?= $file->getResizedImg(false, true) ?>') no-repeat; background-size: cover;"></div>
|
||||
<div class="gallery__item_title"><?= $collectionObject->object->getTitle() ?></div>
|
||||
<div class="icon">
|
||||
<i class="la la-images"></i>
|
||||
<?= $lg == 'en' ? 'Preview gallery' : 'Преглед галерия' ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="gallery__item">
|
||||
<div
|
||||
style="width: 100%; height: 400px; background: url('/_public/images/empty.png') no-repeat; background-size: cover;"
|
||||
></div>
|
||||
<div class="gallery__item_title"><?= $collectionObject->object->getTitle() ?></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$activeDownload = false;
|
||||
if ($user) {
|
||||
$hasOrder = OrderProduct::find()->joinWith('order')
|
||||
->where(['user_id' => $user->id, 'model_class' => Collections::class, 'model_id' => $collection->id])->one();
|
||||
if ($hasOrder) {
|
||||
if ($hasOrder->order->payment && $hasOrder->order->payment->status == 'PAID') {
|
||||
$activeDownload = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php if ($activeDownload): ?>
|
||||
<div onclick="window.location.href = '/<?= $lg ?>/user/?cid=<?= JWT::encode(['cid' => $collection->id], JWT::SECRET_KEY) ?>'" class="profile-submit gradient ct top25">
|
||||
<i class="la la-download"></i> <?= $lg == 'en' ? 'Download' : 'Изтегли' ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div data-max="1" data-cart="<?= $collection->cartKey ?>"
|
||||
onclick="cart.add(this, e => {cart.updateSubscriptions(e, 'add')})"
|
||||
class="profile-submit gradient ct top25"><i
|
||||
class="la la-shopping-cart"></i> <?= Ts::get(115) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<script>
|
||||
function openGalleryPreview(e) {
|
||||
const url = `/<?= Yii::$app->language ?>/remote/object-gallery/?object_id=${e.dataset.objectId}`
|
||||
modal.modalFrame(url)
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use app\models\Ts;
|
||||
use app\models\Pages;
|
||||
|
||||
$pageNumber = $_GET['page'] ?? 1;
|
||||
$perPage = 27;
|
||||
|
||||
/**
|
||||
* @var Pages $page
|
||||
*/
|
||||
$data = \app\models\Articles::find()
|
||||
->joinWith('events')
|
||||
->where(['events.is_active' => 1])
|
||||
->andWhere(['events.type' => 'booking'])
|
||||
->orWhere(['events.type' => 'online'])
|
||||
//->andWhere(['>', 'events.event_last_date', date('Y-m-d')])
|
||||
->orderBy(['events.event_first_date' => SORT_DESC]);
|
||||
|
||||
$count = $data->count();
|
||||
$pagesCount = ceil($count / $perPage);
|
||||
|
||||
$events = $data->limit($perPage)
|
||||
->offset($pageNumber * $perPage - $perPage)
|
||||
->all();
|
||||
?>
|
||||
|
||||
<div class="section-title"><?= Ts::get(7) ?></div>
|
||||
|
||||
<div style="width: 100%">
|
||||
<?= $this->render('_list_article_partial', ['articles' => $events, 'page' => $page]); ?>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div id="pagination" class="filter-buttons flex-center top50">
|
||||
<?= $this->render('_pagination', [
|
||||
'pagesCount' => $pagesCount,
|
||||
'pageNumber' => $pageNumber,
|
||||
'tab' => 'events'
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
use app\models\Ts;
|
||||
use app\models\Pages;
|
||||
|
||||
/**
|
||||
* @var Pages $page
|
||||
*/
|
||||
?>
|
||||
|
||||
<div class="section-title"><?= Ts::get(7)?></div>
|
||||
|
||||
<div style="width: 100%">
|
||||
<?php
|
||||
$data = $this->render('_list_article_partial', ['articles' => \app\models\Articles::find()
|
||||
->joinWith('events')
|
||||
->where(['events.is_active' => 1])
|
||||
->andWhere(['events.type' => 'booking'])
|
||||
->orWhere(['events.type' => 'online'])
|
||||
->orderBy(['events.event_first_date' => SORT_DESC])
|
||||
->limit(6)
|
||||
//->andWhere('')
|
||||
->all(), 'page' => $page]);
|
||||
echo $data;
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="section-title top25"><?= Ts::get(104)?></div>
|
||||
|
||||
<div style="width: 100%">
|
||||
<?php
|
||||
$data = $this->render('_list_collection_partial', ['collections' => \app\models\register\Collections::find()
|
||||
->where(['published' => 1, 'deleted' => 0, 'is_payable' => 1])
|
||||
->andWhere(['>', 'price', 0])
|
||||
->orderBy(['modified_on' => SORT_DESC])
|
||||
->limit(6)
|
||||
->all(), 'page' => $page]);
|
||||
echo $data;
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="section-title top25"><?= Ts::get(112) ?></div>
|
||||
|
||||
<div style="width: 100%">
|
||||
<?php
|
||||
$data = $this->render('_list_libs_partial', ['libs' => \app\models\RegisterObjects::find()
|
||||
->where(['is_active' => 1, 'lib_type' => 2, 'is_payable' => 1])
|
||||
//->andWhere(['>', 'price', 0])
|
||||
//->orderBy(['modified_on' => SORT_DESC])
|
||||
->limit(6)
|
||||
->all(), 'page' => $page]);
|
||||
echo $data;
|
||||
?>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \app\models\Articles[] $articles
|
||||
*/
|
||||
|
||||
use app\models\Ts;
|
||||
use app\services\ViewReg;
|
||||
|
||||
?>
|
||||
<div class="flex-wrap e-magazine-list">
|
||||
<?php foreach ($articles as $article): ?>
|
||||
<div class="list-element">
|
||||
<a href="<?= ViewReg::generateDetailPageUrl($article) ?>">
|
||||
<div class="img-container"
|
||||
style="background-image: url('<?= $article->article->image('16:11') ?>');"></div>
|
||||
</a>
|
||||
<div class="top20 list-label <?= $article->art_table ?>"><?= $article->label ?></div>
|
||||
|
||||
<div class="list-title top20" data-max-str="80" title="<?= $article->article->title()?>"><?= $article->article->title() ?></div>
|
||||
<p class="list-text font-bold" style="color: var(--color-main-super-dark)"><?= $article->events->getFormattedDates() ?><?= $article->events->daily_open_time ? ' / ' . $article->events->daily_open_time : '' ?></p>
|
||||
<div class="list-text top20" data-max-str="100"><?= $article->article->textShort() ?></div>
|
||||
<div data-href="<?= ViewReg::generateDetailPageUrl($article) ?>" class="profile-submit gradient ct"><?= Ts::get(114)?></div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \app\models\register\Collections[] $collections
|
||||
*/
|
||||
|
||||
use app\models\Ts;
|
||||
use app\models\OrderProduct;
|
||||
use \app\models\register\Collections;
|
||||
use \app\services\Auth;
|
||||
$lg = Yii::$app->language;
|
||||
|
||||
$user = Auth::getUser();
|
||||
|
||||
/**
|
||||
* @var \app\models\Pages $page
|
||||
*/
|
||||
?>
|
||||
|
||||
<div class="flex-wrap e-magazine-list">
|
||||
<?php foreach ($collections as $collection): ?>
|
||||
<?php
|
||||
$activeDownload = false;
|
||||
if($user) {
|
||||
$hasOrder = OrderProduct::find()->joinWith('order')
|
||||
->where(['user_id' => $user->id, 'model_class' => Collections::class, 'model_id' => $collection->id])->one();
|
||||
if($hasOrder) {
|
||||
if($hasOrder->order->payment && $hasOrder->order->payment->status == 'PAID') {
|
||||
$activeDownload = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="list-element">
|
||||
<div class="img-container" style="background-image: url('<?= $collection->getImg() ?>')"></div>
|
||||
<div class="top20 list-label"><?= Ts::get(117) ?></div>
|
||||
<div class="list-title top20" data-max-str="80"
|
||||
title="<?= $collection->title() ?>"><?= $collection->title() ?></div>
|
||||
<div class="list-text font-bold top20"><?= Ts::get(116) ?>
|
||||
: <?= number_format($collection->price, 2, '.', ' ') ?> лв.
|
||||
</div>
|
||||
<div class="list-text top20" data-max-str="100">
|
||||
<?= $collection->textDescription() ?>
|
||||
</div>
|
||||
<div data-href="<?= $page->getUrl() ?>?collection=<?= $collection->id ?>&back=last_added"
|
||||
class="profile-submit gradient ct">
|
||||
<?php if($activeDownload): ?>
|
||||
<i class="la la-download"></i> <?= $lg == 'en' ? 'Download' : 'Изтегли' ?>
|
||||
<?php else: ?>
|
||||
<i class="la la-shopping-cart"></i> <?= Ts::get(115) ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \app\models\RegisterObjects[] $libs
|
||||
*/
|
||||
|
||||
use app\models\RegisterObjects;
|
||||
use app\models\Ts;
|
||||
$lg = Yii::$app->language;
|
||||
|
||||
/**
|
||||
* @var \app\models\Pages $page
|
||||
*/
|
||||
?>
|
||||
|
||||
<div class="flex-wrap e-magazine-list">
|
||||
<?php foreach ($libs as $lib): ?>
|
||||
<div class="list-element library">
|
||||
<div class="img-container img-container-lib" style="background-image: url('<?= $lib->getImg() ?>')"></div>
|
||||
<div class="top20 list-label"><?= Ts::get(179) ?></div>
|
||||
<div class="list-title top20 pointer" data-max-str="80" data-href="<?= $lib->getLibraryUrl() ?>"
|
||||
title="<?= $lib->getTitle() ?>"><?= $lib->getTitle() ?></div>
|
||||
<div class="list-text font-bold top20"><?= Ts::get(116) ?>
|
||||
: <?= number_format($lib->price, 2, '.', ' ') ?> лв.
|
||||
</div>
|
||||
<?php
|
||||
$user = \app\services\Auth::getUser();
|
||||
$paid = false;
|
||||
if ($user) {
|
||||
$product = \app\models\OrderProduct::find()->joinWith('order')->where(['model_class' => RegisterObjects::class, 'model_id' => $lib->id, 'user_id' => $user->id])->one();
|
||||
if($product && $product->order->payment && $product->order->payment->status == 'PAID') {
|
||||
$paid = true;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<div data-href="<?= $lib->getLibraryUrl() ?>"
|
||||
class="profile-submit gradient ct"><?= !$paid ? '<i class="la la-shopping-cart"></i> '. Ts::get(115) : ($lg == 'en' ? 'Read' : 'Прочети') ?></div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* @var $pagesCount
|
||||
* @var $pageNumber
|
||||
* @var $tab
|
||||
* @var $query
|
||||
*/
|
||||
|
||||
$query = $query ?? '';
|
||||
if ($pagesCount > 1):
|
||||
$first = 1;
|
||||
$last = $pagesCount + 1;
|
||||
if ($pagesCount < 10): ?>
|
||||
<?php for ($p = $first; $p < $last; $p++): ?>
|
||||
<button class="<?= $p == $pageNumber ? 'active' : '' ?>"
|
||||
onclick="window.location.href = `?tab=<?= $tab . $query ?>&page=<?= $p ?>`"><?= $p ?></button>
|
||||
<?php endfor; ?>
|
||||
<?php else:
|
||||
if ($pageNumber < 9): ?>
|
||||
<?php for ($p = 1; $p < 10; $p++): ?>
|
||||
<button class="<?= $p == $pageNumber ? 'active' : '' ?>"
|
||||
onclick="window.location.href = `?tab=<?= $tab . $query ?>&page=<?= $p ?>`"><?= $p ?></button>
|
||||
<?php endfor; ?>
|
||||
<?php else: ?>
|
||||
<button onclick="window.location.href = `?tab=<?= $tab . $query ?>&page=<?= 1 ?>`">1</button>
|
||||
<button class="disabled">...</button>
|
||||
<?php
|
||||
$last = $pageNumber + 4 > $pagesCount ? $pagesCount + 1 : $pageNumber + 3;
|
||||
|
||||
for ($p = $pageNumber - 3; $p < $last; $p++): ?>
|
||||
<button class="<?= $p == $pageNumber ? 'active' : '' ?>"
|
||||
onclick="window.location.href = `?tab=<?= $tab . $query ?>&page=<?= $p ?>`"><?= $p ?></button>
|
||||
<?php endfor; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($pageNumber < $pagesCount - 3): ?>
|
||||
<button class="disabled">...</button>
|
||||
<button class="<?= $pageNumber == $pagesCount ? 'active' : '' ?>"
|
||||
onclick="window.location.href = `?tab=<?= $tab . $query ?>&page=<?= $pagesCount ?>`"><?= $pagesCount ?></button>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
|
||||
/**
|
||||
* @var \app\models\Pages $page
|
||||
*/
|
||||
|
||||
use app\models\Ts;
|
||||
|
||||
$perPage = 27;
|
||||
$pageNumber = $_GET['page'] ?? 1;
|
||||
$data = \app\models\RegisterObjects::find()
|
||||
->where(['lib_type' => 2, 'is_payable' => 1, 'is_active' => 1]);
|
||||
//->andWhere(['>', 'price', 0])
|
||||
//->orderBy(['modified_on' => SORT_DESC]);
|
||||
|
||||
$count = $data->count();
|
||||
$pagesCount = ceil($count / $perPage);
|
||||
|
||||
$libs = $data->limit($perPage)
|
||||
->offset($pageNumber * $perPage - $perPage)
|
||||
->all();
|
||||
?>
|
||||
<div class="section-title top25"><?= Ts::get(112) ?></div>
|
||||
|
||||
<div style="width: 100%">
|
||||
<?= $this->render('_list_libs_partial', ['libs' => $libs, 'page' => $page]); ?>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div id="pagination" class="filter-buttons flex-leqft top50">
|
||||
<?= $this->render('_pagination', [
|
||||
'pagesCount' => $pagesCount,
|
||||
'pageNumber' => $pageNumber,
|
||||
'tab' => 'publications'
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
use app\models\Subscriptions;
|
||||
use app\models\Ts;
|
||||
|
||||
?>
|
||||
<div class="tab-content-panel">
|
||||
<div class="subscriptions flex">
|
||||
<?php
|
||||
foreach (Subscriptions::find()->all() as $subscription): ?>
|
||||
<div class="subscription cw3">
|
||||
<div class="ct header-subs"><?= $subscription->getTitle() ?></div>
|
||||
<div class="body-subs <?= $subscription->isInCart() ? 'selected' : '' ?>">
|
||||
<div class="price"><?= $subscription->getFormatedPrice() ?></div>
|
||||
<div class="months top20"><?= $subscription->months . ' ' . $subscription->getMonthLabel() ?></div>
|
||||
<div class="option">
|
||||
<div data-href="<?= Yii::$app->goToAction('user') ?>"
|
||||
class="top25 subscription-button visible-option profile-submit ct gradient">
|
||||
<?= Ts::get(84) ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,52 @@
|
||||
<link rel="stylesheet" href="/_public/assets/css/page.css">
|
||||
<link rel="stylesheet" href="/_public/assets/css/article-module.css">
|
||||
<?php
|
||||
|
||||
use app\models\Ts;
|
||||
use app\services\ViewReg;
|
||||
use app\widgets\Carousel;
|
||||
use app\widgets\Includes;
|
||||
|
||||
/**
|
||||
* @var \yii\web\View $this
|
||||
* @var \app\models\Articles $model ;
|
||||
* @var $type
|
||||
*/
|
||||
Ts::set([2, 12, 6, 7, 8]);
|
||||
|
||||
Yii::$app->controller->pageTitle = $model->headerTitle();
|
||||
$partners = \app\models\register\Partner::find()->where(['active' => 1, 'deleted' => 0])->andWhere(['<', 'type', 2])->all();
|
||||
|
||||
?>
|
||||
<div class="content">
|
||||
<div class="page-header mobile-hide" style="height: 80px">
|
||||
<a href="<?= Yii::$app->goHome() ?>" class="header-logo top-care">
|
||||
<?php if (Yii::$app->language == 'en'): ?>
|
||||
<img src="/_public/images/logo_en/N-logo-03.png">
|
||||
<?php else: ?>
|
||||
<img src="/_public/images/logo.png">
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="top25 filter-buttons flex-center">
|
||||
<button class="active">Партньори</button>
|
||||
</div>
|
||||
<div class="top25 flex flex-wrap partners">
|
||||
<?php
|
||||
foreach ($partners as $partner):
|
||||
$partnerData = (object)[
|
||||
'name' => $partner->getTsName(),
|
||||
'logo' => $partner->getSrcOfSingleImage('partner_logo_image', '1:1', '/_public/assets/images/emptysq.png')
|
||||
];
|
||||
?>
|
||||
<a href="<?= $partner->getUrl() ?>" class="flex-list-element">
|
||||
<div class="flex flex-center">
|
||||
<img src="<?= $partnerData->logo ?>">
|
||||
</div>
|
||||
<div class="ct">
|
||||
<?= $partnerData->name ?>
|
||||
</div>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,24 @@
|
||||
<link rel="stylesheet" href="/_public/assets/css/page.css">
|
||||
<link rel="stylesheet" href="/_public/assets/css/article-module.css">
|
||||
<?php
|
||||
|
||||
use app\models\Pages;
|
||||
use app\models\Ts;
|
||||
use app\widgets\Carousel;
|
||||
use app\widgets\Includes;
|
||||
|
||||
/**
|
||||
* @var Pages $model
|
||||
* @var \yii\web\View $this
|
||||
*/
|
||||
Ts::set([3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]);
|
||||
|
||||
Yii::$app->controller->pageTitle = $model->headerTitle();
|
||||
Includes::widget([
|
||||
'type' => 'page_header',
|
||||
'model' => $model,
|
||||
'bottom_care' => $model->headerTitle()
|
||||
]);
|
||||
echo $this->render('/site/includes/list_project')
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user