From 4de795c080aa19f1e9d83f33989d3052583693c1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 1 Feb 2011 11:04:04 +0100 Subject: [PATCH] Add collection sort filter to template context factory. --- pom.xml | 2 +- src/main/java/net/pterodactylus/sone/web/WebInterface.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3546ccc..795c972 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ net.pterodactylus utils - 0.8 + 0.8.1-SNAPSHOT junit diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index cc5fd5b..f8394cb 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -94,6 +94,7 @@ import net.pterodactylus.util.logging.Logging; import net.pterodactylus.util.notify.Notification; import net.pterodactylus.util.notify.NotificationManager; import net.pterodactylus.util.notify.TemplateNotification; +import net.pterodactylus.util.template.CollectionSortFilter; import net.pterodactylus.util.template.DateFilter; import net.pterodactylus.util.template.FormatFilter; import net.pterodactylus.util.template.HtmlFilter; @@ -201,6 +202,7 @@ public class WebInterface implements CoreListener { templateContextFactory.addFilter("parse", new ParserFilter(getCore(), templateContextFactory)); templateContextFactory.addFilter("unknown", new UnknownDateFilter(getL10n(), "View.Sone.Text.UnknownDate")); templateContextFactory.addFilter("format", new FormatFilter()); + templateContextFactory.addFilter("sort", new CollectionSortFilter()); templateContextFactory.addPlugin("getpage", new GetPagePlugin()); templateContextFactory.addPlugin("paginate", new PaginationPlugin()); templateContextFactory.addProvider(Provider.TEMPLATE_CONTEXT_PROVIDER); -- 2.7.4