X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FNewPage.kt;h=149f5eaa5e338b9c3e5d2ee3235eae78f96f6e91;hb=bce70170ce5ddaa142e67fcc67985215e1eadac2;hp=8b4218d2459105b8646377d622f3f2305aaafd92;hpb=cd72add62ab407336b471d4b7cda8e33dd2df5c6;p=Sone.git diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/NewPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/NewPage.kt index 8b4218d..149f5ea 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/NewPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/NewPage.kt @@ -1,5 +1,6 @@ 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 @@ -13,8 +14,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(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer): + SoneTemplatePage("new.html", webInterface, loaders, template, templateRenderer, pageTitleKey = "Page.New.Title") { override fun handleRequest(soneRequest: SoneRequest, templateContext: TemplateContext) = getCurrentSone(soneRequest.toadletContext).let { currentSone ->