From 0439fcbbfb65ac101b39212e8f2e35f87b76dbc9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 30 Jul 2012 13:45:29 +0200 Subject: [PATCH] Add comparator for parties to the sort filter. --- .../java/net/pterodactylus/demoscenemusic/core/TemplateServlet.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/net/pterodactylus/demoscenemusic/core/TemplateServlet.java b/src/main/java/net/pterodactylus/demoscenemusic/core/TemplateServlet.java index 7b4f8c7..d004b9a 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/core/TemplateServlet.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/core/TemplateServlet.java @@ -38,6 +38,8 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import net.pterodactylus.demoscenemusic.data.Artist; +import net.pterodactylus.demoscenemusic.data.DefaultParty; +import net.pterodactylus.demoscenemusic.data.Party; import net.pterodactylus.demoscenemusic.data.Properties; import net.pterodactylus.demoscenemusic.data.Style; import net.pterodactylus.demoscenemusic.data.Track; @@ -119,6 +121,7 @@ public class TemplateServlet extends HttpServlet { } }); + sortFilter.addComparator(Party.class, DefaultParty.NAME_YEAR_COMPARATOR); templateContextFactory.addFilter("sort", sortFilter); templateContextFactory.addFilter("matches", new MatchFilter()); templateContextFactory.addFilter("time", new DurationFilter()); -- 2.7.4