From 966ba2b155a1646d67ac8a8d1f3ec0527a268fb2 Mon Sep 17 00:00:00 2001 From: Werner Hahn Date: Mon, 25 Sep 2017 16:03:48 +0200 Subject: [PATCH] WebshopApi: templates --- .../webpages/shop_order/_transfer_status.html | 2 -- templates/webpages/shop_order/list.html | 4 +-- templates/webpages/shop_order/show.html | 27 +++++++++---------- templates/webpages/shop_part/_filter.html | 4 +-- .../webpages/shop_part/_list_articles.html | 2 -- .../webpages/shop_part/_list_images.html | 14 +++++----- .../webpages/shop_part/_transfer_status.html | 10 +++---- .../webpages/shop_part/_upload_status.html | 8 +++--- templates/webpages/shop_part/categories.html | 9 +------ templates/webpages/shop_part/edit.html | 8 ------ templates/webpages/shops/form.html | 2 -- .../webpages/shops/test_shop_connection.html | 2 +- 12 files changed, 31 insertions(+), 61 deletions(-) diff --git a/templates/webpages/shop_order/_transfer_status.html b/templates/webpages/shop_order/_transfer_status.html index 26b8c822b..24b7bf97d 100644 --- a/templates/webpages/shop_order/_transfer_status.html +++ b/templates/webpages/shop_order/_transfer_status.html @@ -1,8 +1,6 @@ [%- USE LxERP -%][%- USE L -%][%- USE HTML -%] -[%- USE Dumper -%] [% SET data = job.data_as_hash %] -

[% LxERP.t8("Watch status") %]

[% L.hidden_tag('', job.id, id="smt_job_id") %] diff --git a/templates/webpages/shop_order/list.html b/templates/webpages/shop_order/list.html index 1da0b17fa..f30644c96 100644 --- a/templates/webpages/shop_order/list.html +++ b/templates/webpages/shop_order/list.html @@ -1,9 +1,8 @@ [%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE T8 -%] -[% USE Dumper %] [% L.stylesheet_tag('webshop') %] [%- INCLUDE 'common/flash.html' %] -

[% title %][% 'Number data sets' | $T8 %]: [% SHOPORDERS.size %]

+

[% title %][% 'Number of data sets' | $T8 %]: [% SHOPORDERS.size %]

[%- PROCESS 'shop_order/_filter.html' filter=SELF.models.filtered.laundered %]
@@ -147,7 +146,6 @@
[% FOREACH shop_order = SHOPORDERS %] - [% # Dumper.dump_html(shop_order) %] [% IF shop_order.kivi_customer.id && shop_order.kivi_customer.order_lock == 0 && shop_order.open_invoices == 0 %] [% SET transferable = 1 %] [% SET transferable_class = 'class="shop_transferable"' %] [% ELSE %] [% SET transferable = 0 %] [% SET transferable_class = '' %][% END %] [% HTML.escape(shop_order.shop.description) %] diff --git a/templates/webpages/shop_order/show.html b/templates/webpages/shop_order/show.html index e9c22e5ee..a4f2c7a10 100644 --- a/templates/webpages/shop_order/show.html +++ b/templates/webpages/shop_order/show.html @@ -176,22 +176,20 @@
- - - - - - + + + + + + - [% FOREACH pos = IMPORT.shop_order_items %] - - - - - - [% SET extended = pos.price * pos.quantity %] - + + + + + + [% END %]
[% 'Position' | $T8 %][% 'Partnumber' | $T8 %][% 'Part Description' | $T8 %][% 'Qty' | $T8 %][% 'Price' | $T8 %][% 'Extended' | $T8 %][% 'Position' | $T8 %][% 'Partnumber' | $T8 %][% 'Partdescriptipion' | $T8 %][% 'Qty' | $T8 %][% 'Price' | $T8 %][% 'Extended' | $T8 %]
[% count() %][% HTML.escape(pos.partnumber) %][% HTML.escape(pos.description) %][% pos.quantity_as_number%][% pos.price_as_number%][% LxERP.format_amount(extended,2) %][% loop.index %][% HTML.escape(pos.partnumber) %][% HTML.escape(pos.description) %][% pos.quantity_as_number %][% pos.price_as_number %][% LxERP.format_amount(pos.price * pos.quantity,2) %]
@@ -205,4 +203,3 @@ $("input[type=radio]").change(function(){ $('#transfer').css("display", 'block'); }); -[% # L.dump(IMPORT) %] diff --git a/templates/webpages/shop_part/_filter.html b/templates/webpages/shop_part/_filter.html index 3e49a0e90..add0f6bfa 100644 --- a/templates/webpages/shop_part/_filter.html +++ b/templates/webpages/shop_part/_filter.html @@ -5,16 +5,14 @@ [% L.hidden_tag('filter.shop.obsolete', 0) %] - - -
[% 'Shop' | $T8 %] [% L.select_tag('filter.shop_id:eq_ignore_empty', SELF.shops, value_key = 'value', title_key = 'title', default=0) %]
[% 'Part marked as "Shop article"' %] + [% 'Part marked as "Shop part"' %] [% L.yes_no_tag('filter.part.shop', FORM.filter.part.shop, default='1', with_empty=1, empty_title='---') %]

diff --git a/templates/webpages/shop_part/_list_articles.html b/templates/webpages/shop_part/_list_articles.html index 244fb767b..34d404585 100644 --- a/templates/webpages/shop_part/_list_articles.html +++ b/templates/webpages/shop_part/_list_articles.html @@ -1,6 +1,4 @@ [%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE T8 -%] -[% USE Dumper %] -

[% title %]

[%- PROCESS 'shop_part/_filter.html' filter=SELF.models.filtered.laundered %] diff --git a/templates/webpages/shop_part/_list_images.html b/templates/webpages/shop_part/_list_images.html index 6c811b346..2fa6e8827 100644 --- a/templates/webpages/shop_part/_list_images.html +++ b/templates/webpages/shop_part/_list_images.html @@ -1,27 +1,25 @@ [%- USE HTML %][%- USE L -%][%- USE P -%][%- USE LxERP -%] [%- USE T8 %][% USE Base64 %] -[%- USE Dumper %] - - - + + + - + [%- FOREACH img = IMAGES %] - [% # Dumper.dump_html(img) %] - + - + diff --git a/templates/webpages/shop_part/_transfer_status.html b/templates/webpages/shop_part/_transfer_status.html index bbee02b81..ded2ba7ad 100644 --- a/templates/webpages/shop_part/_transfer_status.html +++ b/templates/webpages/shop_part/_transfer_status.html @@ -1,5 +1,5 @@ [%- USE LxERP -%][%- USE L -%][%- USE HTML -%] -[%- USE Dumper -%] + [% SET data = job.data_as_hash %]

[% LxERP.t8("Watch status") %]

@@ -24,7 +24,7 @@ JOBID: [% job.id %]

- + @@ -35,9 +35,9 @@ JOBID: [% job.id %]

–

[%- LxERP.t8('reorder item') %] [% 'Title' | $T8 %][% 'Description' | $T8 %][% 'Filename' | $T8 %][% 'Title' | $T8 %][% 'Description' | $T8 %][% 'Filename' | $T8 %] [% 'Orig. Size w/h' | $T8 %][% 'Action' | $T8 %][% 'Action' | $T8 %]
[%- LxERP.t8('reorder item') %] [%  img.file.title %][% HTML.escape(img.file.title) %][% HTML.escape(img.file.title) %] [% HTML.escape(img.file.description) %][% HTML.escape(img.file.file_name) %][% HTML.escape(img.file.file_name) %] [% HTML.escape(img.org_file_width) _ ' x ' _ HTML.escape(img.org_file_height) %] [% L.button_tag("kivi.File.delete_file(" _ img.file_id _ ", 'ShopPart/ajax_delete_file')", LxERP.t8('Delete'), confirm=LxERP.t8("Are you sure?")) %]
[% LxERP.t8("Number of data uploaded:") %][% LxERP.t8("Number of data sets uploaded:") %] [% IF data.status > 0 %][% HTML.escape(data.num_uploaded) %] / [% HTML.escape(data.record_ids.size) %][% ELSE %]–[% END %]
- - - + + + [% FOREACH message = data.conversion %] diff --git a/templates/webpages/shop_part/_upload_status.html b/templates/webpages/shop_part/_upload_status.html index e7285a24a..2209a20a0 100644 --- a/templates/webpages/shop_part/_upload_status.html +++ b/templates/webpages/shop_part/_upload_status.html @@ -34,15 +34,15 @@ JOBID: [% job.id %]

–

[% LxERP.t8("Part") %][% LxERP.t8("Partnumber") %][% LxERP.t8("Message") %][% LxERP.t8("Part") %] [% LxERP.t8("Partnumber") %] [% LxERP.t8("Message") %]
- + - + [% FOREACH message = data.conversion %] - - + + [% END %] diff --git a/templates/webpages/shop_part/categories.html b/templates/webpages/shop_part/categories.html index 80676eb9b..43b73886f 100644 --- a/templates/webpages/shop_part/categories.html +++ b/templates/webpages/shop_part/categories.html @@ -3,14 +3,9 @@ [%- USE L -%] [%- USE P -%] [%- USE LxERP -%] -[%- USE Dumper -%] [% LxERP.t8("Part") %]: [% HTML.escape(SELF.shop_part.part.displayable_name) %]
-[% LxERP.t8("Shop") %]: [% HTML.escape(SELF.shop_part.shop.description) %] -
-[% # Dumper.dump_html(SELF.shop_part.shop_category) %] -
-[% # Dumper.dump_html(CATEGORIES) %] +[% LxERP.t8("Shop") %]: [% HTML.escape(SELF.shop_part.shop.description) %]
[% BLOCK recurse %] @@ -21,7 +16,6 @@ [% checked = '' %] [% # path = path _ obj.name %] [% # test = path.split('\|') %] - [% # Dumper.dump_html(SELF.shop_part.shop_category) %] [% IF SELF.shop_part.shop_category.1.grep(obj.name).size %] [% checked = 'checked' %] [% ELSE %] @@ -52,4 +46,3 @@ [% L.button_tag("kivi.ShopPart.save_categories(" _ SELF.shop_part.id _", " _ SELF.shop_part.shop.id _")", LxERP.t8("Save")) %] - diff --git a/templates/webpages/shop_part/edit.html b/templates/webpages/shop_part/edit.html index 418a632da..5536ad715 100644 --- a/templates/webpages/shop_part/edit.html +++ b/templates/webpages/shop_part/edit.html @@ -3,13 +3,11 @@ [%- USE L -%] [%- USE P -%] [%- USE LxERP -%] -[%- USE Dumper -%]

[% LxERP.t8("Part") %]: [% HTML.escape(SELF.shop_part.part.displayable_name) %]
[% LxERP.t8("Shop") %]: [% HTML.escape(SELF.shop_part.shop.description) %]

-[% # Dumper.dump_html(SELF) %]

[% IF SELF.shop_part.id %] @@ -55,7 +53,6 @@
[% LxERP.t8("Part") %][% LxERP.t8("Part") %] [% LxERP.t8("Partnumber") %][% LxERP.t8("Message") %][% LxERP.t8("Message") %]
[% HTML.escape(message.id) %][% HTML.escape(message.number) %][% HTML.escape(message.id) %][% HTML.escape(message.number) %] [% HTML.escape(message.message) %]
[% L.textarea_tag("shop_part.metatag_description", SELF.shop_part.metatag_description, rows=4) %]
- [% # L.dump(SELF.shop_part) %] [% IF SELF.shop_part.id %] [% L.button_tag("kivi.ShopPart.save_shop_part(" _ SELF.shop_part.id _ ")", LxERP.t8("Save")) %] @@ -71,11 +68,6 @@
- - [%- IF SELF.shop_part.part.image && INSTANCE_CONF.get_parts_show_image %] [%- END %] - -[% # SELF.shop_part.shop_description %] -[% # L.dump(SELF.shop_part) %] diff --git a/templates/webpages/shops/form.html b/templates/webpages/shops/form.html index b904a4d83..280c61b09 100644 --- a/templates/webpages/shops/form.html +++ b/templates/webpages/shops/form.html @@ -1,11 +1,9 @@ [%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE P -%][%- USE T8 -%] -[%- USE Dumper -%] [% SET style="width: 400px" %] [% SET size=34 %]

[% HTML.escape(title) %]

-[% #Dumper.dump_html(SELF.shop) %]
[%- INCLUDE 'common/flash.html' %] diff --git a/templates/webpages/shops/test_shop_connection.html b/templates/webpages/shops/test_shop_connection.html index d9ff48254..f7033a63d 100644 --- a/templates/webpages/shops/test_shop_connection.html +++ b/templates/webpages/shops/test_shop_connection.html @@ -1,7 +1,7 @@ [%- USE HTML %][%- USE LxERP -%][%- USE L -%] [%- IF ok %] -

[% LxERP.t8('The connection was to the shop established successfully.') %]

+

[% LxERP.t8('The connection to the shop was established successfully.') %]

[% LxERP.t8('Version: ')%][% HTML.escape(version) %]

[%- ELSE %] -- 2.20.1