🔥 Remove templates from FreenetTemplatePages
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / web / pages / NewPage.kt
index 8b4218d..e00189a 100644 (file)
@@ -1,11 +1,11 @@
 package net.pterodactylus.sone.web.pages
 
+import net.pterodactylus.sone.main.*
 import net.pterodactylus.sone.utils.mapPresent
 import net.pterodactylus.sone.utils.paginate
 import net.pterodactylus.sone.utils.parameters
 import net.pterodactylus.sone.web.WebInterface
 import net.pterodactylus.sone.web.page.*
-import net.pterodactylus.util.template.Template
 import net.pterodactylus.util.template.TemplateContext
 import javax.inject.Inject
 
@@ -13,8 +13,10 @@ import javax.inject.Inject
  * Page that displays all new posts and replies. The posts are filtered using
  * [PostVisibilityFilter.isPostVisible(Sone, Post)] and sorted by time.
  */
-class NewPage @Inject constructor(  template: Template, webInterface: WebInterface):
-               SoneTemplatePage("new.html", webInterface, template, "Page.New.Title") {
+@MenuName("New")
+@TemplatePath("/templates/new.html")
+class NewPage @Inject constructor(webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
+               SoneTemplatePage("new.html", webInterface, loaders, templateRenderer, pageTitleKey = "Page.New.Title") {
 
        override fun handleRequest(soneRequest: SoneRequest, templateContext: TemplateContext) =
                        getCurrentSone(soneRequest.toadletContext).let { currentSone ->