diff --git a/addons/default/visiosoft/advs-module/resources/css/dropleft-edit.css b/addons/default/visiosoft/advs-module/resources/css/dropleft-edit.css index db1b38e2a..db42e2d08 100644 --- a/addons/default/visiosoft/advs-module/resources/css/dropleft-edit.css +++ b/addons/default/visiosoft/advs-module/resources/css/dropleft-edit.css @@ -1,6 +1,7 @@ .dropleft-edit { right: 0; top: 40%; + z-index: 5; } .dropleft-edit button { transform: rotate(-90deg) translate(0, -100%); diff --git a/addons/default/visiosoft/advs-module/resources/css/list.css b/addons/default/visiosoft/advs-module/resources/css/list.css index a62c171b2..a18874f4b 100644 --- a/addons/default/visiosoft/advs-module/resources/css/list.css +++ b/addons/default/visiosoft/advs-module/resources/css/list.css @@ -47,8 +47,6 @@ /* Mobile filter */ .mobile-list-action { - margin-left: -30px; - margin-right: -30px; border: 1px solid #dee2e68a; } @@ -76,6 +74,10 @@ background: #c9c9c9; } +.mobile-list-action div:last-child a:after { + content: none; +} + .mobile-list-action i { font-size: 19px; color: #a1a1a1; @@ -105,4 +107,18 @@ #filterModal { 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; } \ No newline at end of file diff --git a/addons/default/visiosoft/advs-module/resources/js/filter_modal.js b/addons/default/visiosoft/advs-module/resources/js/filter_modal.js index dfecaadf1..19d78bae4 100644 --- a/addons/default/visiosoft/advs-module/resources/js/filter_modal.js +++ b/addons/default/visiosoft/advs-module/resources/js/filter_modal.js @@ -141,4 +141,13 @@ $('.set_category').on('click', function () { $('#filterModal').find('form').attr("action", '/advs/list'); $('#filterModal').modal('toggle'); -}) +}); + +// Move filter on small screen +$(window).on("load resize", function () { + const width = (window.innerWidth > 0) ? window.innerWidth : screen.width; + if (width <= 575) { + const detach = $('#listFilterForm').detach(); + $('#modalListFilterForm').append(detach); + } +}); diff --git a/addons/default/visiosoft/advs-module/resources/js/list.js b/addons/default/visiosoft/advs-module/resources/js/list.js index 19a4b670d..ede10715c 100644 --- a/addons/default/visiosoft/advs-module/resources/js/list.js +++ b/addons/default/visiosoft/advs-module/resources/js/list.js @@ -173,5 +173,17 @@ $('.ad-info-right-bar-video').tooltip({ html: true }); - - +$("#listFilterForm").submit(function(e) { + const inputs = $('#listFilterForm :input'); + [...inputs].forEach((input) => { + if (input.type === 'checkbox' || input.type === 'radio') { + if ($(input).prop("checked") == false) { + $(input).prop('disabled', true); + } + } else { + if ($(input).val() == "" || $(input).find(':selected').val() == "") { + $(input).prop('disabled', true); + } + } + }); +}); \ No newline at end of file diff --git a/addons/default/visiosoft/advs-module/resources/lang/en/field.php b/addons/default/visiosoft/advs-module/resources/lang/en/field.php index 112ea9eac..cdb991641 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/en/field.php +++ b/addons/default/visiosoft/advs-module/resources/lang/en/field.php @@ -263,6 +263,8 @@ return [ "no_location" => "No location is selected.", "continue" => 'Continue', "gallery" => 'Gallery', + "ads" => 'Ads', + "were_found" => 'were found.', // Pending screen 'pending_message_1' => 'The Ad is in the Approval Process', diff --git a/addons/default/visiosoft/advs-module/resources/views/list/list.twig b/addons/default/visiosoft/advs-module/resources/views/list/list.twig index 434637fdf..21792d979 100644 --- a/addons/default/visiosoft/advs-module/resources/views/list/list.twig +++ b/addons/default/visiosoft/advs-module/resources/views/list/list.twig @@ -1,5 +1,9 @@ {% extends layout('list') %} +{% block styles %} + {{ asset_style("visiosoft.module.advs::css/list.css") }} +{% endblock %} + {% block content %}
@@ -15,7 +19,15 @@
diff --git a/addons/default/visiosoft/advs-module/resources/views/list/partials/list-filter.twig b/addons/default/visiosoft/advs-module/resources/views/list/partials/list-filter.twig index 7e1b0e988..214fc5575 100644 --- a/addons/default/visiosoft/advs-module/resources/views/list/partials/list-filter.twig +++ b/addons/default/visiosoft/advs-module/resources/views/list/partials/list-filter.twig @@ -1,5 +1,5 @@ {% set formHtml %} -
+ {% endset %} {% set catSlug = null %} {% set citySlug = null %} @@ -12,7 +12,7 @@ {% endif %} {% if catSlug %} {% set formHtml %} - + {% endset %} {% endif %} {{ formHtml }} diff --git a/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php b/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php index 53f117929..88e6db12c 100644 --- a/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php +++ b/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php @@ -279,9 +279,26 @@ class AdvsController extends PublicController $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', - 'user', 'featured_advs', 'viewType', 'topfields', 'selectDropdown', 'selectRange', 'selectImage', 'ranges', 'seenList', - 'searchedCountry', 'radio', 'categoryId', 'cityId', 'allCats'); + 'user', 'featured_advs', 'viewType', 'topfields', 'selectDropdown', 'selectRange', 'selectImage', 'ranges', + 'seenList', 'searchedCountry', 'radio', 'categoryId', 'cityId', 'allCats', 'catText'); return $this->viewTypeBasedRedirect($viewType, $compact); } diff --git a/addons/default/visiosoft/base-theme/resources/views/index/default.twig b/addons/default/visiosoft/base-theme/resources/views/index/default.twig index 6e64049c5..682d8f74f 100644 --- a/addons/default/visiosoft/base-theme/resources/views/index/default.twig +++ b/addons/default/visiosoft/base-theme/resources/views/index/default.twig @@ -9,11 +9,11 @@
{% if setting_value('visiosoft.theme.base::latest_and_view_all_btn') %}
-

{{ trans('theme::field.latest_ads') }}

+

{{ trans('visiosoft.theme.base::field.latest_ads') }}

{{ trans('theme::field.show_all') }} + href="{{ url_route('visiosoft.module.advs::list') }}">{{ trans('visiosoft.theme.base::field.show_all') }}
{% endif %} diff --git a/addons/default/visiosoft/base-theme/resources/views/layouts/default.twig b/addons/default/visiosoft/base-theme/resources/views/layouts/default.twig index 667e38454..daf89d630 100644 --- a/addons/default/visiosoft/base-theme/resources/views/layouts/default.twig +++ b/addons/default/visiosoft/base-theme/resources/views/layouts/default.twig @@ -12,22 +12,22 @@ - {% include "theme::partials/metadata" %} + {% include "visiosoft.theme.base::partials/metadata" %} {% block styles %}{% endblock %} -{% include "theme::partials/header" %} +{% include "visiosoft.theme.base::partials/header" %} {{ addBlock('layouts/default/section')|raw }}
- {% include "theme::partials/messages" %} + {% include "visiosoft.theme.base::partials/messages" %} {% if (request_path() == '/') %} - {% include "theme::index/default" %} + {% include "visiosoft.theme.base::index/default" %} {% else %} {% block content %}{% endblock %} {% endif %} @@ -35,9 +35,9 @@
-{% include "theme::partials/footer" %} -{% include "theme::partials/assets" %} -{% include "theme::partials/settings" %} +{% include "visiosoft.theme.base::partials/footer" %} +{% include "visiosoft.theme.base::partials/assets" %} +{% include "visiosoft.theme.base::partials/settings" %} \ No newline at end of file diff --git a/addons/default/visiosoft/base-theme/resources/views/partials/assets.twig b/addons/default/visiosoft/base-theme/resources/views/partials/assets.twig index 2833942f0..7b843d4d3 100644 --- a/addons/default/visiosoft/base-theme/resources/views/partials/assets.twig +++ b/addons/default/visiosoft/base-theme/resources/views/partials/assets.twig @@ -14,7 +14,7 @@ {{ asset_add("theme.js", "visiosoft.theme.base::js/jquery.maskedinput.js") }} {{ asset_add("theme.js", "visiosoft.theme.base::js/intlTelInput.min.js") }} {{ asset_add("theme.js", "visiosoft.theme.base::js/utils.js") }} -{{ asset_add("theme.js", "visiosoft.theme.base::js/phoneField.js") }} +{{ asset_add("theme.js", "visiosoft.theme.base::js/phonefield.js") }} {{ asset_add("theme.js", "visiosoft.theme.base::js/jquery.inputmask.bundle.min.js") }} {# Theme Scripts #} diff --git a/addons/default/visiosoft/base-theme/resources/views/partials/header.twig b/addons/default/visiosoft/base-theme/resources/views/partials/header.twig index 443c4a973..90418c6ab 100644 --- a/addons/default/visiosoft/base-theme/resources/views/partials/header.twig +++ b/addons/default/visiosoft/base-theme/resources/views/partials/header.twig @@ -1,5 +1,5 @@ diff --git a/addons/default/visiosoft/base-theme/resources/views/partials/metatags.twig b/addons/default/visiosoft/base-theme/resources/views/partials/metatags.twig index 311344e88..387e7c4c5 100644 --- a/addons/default/visiosoft/base-theme/resources/views/partials/metatags.twig +++ b/addons/default/visiosoft/base-theme/resources/views/partials/metatags.twig @@ -8,8 +8,11 @@ - {{ 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) }} diff --git a/addons/default/visiosoft/base-theme/resources/views/partials/navigation.twig b/addons/default/visiosoft/base-theme/resources/views/partials/navigation.twig index 168d5248c..3b0bc3433 100644 --- a/addons/default/visiosoft/base-theme/resources/views/partials/navigation.twig +++ b/addons/default/visiosoft/base-theme/resources/views/partials/navigation.twig @@ -37,7 +37,7 @@ {{ trans('visiosoft.theme.base::field.profile') }} {% endif %} @@ -56,7 +56,7 @@ {{ trans('visiosoft.theme.base::field.profile') }} {% endif %} diff --git a/addons/default/visiosoft/defaultadmin-theme/src/Listener/AddViewAdsButton.php b/addons/default/visiosoft/defaultadmin-theme/src/Listener/AddViewAdsButton.php index c9bf758f8..2ec46d7eb 100644 --- a/addons/default/visiosoft/defaultadmin-theme/src/Listener/AddViewAdsButton.php +++ b/addons/default/visiosoft/defaultadmin-theme/src/Listener/AddViewAdsButton.php @@ -41,13 +41,15 @@ class AddViewAdsButton protected function addViewAdsButton(UserTableBuilder $builder) { $buttons = $builder->getButtons(); - $dropdown = array_merge($buttons['settings']['dropdown'], [ - "ads" => [ - "text" => trans('visiosoft.theme.defaultadmin::button.view_ads'), - "href" => "admin/advs?filter_User={entry.id}" - ] - ]); - $buttons['settings']['dropdown'] = $dropdown; - $builder->setButtons($buttons); + if (isset($buttons['settings'])) { + $dropdown = array_merge($buttons['settings']['dropdown'], [ + "ads" => [ + "text" => trans('visiosoft.theme.defaultadmin::button.view_ads'), + "href" => "admin/advs?filter_User={entry.id}" + ] + ]); + $buttons['settings']['dropdown'] = $dropdown; + $builder->setButtons($buttons); + } } } \ No newline at end of file diff --git a/addons/default/visiosoft/location-module/resources/views/new-ad/modals.twig b/addons/default/visiosoft/location-module/resources/views/new-ad/modals.twig index 4c53a0c88..4da987afa 100755 --- a/addons/default/visiosoft/location-module/resources/views/new-ad/modals.twig +++ b/addons/default/visiosoft/location-module/resources/views/new-ad/modals.twig @@ -102,4 +102,4 @@ -{{ asset_add("scripts.js", "visiosoft.theme.base::js/phoneField.js") }} +{{ asset_add("scripts.js", "visiosoft.theme.base::js/phonefield.js") }}