From 76024c0e12462eeba4d27ef970ac74be65100383 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Mon, 25 Oct 2021 23:21:55 +0200 Subject: [PATCH] macros.htm: Extracted macro media_table from media_list.htm --- server/templates/macros.htm | 23 +++++++++++++++++++++++ server/templates/media_list.htm | 21 +-------------------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/server/templates/macros.htm b/server/templates/macros.htm index 4aa787f..2e1c546 100644 --- a/server/templates/macros.htm +++ b/server/templates/macros.htm @@ -96,3 +96,26 @@ {{ link_entry_content(link) }} {%- endmacro %} + +{% macro media_table(media_list) %} + + + + + + + + {% for media in media_list %} + + + + + + + {% endfor %} +
DateTo WatchActionsTitle
{{ media.release_date.strftime("%d.%m.%Y") }} + {{ media.left_length | timedelta }} + + {{ media_element_buttons(media) }} + {{ media.title }}
+{%- endmacro %} diff --git a/server/templates/media_list.htm b/server/templates/media_list.htm index 53e1b83..3279af6 100644 --- a/server/templates/media_list.htm +++ b/server/templates/media_list.htm @@ -9,25 +9,6 @@

{{ title }}

- - - - - - - - {% for media in media_list %} - - - - - - - {% endfor %} -
DateTo WatchActionsTitle
{{ media.release_date.strftime("%d.%m.%Y") }} - {{ media.left_length | timedelta }} - - {{ macros.media_element_buttons(media) }} - {{ media.title }}
+ {{ macros.media_table(media_list) }}