From 82de91353503c9db2b9721dab242b2aafc57278c Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 31 Jul 2012 07:12:03 +0200 Subject: [PATCH] Add group comparator to 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 d004b9a..0eb9e3e 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/core/TemplateServlet.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/core/TemplateServlet.java @@ -38,7 +38,9 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import net.pterodactylus.demoscenemusic.data.Artist; +import net.pterodactylus.demoscenemusic.data.DefaultGroup; import net.pterodactylus.demoscenemusic.data.DefaultParty; +import net.pterodactylus.demoscenemusic.data.Group; import net.pterodactylus.demoscenemusic.data.Party; import net.pterodactylus.demoscenemusic.data.Properties; import net.pterodactylus.demoscenemusic.data.Style; @@ -122,6 +124,7 @@ public class TemplateServlet extends HttpServlet { }); sortFilter.addComparator(Party.class, DefaultParty.NAME_YEAR_COMPARATOR); + sortFilter.addComparator(Group.class, DefaultGroup.NAME_COMPARATOR); templateContextFactory.addFilter("sort", sortFilter); templateContextFactory.addFilter("matches", new MatchFilter()); templateContextFactory.addFilter("time", new DurationFilter()); -- 2.7.4