X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FCreateAlbumPage.kt;h=409fceac3b0b9ea0c66930086abefba1e132478f;hp=3ffd62202c6ea29cb836215fc00d03c3450557ad;hb=a76956e389fcfe6282ad4ca7156bbf76327bb0c0;hpb=e3da46d8947ab8a542a156069b3b24c13fd011df diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/CreateAlbumPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/CreateAlbumPage.kt index 3ffd622..409fcea 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/CreateAlbumPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/CreateAlbumPage.kt @@ -1,21 +1,21 @@ package net.pterodactylus.sone.web.pages -import net.pterodactylus.sone.data.Album.Modifier.AlbumTitleMustNotBeEmpty -import net.pterodactylus.sone.data.Sone +import net.pterodactylus.sone.data.* +import net.pterodactylus.sone.data.Album.Modifier.* import net.pterodactylus.sone.main.* -import net.pterodactylus.sone.text.TextFilter -import net.pterodactylus.sone.utils.isPOST -import net.pterodactylus.sone.web.WebInterface +import net.pterodactylus.sone.text.* +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 create a new album. */ -class CreateAlbumPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer): - LoggedInPage("createAlbum.html", template, "Page.CreateAlbum.Title", webInterface, loaders, templateRenderer) { +@TemplatePath("/templates/createAlbum.html") +class CreateAlbumPage @Inject constructor(webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer): + LoggedInPage("createAlbum.html", "Page.CreateAlbum.Title", webInterface, loaders, templateRenderer) { override fun handleRequest(soneRequest: SoneRequest, currentSone: Sone, templateContext: TemplateContext) { if (soneRequest.isPOST) {