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=189b3eb3cd1d1c0aa099a62ada478a125d2041d2;hp=6f9f743cb4d023ef9bfa15ff48f370ca8cf663f6;hb=2e6be6f2fb6afede009dacc48b8e3318e30e5057;hpb=6a3f1fede0cda5cd6ed56204aa1dd37a19813cb9 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 6f9f743..189b3eb 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/ViewSonePage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/ViewSonePage.kt @@ -1,24 +1,21 @@ package net.pterodactylus.sone.web.pages -import net.pterodactylus.sone.data.Post -import net.pterodactylus.sone.data.PostReply +import net.pterodactylus.sone.data.* import net.pterodactylus.sone.main.* -import net.pterodactylus.sone.template.SoneAccessor -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.template.* +import net.pterodactylus.sone.utils.* +import net.pterodactylus.sone.web.* import net.pterodactylus.sone.web.page.* -import net.pterodactylus.util.template.Template -import net.pterodactylus.util.template.TemplateContext -import java.net.URI -import javax.inject.Inject +import net.pterodactylus.util.template.* +import java.net.* +import javax.inject.* /** * Lets the user browser another Sone. */ -class ViewSonePage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders): - SoneTemplatePage("viewSone.html", webInterface, loaders, template = template) { +@TemplatePath("/templates/viewSone.html") +class ViewSonePage @Inject constructor(webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer) : + SoneTemplatePage("viewSone.html", webInterface, loaders, templateRenderer) { override fun handleRequest(soneRequest: SoneRequest, templateContext: TemplateContext) { templateContext["soneId"] = soneRequest.parameters["sone"]