From: David ‘Bombe’ Roden Date: Thu, 20 Jan 2011 11:38:55 +0000 (+0100) Subject: Add format filter to context factory. X-Git-Tag: 0.4.2^2~15 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=72b0e52ea1cce1e73aa1433a2b3fe9236523fe8c Add format filter to context factory. --- diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index dbba1dd..13c7157 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -95,6 +95,7 @@ import net.pterodactylus.util.notify.Notification; import net.pterodactylus.util.notify.NotificationManager; import net.pterodactylus.util.notify.TemplateNotification; import net.pterodactylus.util.template.DateFilter; +import net.pterodactylus.util.template.FormatFilter; import net.pterodactylus.util.template.HtmlFilter; import net.pterodactylus.util.template.MatchFilter; import net.pterodactylus.util.template.PaginationPlugin; @@ -199,6 +200,7 @@ public class WebInterface implements CoreListener { templateContextFactory.addFilter("js", new JavascriptFilter()); templateContextFactory.addFilter("parse", new ParserFilter(templateContextFactory)); templateContextFactory.addFilter("unknown", new UnknownDateFilter(getL10n(), "View.Sone.Text.UnknownDate")); + templateContextFactory.addFilter("format", new FormatFilter()); templateContextFactory.addPlugin("getpage", new GetPagePlugin()); templateContextFactory.addPlugin("paginate", new PaginationPlugin()); templateContextFactory.addProvider(Provider.TEMPLATE_CONTEXT_PROVIDER);