From 3ef866323e0b5e858009e48007e6f78552ef2614 Mon Sep 17 00:00:00 2001 From: Diatrex Date: Fri, 9 Apr 2021 11:30:55 +0300 Subject: [PATCH] #3472 listing design improvments - Integrate --- .../advs-module/resources/lang/en/field.php | 7 + .../resources/views/list/partials/ads.twig | 116 ++++--- .../views/list/partials/display-mode.twig | 50 ++- .../views/list/partials/list-filter.twig | 317 +++++++----------- .../views/list/partials/list-sort-by.twig | 65 ++-- 5 files changed, 242 insertions(+), 313 deletions(-) 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 384be6a8c..15d55eb6a 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/en/field.php +++ b/addons/default/visiosoft/advs-module/resources/lang/en/field.php @@ -337,6 +337,13 @@ return [ 'owner' => 'Owner', 'default_owner_instruction' => 'The owner will default to the current user if no user is selected', + // Listing page + 'ad_title' => 'Ad title', + 'listing_date' => 'Listing Date', + 'view' => 'View', + 'ads_with_map' => 'Ads With Map', + 'advanced_sorting' => 'Advanced Sorting', + 'free' => 'Free', 'ad_date' => 'Ad Date', 'photo_video' => 'Photo, Video', diff --git a/addons/default/visiosoft/advs-module/resources/views/list/partials/ads.twig b/addons/default/visiosoft/advs-module/resources/views/list/partials/ads.twig index 20c4cbe0f..f958ac041 100644 --- a/addons/default/visiosoft/advs-module/resources/views/list/partials/ads.twig +++ b/addons/default/visiosoft/advs-module/resources/views/list/partials/ads.twig @@ -1,51 +1,69 @@ -{{ addBlock('ad-list/partials/ads',{'featured_advs':featured_advs})|raw }} -{% for adv in advs %} -
- -
-
- {{ adv.name }} -
-
-
-
-

{{ adv.name }}

+{% set hideStandard = setting_value('visiosoft.module.advs::hide_listing_standard_price') %} +{% set listLocation = setting_value('visiosoft.module.location::list_page_location') %} + +
+ + + + + {% if listLocation %} + + {% endif %} + + + + + + + + {{ addBlock('ad-list/partials/ads', {'featured_advs': featured_advs})|raw }} + + {% for adv in advs %} + + + + {% if listLocation %} + + {% endif %} + + + + {% endfor %} + +
{{ trans('visiosoft.module.advs::field.ad_title') }} + {{ trans('visiosoft.module.advs::field.city.name') }} / {{ trans('visiosoft.module.advs::field.district.name') }} + {{ trans('visiosoft.module.advs::field.listing_date') }}{{ trans('visiosoft.module.advs::field.price.name') }}
+ + {{ adv.name }} + + +

#{{ adv.id }}

+
+ {{ adv.name }} +
+

{{ adv.cat1_name }} /{{ adv.cat2_name }}

+
+ + {{ addBlock('list/extra-actions', {'ad': adv, 'vars': _context})|raw }} +
-
- {{ adv.cat1_name }}, {{ adv.cat2_name }} -
- - -
-
-
- {% if not setting_value('visiosoft.module.advs::hide_listing_standard_price') %} -

- {{ adv.standard_price != adv.price and adv.standard_price != '0' - ? currency_format(adv.standard_price,adv.currency) - : '' }} -

- {% endif %} - {{ adv.price != '0' - ? currency_format(adv.price,adv.currency) - : trans('visiosoft.module.advs::field.free') }} -
- {% if setting_value('visiosoft.module.location::list_page_location') %} -
- {{ adv.city_name }} {{ adv.country_name }} -
+
+

{{ adv.country_name }}

+

{{ adv.city_name }}

+
+

{{ adv.publish_at.value|date('d F') }}

+

{{ adv.publish_at.value|date('Y') }}

+
+ {% if not hideStandard %} +

+ + {{ adv.standard_price != adv.price and adv.standard_price != '0' ? currency_format(adv.standard_price,adv.currency) : '' }} + +

{% endif %} - - - - -
-
-
- {{ addBlock('list/extra-actions', {'ad': adv})|raw }} -
-
- -{% endfor %} +

+ {{ adv.price != '0' ? currency_format(adv.price,adv.currency) : trans('visiosoft.module.advs::field.free') }} +

+
+
diff --git a/addons/default/visiosoft/advs-module/resources/views/list/partials/display-mode.twig b/addons/default/visiosoft/advs-module/resources/views/list/partials/display-mode.twig index f30dc0eac..6a1391ca2 100644 --- a/addons/default/visiosoft/advs-module/resources/views/list/partials/display-mode.twig +++ b/addons/default/visiosoft/advs-module/resources/views/list/partials/display-mode.twig @@ -1,34 +1,22 @@ -