From e7e86e852324289b7db1783335d7377f2c8d4a01 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 26 Jul 2023 13:56:47 +0000 Subject: [PATCH] Add multi image support on templates(shop, sale) --- plugins/tps/shops/models/sale/fields.yaml | 6 +++--- plugins/tps/shops/models/shop/fields.yaml | 4 ++-- .../builder_table_update_tps_shops_sales.php | 0 .../builder_table_update_tps_shops_sales_2.php | 0 themes/berkarar/pages/sale.htm | 14 +++++++++++--- themes/berkarar/pages/shop.htm | 14 +++++++++++--- themes/berkarar/partials/home/sales.htm | 8 ++++---- 7 files changed, 31 insertions(+), 15 deletions(-) mode change 100644 => 100755 plugins/tps/shops/updates/builder_table_update_tps_shops_sales.php mode change 100644 => 100755 plugins/tps/shops/updates/builder_table_update_tps_shops_sales_2.php diff --git a/plugins/tps/shops/models/sale/fields.yaml b/plugins/tps/shops/models/sale/fields.yaml index 63c905d..dde1531 100755 --- a/plugins/tps/shops/models/sale/fields.yaml +++ b/plugins/tps/shops/models/sale/fields.yaml @@ -29,12 +29,12 @@ fields: mode: date span: auto type: datepicker - image: - label: Image - span: auto + images: + label: Images mode: image useCaption: true thumbOptions: mode: crop extension: auto + span: auto type: fileupload diff --git a/plugins/tps/shops/models/shop/fields.yaml b/plugins/tps/shops/models/shop/fields.yaml index 54aa7a6..ecf0f8c 100755 --- a/plugins/tps/shops/models/shop/fields.yaml +++ b/plugins/tps/shops/models/shop/fields.yaml @@ -44,8 +44,8 @@ fields: label: 'Open Time' span: auto type: text - image: - label: Image + images: + label: Images mode: image useCaption: true thumbOptions: diff --git a/plugins/tps/shops/updates/builder_table_update_tps_shops_sales.php b/plugins/tps/shops/updates/builder_table_update_tps_shops_sales.php old mode 100644 new mode 100755 diff --git a/plugins/tps/shops/updates/builder_table_update_tps_shops_sales_2.php b/plugins/tps/shops/updates/builder_table_update_tps_shops_sales_2.php old mode 100644 new mode 100755 diff --git a/themes/berkarar/pages/sale.htm b/themes/berkarar/pages/sale.htm index 75aa7bf..2c8deeb 100755 --- a/themes/berkarar/pages/sale.htm +++ b/themes/berkarar/pages/sale.htm @@ -119,9 +119,17 @@ function onStart(){ -
- restaurant-photo -
+ {% if sale.images|length > 0%} +
+
+ {% for image in sale.images %} +
+ restaurant-photo +
+ {% endfor %} +
+
+ {% endif %} diff --git a/themes/berkarar/pages/shop.htm b/themes/berkarar/pages/shop.htm index 98a8f62..d20ccbc 100755 --- a/themes/berkarar/pages/shop.htm +++ b/themes/berkarar/pages/shop.htm @@ -115,9 +115,17 @@ function onStart(){ -
- restaurant-photo -
+ {% if shop.images|length > 0%} +
+
+ {% for image in shop.images %} +
+ restaurant-photo +
+ {% endfor %} +
+
+ {% endif %} {% if others|length > 0 %} diff --git a/themes/berkarar/partials/home/sales.htm b/themes/berkarar/partials/home/sales.htm index 92061ae..520cfe4 100755 --- a/themes/berkarar/partials/home/sales.htm +++ b/themes/berkarar/partials/home/sales.htm @@ -21,7 +21,7 @@ {% for sale in sales_all %}
- shop-photo + shop-photo
@@ -69,7 +69,7 @@ {% for sale in sales_news %}
- shop-photo + shop-photo
@@ -113,7 +113,7 @@ {% for sale in sales_discount %}
- shop-photo + shop-photo
@@ -157,7 +157,7 @@ {% for sale in sales_promo %}
- shop-photo + shop-photo