package net.pterodactylus.sone.web.pages
+import net.pterodactylus.sone.main.*
import net.pterodactylus.sone.template.*
import net.pterodactylus.sone.utils.*
import net.pterodactylus.sone.web.*
/**
* This page lets the user view a post and all its replies.
*/
-class ViewPostPage @Inject constructor(template: Template, webInterface: WebInterface):
- SoneTemplatePage("viewPost.html", webInterface, template, "Page.ViewPost.Title") {
+@TemplatePath("/templates/viewPost.html")
+@ToadletPath("viewPost.html")
+class ViewPostPage @Inject constructor(webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer) :
+ SoneTemplatePage(webInterface, loaders, templateRenderer, pageTitleKey = "Page.ViewPost.Title") {
override fun handleRequest(soneRequest: SoneRequest, templateContext: TemplateContext) {
templateContext["post"] = soneRequest.parameters["post"]?.let(soneRequest.core::getPost)