X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FWebInterface.java;h=d8095804925c0270a273d5c39d1aa5c12d69494e;hb=9022be629f86cd0d85477c65dbd6a8085c48a4d7;hp=bd640bc94b83477d6db4c04c7967463c16381e7f;hpb=68f8e5e5c34fad6086af0c82d1dde64f67814297;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index bd640bc..d809580 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -56,6 +56,7 @@ import net.pterodactylus.util.logging.Logging; import net.pterodactylus.util.service.AbstractService; import net.pterodactylus.util.template.DateFilter; import net.pterodactylus.util.template.DefaultTemplateFactory; +import net.pterodactylus.util.template.MatchFilter; import net.pterodactylus.util.template.PaginationPlugin; import net.pterodactylus.util.template.ReflectionAccessor; import net.pterodactylus.util.template.Template; @@ -181,6 +182,7 @@ public class WebInterface extends AbstractService { templateFactory.addFilter("substring", new SubstringFilter()); templateFactory.addFilter("xml", new XmlFilter()); templateFactory.addFilter("change", new RequestChangeFilter()); + templateFactory.addFilter("match", new MatchFilter()); templateFactory.addPlugin("getpage", new GetPagePlugin()); templateFactory.addPlugin("paginate", new PaginationPlugin()); templateFactory.setTemplateProvider(new ClassPathTemplateProvider(templateFactory)); @@ -200,8 +202,8 @@ public class WebInterface extends AbstractService { Template blockSoneTemplate = templateFactory.createTemplate(createReader("/templates/blockSone.html")); Template unblockSoneTemplate = templateFactory.createTemplate(createReader("/templates/unblockSone.html")); Template viewPostTemplate = templateFactory.createTemplate(createReader("/templates/viewPost.html")); - Template likePostTemplate = templateFactory.createTemplate(createReader("/templates/likePost.html")); - Template unlikePostTemplate = templateFactory.createTemplate(createReader("/templates/unlikePost.html")); + Template likePostTemplate = templateFactory.createTemplate(createReader("/templates/like.html")); + Template unlikePostTemplate = templateFactory.createTemplate(createReader("/templates/unlike.html")); Template deletePostTemplate = templateFactory.createTemplate(createReader("/templates/deletePost.html")); Template deleteReplyTemplate = templateFactory.createTemplate(createReader("/templates/deleteReply.html")); Template followSoneTemplate = templateFactory.createTemplate(createReader("/templates/followSone.html")); @@ -224,8 +226,8 @@ public class WebInterface extends AbstractService { pageToadlets.add(pageToadletFactory.createPageToadlet(new BlockSonePage(blockSoneTemplate, this))); pageToadlets.add(pageToadletFactory.createPageToadlet(new UnblockSonePage(unblockSoneTemplate, this))); pageToadlets.add(pageToadletFactory.createPageToadlet(new ViewPostPage(viewPostTemplate, this))); - pageToadlets.add(pageToadletFactory.createPageToadlet(new LikePostPage(likePostTemplate, this))); - pageToadlets.add(pageToadletFactory.createPageToadlet(new UnlikePostPage(unlikePostTemplate, this))); + pageToadlets.add(pageToadletFactory.createPageToadlet(new LikePage(likePostTemplate, this))); + pageToadlets.add(pageToadletFactory.createPageToadlet(new UnlikePage(unlikePostTemplate, this))); pageToadlets.add(pageToadletFactory.createPageToadlet(new DeletePostPage(deletePostTemplate, this))); pageToadlets.add(pageToadletFactory.createPageToadlet(new DeleteReplyPage(deleteReplyTemplate, this))); pageToadlets.add(pageToadletFactory.createPageToadlet(new FollowSonePage(followSoneTemplate, this)));