From e4476dcd3e059a2f4f20b784809e6774a6d4f937 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Thu, 17 Sep 2026 09:26:13 +0200 Subject: [PATCH] UI - Watch list - Dont show restock column if theres no restock on that pager/page --- .../templates/watch-overview-single-row.html | 2 +- .../watchlist/templates/watch-overview.html | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/changedetectionio/blueprint/watchlist/templates/watch-overview-single-row.html b/changedetectionio/blueprint/watchlist/templates/watch-overview-single-row.html index 4d7069d30..f73566686 100644 --- a/changedetectionio/blueprint/watchlist/templates/watch-overview-single-row.html +++ b/changedetectionio/blueprint/watchlist/templates/watch-overview-single-row.html @@ -109,7 +109,7 @@ {%- if any_has_restock_price_processor -%} - + {%- if watch['processor'] == 'restock_diff' -%} {#- @todo - this could be injected somehow watch.extra_row_info or something -#}
diff --git a/changedetectionio/blueprint/watchlist/templates/watch-overview.html b/changedetectionio/blueprint/watchlist/templates/watch-overview.html index b3db2725e..39eb422f3 100644 --- a/changedetectionio/blueprint/watchlist/templates/watch-overview.html +++ b/changedetectionio/blueprint/watchlist/templates/watch-overview.html @@ -339,7 +339,7 @@ window.watchOverviewI18n = { {{ _('Web page') }} {%- if any_has_restock_price_processor -%} - {{ _('Restock & Price') }} + {{ _('Restock & Price') }} {%- endif -%} {{ _('Checked') }}{{ _('Checked') }} {{ _('Changed') }}{{ _('Changed') }} @@ -353,12 +353,24 @@ window.watchOverviewI18n = { {%- endif -%} + {%- set ns = namespace(any_in_page_had_restock=false) -%} {%- for watch in (watches|sort(attribute=sort_attribute, reverse=sort_order == 'asc'))|pagination_slice(skip=pagination.skip) -%} {%- include "watch-overview-single-row.html" -%} + + {%- if watch['processor'] == 'restock_diff' -%} + {%- set ns.any_in_page_had_restock = true -%} + {%- endif -%} {%- endfor -%}
+ {%- if not ns.any_in_page_had_restock %} + + {%- endif %} {{ pagination.links }}