diff --git a/src/moin/templates/itemviews.html b/src/moin/templates/itemviews.html
index 6a57a4759..3d9f94ae1 100644
--- a/src/moin/templates/itemviews.html
+++ b/src/moin/templates/itemviews.html
@@ -7,13 +7,12 @@
Comment and Transclusion links may be hidden by Javascript if item lacks content.
#}
-{% set item = item %}
-{% set not_trash = not item_is_deleted if item_is_deleted is defined else True %}
-{% set icon_classes = theme_supp.get_endpoint_iconmap() %}
+{%- set item = item -%}
+{%- set not_trash = not item_is_deleted if item_is_deleted is defined else True -%}
+{%- set icon_classes = theme_supp.get_endpoint_iconmap() -%}
{%- macro a_label(icon_class, label) %}
-
- {{ label }}
+ {{ label }}
{%- endmacro %}
@@ -107,7 +106,7 @@
{%- endif %}
- {% if endpoint == 'special.transclusions' and not_trash -%}
+ {%- if endpoint == 'special.transclusions' and not_trash %}
@@ -120,11 +119,11 @@
{%- set supp_name = '%s/%s' % (fqname, sub_item_name) %}
{%- if not_trash and (storage.has_item(supp_name) or user.may.write(supp_name)) %}
{% set title = _('Discuss contents of this item') %}
-
{%- endif %}
{%- endif %}
{%- endfor %}
diff --git a/src/moin/templates/show.html b/src/moin/templates/show.html
index 5c48effd1..086e7bc98 100644
--- a/src/moin/templates/show.html
+++ b/src/moin/templates/show.html
@@ -2,7 +2,7 @@
{% import "utils.html" as utils with context %}
{% import "snippets.html" as snippets with context %}
-{% import "itemviews.html" as itemviews with context %}
+{% import theme("itemviews.html") as itemviews with context %}
{% set footer_meta = snippets.footer_meta() %}
diff --git a/src/moin/themes/focus/templates/itemviews.html b/src/moin/themes/focus/templates/itemviews.html
index 518f444d9..0c55fac14 100644
--- a/src/moin/themes/focus/templates/itemviews.html
+++ b/src/moin/themes/focus/templates/itemviews.html
@@ -17,146 +17,148 @@
{{ label }}
{%- endmacro %}
-
- {%- for endpoint, label, title, check_exists in cfg.item_views if not endpoint in cfg.endpoints_excluded %}
- {% set icon_class = icon_classes[endpoint] %}
- {%- if may.write and not_trash %}
- {%- if current_path.startswith("/+")
- and endpoint == 'frontend.show_item'
+
+
+ {%- for endpoint, label, title, check_exists in cfg.item_views if not endpoint in cfg.endpoints_excluded %}
+ {% set icon_class = icon_classes[endpoint] %}
+ {%- if may.write and not_trash %}
+ {%- if current_path.startswith("/+")
+ and endpoint == 'frontend.show_item'
+ %}
+
+ {%- for endpoint, label, title, check_exists in cfg.item_views if not endpoint in cfg.endpoints_excluded %}
+ {% set icon_class = icon_classes[endpoint] %}
+ {%- if may.write
+ and not_trash
+ and endpoint == 'frontend.modify_item'
+ and current_path.startswith("/+")
+ and not current_path.startswith("/+modify/")
%}
- {%- for endpoint, label, title, check_exists in cfg.item_views if not endpoint in cfg.endpoints_excluded %}
- {% set icon_class = icon_classes[endpoint] %}
- {%- if may.write
- and not_trash
- and endpoint == 'frontend.modify_item'
- and current_path.startswith("/+")
- and not current_path.startswith("/+modify/")
- %}
-
+ {%- endif %}
- {%- if endpoint in [
- 'frontend.convert_item',
- ] and may.write and item and theme_supp.is_markup_or_text(item.contenttype) and not_trash %}
-
- {%- endif %}
+ {%- if endpoint in [
+ 'frontend.convert_item',
+ ] and may.write and item and theme_supp.is_markup_or_text(item.contenttype) and not_trash %}
+
+ {%- endif %}
- {%- if endpoint == 'special.supplementation' and fqname %}
- {%- for sub_item_name in cfg.supplementation_item_names %}
- {%- set current_sub = item_name.rsplit('/', 1)[-1] %}
- {%- if not current_sub in cfg.supplementation_item_names %}
- {%- set supp_name = '%s/%s/%s' % (fqname.namespace, item_name, sub_item_name) %}
- {%- if not_trash and (storage.has_item(supp_name) or user.may.write(supp_name)) %}
- {% set title = _('Discuss contents of this item') %}
-
+ {%- if endpoint == 'special.supplementation' and fqname %}
+ {%- for sub_item_name in cfg.supplementation_item_names %}
+ {%- set current_sub = item_name.rsplit('/', 1)[-1] %}
+ {%- if not current_sub in cfg.supplementation_item_names %}
+ {%- set supp_name = '%s/%s/%s' % (fqname.namespace, item_name, sub_item_name) %}
+ {%- if not_trash and (storage.has_item(supp_name) or user.may.write(supp_name)) %}
+ {% set title = _('Discuss contents of this item') %}
+