mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-10 07:16:06 -06:00
add catalog mode && fixed country filter problem
This commit is contained in:
parent
5007bbeba6
commit
a4e3f716d9
@ -18,10 +18,11 @@
|
|||||||
{% include "visiosoft.module.advs::ad-detail/partials/author-button" %}
|
{% include "visiosoft.module.advs::ad-detail/partials/author-button" %}
|
||||||
<!-- admin -->
|
<!-- admin -->
|
||||||
|
|
||||||
<!-- breadcrumb -->
|
{% if setting_value('visiosoft.theme.base::breadcrumbs') %}
|
||||||
{% include "visiosoft.module.advs::ad-detail/partials/breadcrumb" %}
|
<!-- breadcrumb -->
|
||||||
<!-- breadcrumb -->
|
{% include "visiosoft.module.advs::ad-detail/partials/breadcrumb" %}
|
||||||
|
<!-- breadcrumb -->
|
||||||
|
{% endif %}
|
||||||
<h2 class="title">
|
<h2 class="title">
|
||||||
{{ adv.title }}
|
{{ adv.title }}
|
||||||
{{ addBlock('ad-detail/title/action',{'adv_id':adv.id})|raw }}
|
{{ addBlock('ad-detail/title/action',{'adv_id':adv.id})|raw }}
|
||||||
@ -32,23 +33,25 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
{% include "visiosoft.module.advs::ad-detail/partials/slider" %}
|
{% include "visiosoft.module.advs::ad-detail/partials/slider" %}
|
||||||
|
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
{% include "visiosoft.module.advs::ad-detail/partials/detail" %}
|
{% if setting_value('visiosoft.theme.base::ad_details') %}
|
||||||
|
{% include "visiosoft.module.advs::ad-detail/partials/detail" %}
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--detail-ad -->
|
<!--detail-ad -->
|
||||||
|
|
||||||
|
{% if setting_value('visiosoft.theme.base::ad_details_tab') %}
|
||||||
|
|
||||||
{% if blocks('ad-item-content-block-area') is null %}
|
{% if blocks('ad-item-content-block-area') is null %}
|
||||||
{% include "visiosoft.module.advs::ad-detail/partials/content" %}
|
{% include "visiosoft.module.advs::ad-detail/partials/content" %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ blocks('ad-item-content-block-area') }}
|
{{ blocks('ad-item-content-block-area') }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{{ addBlock('ad-detail/widget', {'price': adv.price, 'id': adv.id})|raw }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{{ addBlock('ad-detail/widget', {'price': adv.price, 'id': adv.id})|raw }}
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|||||||
@ -146,27 +146,14 @@ class AdvsController extends PublicController
|
|||||||
$subCats = array();
|
$subCats = array();
|
||||||
|
|
||||||
$param = $this->requestHttp->toArray();
|
$param = $this->requestHttp->toArray();
|
||||||
if (!isset($param['country'])) {
|
|
||||||
if (is_null(Cookie::get('country'))) {
|
|
||||||
$param['country'] = setting_value('visiosoft.module.advs::default_country');
|
|
||||||
} else {
|
|
||||||
$param['country'] = Cookie::get('country');
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if ($param['country'] != setting_value('visiosoft.module.advs::default_country')) {
|
|
||||||
Cookie::queue(Cookie::make('country', $param['country'], 84000));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$searchedCountry = $param['country'];
|
|
||||||
|
|
||||||
$countries = $this->country_repository->viewAll();
|
$countries = $this->country_repository->viewAll();
|
||||||
|
|
||||||
$isActiveDopings = $this->adv_model->is_enabled('dopings');
|
$isActiveDopings = $this->adv_model->is_enabled('dopings');
|
||||||
|
|
||||||
$isActiveCustomFields = $this->adv_model->is_enabled('customfields');
|
$isActiveCustomFields = $this->adv_model->is_enabled('customfields');
|
||||||
|
|
||||||
$advs = $this->adv_repository->searchAdvs('list', $param, $customParameters);
|
$advs = $this->adv_repository->searchAdvs('list', $param, $customParameters);
|
||||||
|
|
||||||
$advs = $this->adv_repository->addAttributes($advs);
|
$advs = $this->adv_repository->addAttributes($advs);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'monitoring' => [
|
||||||
|
'stacked' => false,
|
||||||
|
'tabs' => [
|
||||||
|
'catalog_mode' => [
|
||||||
|
'title' => 'visiosoft.theme.base::section.catalog_mode.name',
|
||||||
|
'fields' => [
|
||||||
|
'navigation_title', 'navigation_action', 'date_fields', 'price_fields',
|
||||||
|
'breadcrumbs', 'ad_details', 'ad_details_tab','latest_and_view_all_btn'
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'navigation_title' => [
|
||||||
|
'type' => 'anomaly.field_type.boolean',
|
||||||
|
"config" => [
|
||||||
|
"default_value" => 1,
|
||||||
|
]
|
||||||
|
],
|
||||||
|
'navigation_action' => [
|
||||||
|
'type' => 'anomaly.field_type.boolean',
|
||||||
|
"config" => [
|
||||||
|
"default_value" => 1,
|
||||||
|
]
|
||||||
|
],
|
||||||
|
'date_fields' => [
|
||||||
|
'type' => 'anomaly.field_type.boolean',
|
||||||
|
"config" => [
|
||||||
|
"default_value" => 1,
|
||||||
|
]
|
||||||
|
],
|
||||||
|
'price_fields' => [
|
||||||
|
'type' => 'anomaly.field_type.boolean',
|
||||||
|
"config" => [
|
||||||
|
"default_value" => 1,
|
||||||
|
]
|
||||||
|
],
|
||||||
|
'breadcrumbs' => [
|
||||||
|
'type' => 'anomaly.field_type.boolean',
|
||||||
|
"config" => [
|
||||||
|
"default_value" => 1,
|
||||||
|
]
|
||||||
|
],
|
||||||
|
'ad_details' => [
|
||||||
|
'type' => 'anomaly.field_type.boolean',
|
||||||
|
"config" => [
|
||||||
|
"default_value" => 1,
|
||||||
|
]
|
||||||
|
],
|
||||||
|
'ad_details_tab' => [
|
||||||
|
'type' => 'anomaly.field_type.boolean',
|
||||||
|
"config" => [
|
||||||
|
"default_value" => 1,
|
||||||
|
]
|
||||||
|
],
|
||||||
|
'latest_and_view_all_btn' => [
|
||||||
|
'type' => 'anomaly.field_type.boolean',
|
||||||
|
"config" => [
|
||||||
|
"default_value" => 1,
|
||||||
|
]
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
@ -7,4 +7,13 @@ return [
|
|||||||
'show_all' => [
|
'show_all' => [
|
||||||
'name' => 'Show All',
|
'name' => 'Show All',
|
||||||
],
|
],
|
||||||
|
'login' => [
|
||||||
|
'name' => 'Login',
|
||||||
|
],
|
||||||
|
'logout' => [
|
||||||
|
'name' => 'Logout',
|
||||||
|
],
|
||||||
|
'profile' => [
|
||||||
|
'name' => 'Profile',
|
||||||
|
],
|
||||||
];
|
];
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'catalog_mode' => [
|
||||||
|
'name' => 'Catalog Mode',
|
||||||
|
],
|
||||||
|
];
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'navigation_title' => [
|
||||||
|
'name' => 'Navigation Title',
|
||||||
|
],
|
||||||
|
'navigation_action' => [
|
||||||
|
'name' => 'Navigation Action',
|
||||||
|
],
|
||||||
|
'country_fields' => [
|
||||||
|
'name' => 'Country Fields',
|
||||||
|
],
|
||||||
|
'date_fields' => [
|
||||||
|
'name' => 'Date Fields',
|
||||||
|
],
|
||||||
|
'price_fields' => [
|
||||||
|
'name' => 'Price Fields',
|
||||||
|
],
|
||||||
|
'breadcrumbs' => [
|
||||||
|
'name' => 'Breadcrumb',
|
||||||
|
],
|
||||||
|
'ad_details' => [
|
||||||
|
'name' => 'Ad Details',
|
||||||
|
],
|
||||||
|
'ad_details_tab' => [
|
||||||
|
'name' => 'Ad Details Tab',
|
||||||
|
],
|
||||||
|
'latest_and_view_all_btn' => [
|
||||||
|
'name' => 'Latest and View All Btn',
|
||||||
|
],
|
||||||
|
];
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'catalog_mode' => [
|
||||||
|
'name' => 'Katalog Modu',
|
||||||
|
],
|
||||||
|
];
|
||||||
@ -1,13 +1,14 @@
|
|||||||
<div class="album bg-light">
|
<div class="album bg-light">
|
||||||
<div class="row p-2">
|
<div class="row p-2">
|
||||||
<div class="col-md-6">
|
{% if setting_value('visiosoft.theme.base::latest_and_view_all_btn') %}
|
||||||
<h4 class="p-2">{{ trans('theme::field.latest_ads.name') }}</h4>
|
<div class="col-md-6">
|
||||||
</div>
|
<h4 class="p-2">{{ trans('theme::field.latest_ads.name') }}</h4>
|
||||||
<div class="col-md-6 text-right">
|
</div>
|
||||||
<a class="btn btn-outline-secondary"
|
<div class="col-md-6 text-right">
|
||||||
href="{{ url_route('visiosoft.module.advs::list') }}">{{ trans('theme::field.show_all.name') }}</a>
|
<a class="btn btn-outline-secondary"
|
||||||
</div>
|
href="{{ url_route('visiosoft.module.advs::list') }}">{{ trans('theme::field.show_all.name') }}</a>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
@ -25,28 +26,32 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="d-flex justify-content-between align-items-center">
|
{% if setting_value('visiosoft.theme.base::price_fields') %}
|
||||||
<b>{{ latestAd.price }} {{ latestAd.currency }}</b>
|
<div class="d-flex justify-content-between align-items-center">
|
||||||
</div>
|
<b>{{ latestAd.price }} {{ latestAd.currency }}</b>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
<div class="d-flex justify-content-between align-items-center text-truncate">
|
<div class="d-flex justify-content-between align-items-center text-truncate">
|
||||||
<a href="{{ latestAd.detail_url }}">
|
<a href="{{ latestAd.detail_url }}">
|
||||||
<p class="card-title d-inline-block">{{ latestAd.name }}</p>
|
<p class="card-title d-inline-block">{{ latestAd.name }}</p>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% if setting_value('visiosoft.module.location::home_page_location') %}
|
{% if setting_value('visiosoft.module.location::home_page_location') %}
|
||||||
<div class="d-flex justify-content-between align-items-center">
|
<div class="d-flex justify-content-between align-items-center">
|
||||||
<small>
|
<small>
|
||||||
<i class="fas fa-location-arrow text-primary"></i>
|
<i class="fas fa-location-arrow text-primary"></i>
|
||||||
{{ latestAd.city_name }}, {{ latestAd.country_name }}
|
{{ latestAd.city_name }}, {{ latestAd.country_name }}
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if setting_value('visiosoft.theme.base::date_fields') %}
|
||||||
|
<div class="d-flex justify-content-between align-items-center">
|
||||||
|
<small>
|
||||||
|
<i class="far fa-clock text-dark"></i>
|
||||||
|
{{ latestAd.created_at|date('d/m/Y') }}
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="d-flex justify-content-between align-items-center">
|
|
||||||
<small>
|
|
||||||
<i class="far fa-clock text-dark"></i>
|
|
||||||
{{ latestAd.created_at|date('d/m/Y') }}
|
|
||||||
</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<a class="navbar-brand" href="{{ url("/") }}">{{ setting_value('streams::name', config_get('streams::distribution.name')) }}</a>
|
{% if setting_value('visiosoft.theme.base::navigation_title') %}
|
||||||
|
<a class="navbar-brand"
|
||||||
|
href="{{ url("/") }}">{{ setting_value('streams::name', config_get('streams::distribution.name')) }}</a>
|
||||||
|
{% endif %}
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarContent"
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarContent"
|
||||||
aria-controls="navbarContent" aria-expanded="false" aria-label="Toggle navigation">
|
aria-controls="navbarContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
@ -20,38 +23,44 @@
|
|||||||
.childListClass('dropdown-menu')
|
.childListClass('dropdown-menu')
|
||||||
.cache({'namespace': 'user'})
|
.cache({'namespace': 'user'})
|
||||||
.render()|raw }}
|
.render()|raw }}
|
||||||
<ul class="nav navbar-nav navbar-right d-block d-sm-none">
|
|
||||||
<li class="nav-item">
|
{% if setting_value('visiosoft.theme.base::navigation_action') %}
|
||||||
{% if auth_check() %}
|
<ul class="nav navbar-nav navbar-right d-block d-sm-none">
|
||||||
<a class="nav-link" href="{{ url_route('anomaly.module.users::logout') }}">Logout</a>
|
<li class="nav-item">
|
||||||
{% else %}
|
{% if auth_check() %}
|
||||||
<a class="nav-link" href="{{ url_route('anomaly.module.users::login') }}">Login</a>
|
<a class="nav-link" href="{{ url_route('anomaly.module.users::logout') }}">{{ trans('visiosoft.theme.base::field.logout.name') }}</a>
|
||||||
{% endif %}
|
{% else %}
|
||||||
</li>
|
<a class="nav-link" href="{{ url_route('anomaly.module.users::login') }}">{{ trans('visiosoft.theme.base::field.login.name') }}</a>
|
||||||
<li class="nav-item">
|
{% endif %}
|
||||||
<a class="nav-link" href="{{ url_route('profile::profile') }}">Profile</a>
|
</li>
|
||||||
</li>
|
<li class="nav-item">
|
||||||
<li class="nav-item">
|
<a class="nav-link" href="{{ url_route('profile::profile') }}">{{ trans('visiosoft.theme.base::field.profile.name') }}</a>
|
||||||
<a href="/advs/create_adv" class="btn btn-primary">{{ trans("theme::button.post_ad.name") }}</a>
|
</li>
|
||||||
</li>
|
<li class="nav-item">
|
||||||
</ul>
|
<a href="/advs/create_adv" class="btn btn-primary">{{ trans("theme::button.post_ad.name") }}</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="d-none d-sm-block">
|
<div class="d-none d-sm-block">
|
||||||
<ul class="nav navbar-nav navbar-right">
|
{% if setting_value('visiosoft.theme.base::navigation_action') %}
|
||||||
<li class="nav-item">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
{% if auth_check() %}
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{{ url_route('anomaly.module.users::logout') }}">Logout</a>
|
{% if auth_check() %}
|
||||||
{% else %}
|
<a class="nav-link" href="{{ url_route('anomaly.module.users::logout') }}">{{ trans('visiosoft.theme.base::field.logout.name') }}</a>
|
||||||
<a class="nav-link" href="{{ url_route('anomaly.module.users::login') }}">Login</a>
|
{% else %}
|
||||||
{% endif %}
|
<a class="nav-link" href="{{ url_route('anomaly.module.users::login') }}">{{ trans('visiosoft.theme.base::field.login.name') }}</a>
|
||||||
</li>
|
{% endif %}
|
||||||
<li class="nav-item">
|
</li>
|
||||||
<a class="nav-link" href="{{ url_route('profile::profile') }}">Profile</a>
|
<li class="nav-item">
|
||||||
</li>
|
<a class="nav-link" href="{{ url_route('profile::profile') }}">{{ trans('visiosoft.theme.base::field.profile.name') }}</a>
|
||||||
<li class="nav-item">
|
</li>
|
||||||
<a href="/advs/create_adv" class="btn btn-primary">{{ trans("theme::button.post_ad.name") }}</a>
|
<li class="nav-item">
|
||||||
</li>
|
<a href="/advs/create_adv" class="btn btn-primary">{{ trans("theme::button.post_ad.name") }}</a>
|
||||||
</ul>
|
</li>
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
Loading…
Reference in New Issue
Block a user