X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FViewSonePage.kt;h=b1d36c58abd9485492aa763db61cb414cb7b0ca3;hp=fd911ee4d3e9f439d95a53c3a2169dddb90d7b39;hb=bce70170ce5ddaa142e67fcc67985215e1eadac2;hpb=cd72add62ab407336b471d4b7cda8e33dd2df5c6 diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/ViewSonePage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/ViewSonePage.kt index fd911ee..b1d36c5 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/ViewSonePage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/ViewSonePage.kt @@ -2,6 +2,7 @@ package net.pterodactylus.sone.web.pages import net.pterodactylus.sone.data.Post import net.pterodactylus.sone.data.PostReply +import net.pterodactylus.sone.main.* import net.pterodactylus.sone.template.SoneAccessor import net.pterodactylus.sone.utils.mapPresent import net.pterodactylus.sone.utils.paginate @@ -16,8 +17,9 @@ import javax.inject.Inject /** * Lets the user browser another Sone. */ -class ViewSonePage @Inject constructor(template: Template, webInterface: WebInterface): - SoneTemplatePage("viewSone.html", webInterface, template) { +@TemplatePath("/templates/viewSone.html") +class ViewSonePage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer): + SoneTemplatePage("viewSone.html", webInterface, loaders, template, templateRenderer) { override fun handleRequest(soneRequest: SoneRequest, templateContext: TemplateContext) { templateContext["soneId"] = soneRequest.parameters["sone"]