mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 06:46:08 -06:00
#1490 Cat link improvments
This commit is contained in:
parent
156abe47ed
commit
c2fb5d85a0
@ -105,4 +105,18 @@
|
|||||||
|
|
||||||
#filterModal {
|
#filterModal {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.result-text {
|
||||||
|
font-size: 13px;
|
||||||
|
margin: 0 -15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.result-text span:first-child {
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.result-text span:last-child {
|
||||||
|
color: #8f0100;
|
||||||
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
@ -173,5 +173,13 @@ $('.ad-info-right-bar-video').tooltip({
|
|||||||
html: true
|
html: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#listFilterForm").submit(function(e) {
|
||||||
|
const inputs = $('#listFilterForm :input');
|
||||||
|
[...inputs].forEach((input) => {
|
||||||
|
if ($(input).val() == ""
|
||||||
|
|| $(input).prop("checked") == false
|
||||||
|
|| $(input).find(':selected').val() == "") {
|
||||||
|
$(input).prop('disabled', true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -263,6 +263,8 @@ return [
|
|||||||
"no_location" => "No location is selected.",
|
"no_location" => "No location is selected.",
|
||||||
"continue" => 'Continue',
|
"continue" => 'Continue',
|
||||||
"gallery" => 'Gallery',
|
"gallery" => 'Gallery',
|
||||||
|
"ads" => 'Ads',
|
||||||
|
"were_found" => 'were found.',
|
||||||
|
|
||||||
// Pending screen
|
// Pending screen
|
||||||
'pending_message_1' => 'The Ad is in the Approval Process',
|
'pending_message_1' => 'The Ad is in the Approval Process',
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
{% extends layout('list') %}
|
{% extends layout('list') %}
|
||||||
|
|
||||||
|
{% block styles %}
|
||||||
|
{{ asset_style("visiosoft.module.advs::css/list.css") }}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section>
|
<section>
|
||||||
|
|
||||||
@ -15,7 +19,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<div class="section recommended-classified">
|
<div class="section recommended-classified">
|
||||||
|
{% if catText %}
|
||||||
|
<div class="result-text border py-2 px-3 mb-3 d-none d-sm-block">
|
||||||
|
<p class="mb-0">
|
||||||
|
<span>"{{ catText }}"</span>
|
||||||
|
<span>{{ advs.total }} {{ trans('visiosoft.module.advs::field.ads')|lower }}</span>
|
||||||
|
{{ trans('visiosoft.module.advs::field.were_found') }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
<div class="row breadcrumb list-header">
|
<div class="row breadcrumb list-header">
|
||||||
|
|
||||||
<div class="col-md-6 my-2 d-none d-sm-block">
|
<div class="col-md-6 my-2 d-none d-sm-block">
|
||||||
@ -61,7 +73,6 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
{{ asset_add("scripts.js", "visiosoft.module.advs::js/list.js") }}
|
{{ asset_add("scripts.js", "visiosoft.module.advs::js/list.js") }}
|
||||||
{{ asset_add("styles.css", "visiosoft.module.advs::css/list.css") }}
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block customjs %}
|
{% block customjs %}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
{% set formHtml %}
|
{% set formHtml %}
|
||||||
<form action="{{ url_route('visiosoft.module.advs::list') }}" method="get">
|
<form action="{{ url_route('visiosoft.module.advs::list') }}" method="get" id="listFilterForm">
|
||||||
{% endset %}
|
{% endset %}
|
||||||
{% set catSlug = null %}
|
{% set catSlug = null %}
|
||||||
{% set citySlug = null %}
|
{% set citySlug = null %}
|
||||||
@ -12,7 +12,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% if catSlug %}
|
{% if catSlug %}
|
||||||
{% set formHtml %}
|
{% set formHtml %}
|
||||||
<form action="{{ url_route('adv_list_seo', [catSlug, citySlug]) }}" method="get">
|
<form action="{{ url_route('adv_list_seo', [catSlug, citySlug]) }}" method="get" id="listFilterForm">
|
||||||
{% endset %}
|
{% endset %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ formHtml }}
|
{{ formHtml }}
|
||||||
|
|||||||
@ -279,9 +279,26 @@ class AdvsController extends PublicController
|
|||||||
|
|
||||||
$viewType = $this->requestHttp->cookie('viewType');
|
$viewType = $this->requestHttp->cookie('viewType');
|
||||||
|
|
||||||
|
if (!isset($allCats)) {
|
||||||
|
if (count($mainCats) == 1 || count($mainCats) == 2) {
|
||||||
|
$catText = end($mainCats)['val'];
|
||||||
|
} elseif (count($mainCats) > 2) {
|
||||||
|
$catArray = array_slice($mainCats, 2);
|
||||||
|
$catText = '';
|
||||||
|
$loop = 0;
|
||||||
|
foreach ($catArray as $cat) {
|
||||||
|
$catText = !$loop ? $catText . $cat['val'] : $catText . ' ' . $cat['val'];
|
||||||
|
$loop++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->template->set('notShowTitle', true);
|
||||||
|
$this->template->set('meta_title', $catText);
|
||||||
|
$this->template->set('meta_description', $catText);
|
||||||
|
}
|
||||||
|
|
||||||
$compact = compact('advs', 'countries', 'mainCats', 'subCats', 'checkboxes', 'request', 'param',
|
$compact = compact('advs', 'countries', 'mainCats', 'subCats', 'checkboxes', 'request', 'param',
|
||||||
'user', 'featured_advs', 'viewType', 'topfields', 'selectDropdown', 'selectRange', 'selectImage', 'ranges', 'seenList',
|
'user', 'featured_advs', 'viewType', 'topfields', 'selectDropdown', 'selectRange', 'selectImage', 'ranges', 'seenList',
|
||||||
'searchedCountry', 'radio', 'categoryId', 'cityId', 'allCats');
|
'searchedCountry', 'radio', 'categoryId', 'cityId', 'allCats', 'catText');
|
||||||
|
|
||||||
return $this->viewTypeBasedRedirect($viewType, $compact);
|
return $this->viewTypeBasedRedirect($viewType, $compact);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,8 +8,10 @@
|
|||||||
<!-- Meta Tags -->
|
<!-- Meta Tags -->
|
||||||
|
|
||||||
<title>
|
<title>
|
||||||
{{ setting_value('streams::name', config_get('streams::distribution.name')) }}
|
{% if not template.notShowTitle %}
|
||||||
›
|
{{ setting_value('streams::name', config_get('streams::distribution.name')) }}
|
||||||
|
›
|
||||||
|
{% endif %}
|
||||||
{{ trans(template.meta_title) }}
|
{{ trans(template.meta_title) }}
|
||||||
</title>
|
</title>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user