locale update
This commit is contained in:
parent
c846c81172
commit
b2a363e4d9
|
|
@ -11,10 +11,10 @@ function onStart(){
|
||||||
$this['movies'] = Tps\Movies\Models\Movie::orderBy('created_at')->limit(15)->get();
|
$this['movies'] = Tps\Movies\Models\Movie::orderBy('created_at')->limit(15)->get();
|
||||||
|
|
||||||
$this['sales'] = Tps\Shops\Models\Sale::all();
|
$this['sales'] = Tps\Shops\Models\Sale::all();
|
||||||
$this['sales_all'] = $this['sales']->slice(0, 9);
|
$this['sales_all'] = $this['sales']->slice(0, 6);
|
||||||
$this['sales_news'] = $this['sales']->where("type", "news")->slice(0, 9);
|
$this['sales_news'] = $this['sales']->where("type", "news")->slice(0, 6);
|
||||||
$this['sales_promo'] = $this['sales']->where("type", "promo")->slice(0, 9);
|
$this['sales_promo'] = $this['sales']->where("type", "promo")->slice(0, 6);
|
||||||
$this['sales_discount'] = $this['sales']->where("type", "discount")->slice(0, 9);
|
$this['sales_discount'] = $this['sales']->where("type", "discount")->slice(0, 6);
|
||||||
|
|
||||||
$this['shop_categories'] = Tps\Shops\Models\Category::where("top_category_id", $this->theme->main_shops)->orderBy('sort_order')->limit(3)->get();
|
$this['shop_categories'] = Tps\Shops\Models\Category::where("top_category_id", $this->theme->main_shops)->orderBy('sort_order')->limit(3)->get();
|
||||||
$this['shop_category_ids'] = $this['shop_categories']->lists('id');
|
$this['shop_category_ids'] = $this['shop_categories']->lists('id');
|
||||||
|
|
|
||||||
|
|
@ -47,12 +47,14 @@ function onStart(){
|
||||||
|
|
||||||
|
|
||||||
<h4 class="crumb_title">
|
<h4 class="crumb_title">
|
||||||
<a href="{{ url('/') }}/main-category/{{shop.category.top_category.id}}/{{shop.category.top_category.name}}">
|
<!-- <a href="{{ url('/') }}/main-category/{{shop.category.top_category.id}}/{{shop.category.top_category.name}}"> -->
|
||||||
|
<a href="{{ url('/') }}/main-category/{{shop.category.top_category.id}}">
|
||||||
{{shop.category.top_category.name}}
|
{{shop.category.top_category.name}}
|
||||||
</a>
|
</a>
|
||||||
</h4>
|
</h4>
|
||||||
<h4 class="crumb_title">
|
<h4 class="crumb_title">
|
||||||
<a href="{{ url('/') }}/category/{{shop.category.id}}/{{shop.category.name}}">
|
<!-- <a href="{{ url('/') }}/category/{{shop.category.id}}/{{shop.category.name}}"> -->
|
||||||
|
<a href="{{ url('/') }}/category/{{shop.category.id}}">
|
||||||
{{shop.category.name}}
|
{{shop.category.name}}
|
||||||
</a>
|
</a>
|
||||||
</h4>
|
</h4>
|
||||||
|
|
@ -156,7 +158,8 @@ function onStart(){
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="post_link">
|
<div class="post_link">
|
||||||
<a href="{{ url('/') }}/category/{{shop.category.id}}/{{shop.category.name}}">
|
<!-- <a href="{{ url('/') }}/category/{{shop.category.id}}/{{shop.category.name}}"> -->
|
||||||
|
<a href="{{ url('/') }}/category/{{shop.category.id}}">
|
||||||
Посмотреть все
|
Посмотреть все
|
||||||
<span>
|
<span>
|
||||||
<svg width="14" height="12" viewBox="0 0 14 12" fill="none"
|
<svg width="14" height="12" viewBox="0 0 14 12" fill="none"
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,26 @@
|
||||||
<?php
|
<?php
|
||||||
function onStart(){
|
function onStart(){
|
||||||
$this['activeLocaleFlag'] = 'assets/images/flag_'. $this->activeLocale .'.png';
|
$this['activeLocaleFlag'] = 'assets/images/flag_'. $this->activeLocale .'.png';
|
||||||
|
|
||||||
|
$protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http";
|
||||||
|
$host = $_SERVER['HTTP_HOST'];
|
||||||
|
$uri = $_SERVER['REQUEST_URI'];
|
||||||
|
|
||||||
|
$url = $protocol . "://" . $host . $uri;
|
||||||
|
|
||||||
|
$path = parse_url($url, PHP_URL_PATH);
|
||||||
|
|
||||||
|
$segmentsToRemove = array("tk", "en", "ru");
|
||||||
|
foreach ($segmentsToRemove as $segment) {
|
||||||
|
$path = str_replace("/$segment/", "/", $path);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this["pageLink"] = $path;
|
||||||
|
|
||||||
|
//dd($this["pageLink"]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
==
|
==
|
||||||
|
|
@ -42,7 +62,7 @@ function onStart(){
|
||||||
</span>
|
</span>
|
||||||
</h6>
|
</h6>
|
||||||
|
|
||||||
<div class="lang_box">
|
<!-- <div class="lang_box">
|
||||||
{% for code, name in locales %}
|
{% for code, name in locales %}
|
||||||
{% if code != activeLocale %}
|
{% if code != activeLocale %}
|
||||||
{% set aa = 'assets/images/flag_'~ code ~'.png'%}
|
{% set aa = 'assets/images/flag_'~ code ~'.png'%}
|
||||||
|
|
@ -54,11 +74,33 @@ function onStart(){
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
{{code|upper }}
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</div> -->
|
||||||
|
<div class="lang_box">
|
||||||
|
{% for code, name in locales %}
|
||||||
|
{% if code != activeLocale %}
|
||||||
|
{% set aa = 'assets/images/flag_'~ code ~'.png'%}
|
||||||
|
<a href="{{ url('/' ~ code ) }}{{pageLink}}">
|
||||||
|
<span class="lang_flag">
|
||||||
|
<img
|
||||||
|
src="{{ aa|theme }}"
|
||||||
|
alt="lang-flag"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
|
||||||
{{code|upper }}
|
{{code|upper }}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue