mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 14:56:13 -06:00
Merge pull request #580 from openclassify/dia
#1490 Cat link improvments
This commit is contained in:
commit
9a2517ab1b
@ -106,3 +106,17 @@
|
|||||||
#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('showTitle', false);
|
||||||
|
$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',
|
||||||
'searchedCountry', 'radio', 'categoryId', 'cityId', 'allCats');
|
'seenList', 'searchedCountry', 'radio', 'categoryId', 'cityId', 'allCats', 'catText');
|
||||||
|
|
||||||
return $this->viewTypeBasedRedirect($viewType, $compact);
|
return $this->viewTypeBasedRedirect($viewType, $compact);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,8 +8,11 @@
|
|||||||
<!-- Meta Tags -->
|
<!-- Meta Tags -->
|
||||||
|
|
||||||
<title>
|
<title>
|
||||||
{{ setting_value('streams::name', config_get('streams::distribution.name')) }}
|
{% set showTitle = template.showTitle is same as(false) ? false : true %}
|
||||||
›
|
{% if showTitle %}
|
||||||
|
{{ setting_value('streams::name', config_get('streams::distribution.name')) }}
|
||||||
|
›
|
||||||
|
{% endif %}
|
||||||
{{ trans(template.meta_title) }}
|
{{ trans(template.meta_title) }}
|
||||||
</title>
|
</title>
|
||||||
|
|
||||||
|
|||||||
@ -41,13 +41,15 @@ class AddViewAdsButton
|
|||||||
protected function addViewAdsButton(UserTableBuilder $builder)
|
protected function addViewAdsButton(UserTableBuilder $builder)
|
||||||
{
|
{
|
||||||
$buttons = $builder->getButtons();
|
$buttons = $builder->getButtons();
|
||||||
$dropdown = array_merge($buttons['settings']['dropdown'], [
|
if (isset($buttons['settings'])) {
|
||||||
"ads" => [
|
$dropdown = array_merge($buttons['settings']['dropdown'], [
|
||||||
"text" => trans('visiosoft.theme.defaultadmin::button.view_ads'),
|
"ads" => [
|
||||||
"href" => "admin/advs?filter_User={entry.id}"
|
"text" => trans('visiosoft.theme.defaultadmin::button.view_ads'),
|
||||||
]
|
"href" => "admin/advs?filter_User={entry.id}"
|
||||||
]);
|
]
|
||||||
$buttons['settings']['dropdown'] = $dropdown;
|
]);
|
||||||
$builder->setButtons($buttons);
|
$buttons['settings']['dropdown'] = $dropdown;
|
||||||
|
$builder->setButtons($buttons);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user