From: Michael Tremer Date: Thu, 14 Dec 2023 14:23:07 +0000 (+0000) Subject: blog: Drop unused post module X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2c2987c0ea8df5977956ca03fb711a9ff4b6e7f4;p=ipfire.org.git blog: Drop unused post module Signed-off-by: Michael Tremer --- diff --git a/Makefile.am b/Makefile.am index 3e42ad59..9bb0c43f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -166,8 +166,7 @@ templates_blog_messagesdir = $(templates_blogdir)/messages templates_blog_modules_DATA = \ src/templates/blog/modules/history-navigation.html \ - src/templates/blog/modules/list.html \ - src/templates/blog/modules/post.html + src/templates/blog/modules/list.html templates_blog_modulesdir = $(templates_blogdir)/modules diff --git a/src/templates/blog/modules/post.html b/src/templates/blog/modules/post.html deleted file mode 100644 index 41e4b4d9..00000000 --- a/src/templates/blog/modules/post.html +++ /dev/null @@ -1,78 +0,0 @@ -{% import ipfire.accounts as accounts %} - -
-
-

- - {{ post.title }} - -

- -

- {{ _("by") }} - - {% if isinstance(post.author, accounts.Account) %} - {{ post.author.name }}, - {% else %} - {{ post.author }}, - {% end %} - - {% if post.is_published() %} - {% if post.updated_at and post.updated_at > post.published_at %} - {{ locale.format_date(post.published_at, shorter=True, relative=False) }}, - {{ _("Updated %s") % locale.format_date(post.updated_at, shorter=True) }} - {% else %} - {{ locale.format_date(post.published_at, shorter=True, relative=False) }} - {% end %} - {% elif post.published_at %} - {{ _("Scheduled to be published %s") % locale.format_date(post.published_at, relative=False) }} - {% else %} - {{ _("Not published") }} - {% end %} -

-
- - {% if not post.is_published() and post.is_editable(current_user) %} - - {% end %} - -
- {% raw post.html %} -
- -
- {% if "lightningwirelabs.com" in post.tags and post.link %} - - Go to Lightning Wire Labs - - {% end %} - - {% if post.release %} - - {{ _("Download") }} - - {% end %} - - {% if post.release or "donate" in post.tags %} - - {{ _("Donate") }} - - {% end %} -
-
diff --git a/src/web/__init__.py b/src/web/__init__.py index f6422612..43fe0bef 100644 --- a/src/web/__init__.py +++ b/src/web/__init__.py @@ -66,7 +66,6 @@ class Application(tornado.web.Application): # Blog "BlogHistoryNavigation": blog.HistoryNavigationModule, "BlogList" : blog.ListModule, - "BlogPost" : blog.PostModule, # Boot "BootMenuConfig" : boot.MenuConfigModule, diff --git a/src/web/blog.py b/src/web/blog.py index 20d2d74d..710bc5fa 100644 --- a/src/web/blog.py +++ b/src/web/blog.py @@ -259,8 +259,3 @@ class ListModule(ui_modules.UIModule): def render(self, posts, relative=False, show_author=True): return self.render_string("blog/modules/list.html", posts=posts, relative=relative, show_author=show_author) - - -class PostModule(ui_modules.UIModule): - def render(self, post): - return self.render_string("blog/modules/post.html", post=post)