X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FRescuePage.kt;h=af69a122e36ef2cac1581bb4c0c4930e95d5c5bc;hp=0479133694de5115d993ac8c1b24c872abf623eb;hb=2e6be6f2fb6afede009dacc48b8e3318e30e5057;hpb=fe0689ea60c46a0d62e9598adf7fd25c0182fa7b diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/RescuePage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/RescuePage.kt index 0479133..af69a12 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/RescuePage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/RescuePage.kt @@ -1,20 +1,20 @@ package net.pterodactylus.sone.web.pages -import net.pterodactylus.sone.data.Sone -import net.pterodactylus.sone.utils.isPOST -import net.pterodactylus.sone.utils.parameters -import net.pterodactylus.sone.web.WebInterface +import net.pterodactylus.sone.data.* +import net.pterodactylus.sone.main.* +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 javax.inject.Inject +import net.pterodactylus.util.template.* +import javax.inject.* /** * Page that lets the user control the rescue mode for a Sone. */ @MenuName("Rescue") -class RescuePage @Inject constructor(template: Template, webInterface: WebInterface): - LoggedInPage("rescue.html", template, "Page.Rescue.Title", webInterface) { +@TemplatePath("/templates/rescue.html") +class RescuePage @Inject constructor(webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer) : + LoggedInPage("rescue.html", "Page.Rescue.Title", webInterface, loaders, templateRenderer) { override fun handleRequest(soneRequest: SoneRequest, currentSone: Sone, templateContext: TemplateContext) { val soneRescuer = soneRequest.core.getSoneRescuer(currentSone)