X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FDeleteImagePage.kt;h=a9d601cb96e57894c884055c1ca53d6959797f5c;hb=03cec6a6772c2d836d94864adddaf544cbe9d72f;hp=11efd94f6184ac217668d34bc6299d2f48549e07;hpb=6a3f1fede0cda5cd6ed56204aa1dd37a19813cb9;p=Sone.git diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/DeleteImagePage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/DeleteImagePage.kt index 11efd94..a9d601c 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/DeleteImagePage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/DeleteImagePage.kt @@ -1,19 +1,20 @@ package net.pterodactylus.sone.web.pages -import net.pterodactylus.sone.data.Sone +import net.pterodactylus.sone.data.* import net.pterodactylus.sone.main.* -import net.pterodactylus.sone.utils.isPOST -import net.pterodactylus.sone.web.WebInterface +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 delete an {@link Image}. */ -class DeleteImagePage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders): - LoggedInPage("deleteImage.html", template, "Page.DeleteImage.Title", webInterface, loaders) { +@TemplatePath("/templates/deleteImage.html") +@ToadletPath("deleteImage.html") +class DeleteImagePage @Inject constructor(webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer) : + LoggedInPage("Page.DeleteImage.Title", webInterface, loaders, templateRenderer) { override fun handleRequest(soneRequest: SoneRequest, currentSone: Sone, templateContext: TemplateContext) { if (soneRequest.isPOST) {