X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FBookmarksPage.kt;h=abfe858a29dcf262496af35156cdfd957b1da725;hp=c021d0ac1980df5adf42a460e8db42568af6e62c;hb=110a933c2724aba6a604fc5eed6372ff1e1e6144;hpb=e3da46d8947ab8a542a156069b3b24c13fd011df diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/BookmarksPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/BookmarksPage.kt index c021d0a..abfe858 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/BookmarksPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/BookmarksPage.kt @@ -5,7 +5,6 @@ import net.pterodactylus.sone.main.* import net.pterodactylus.sone.utils.paginate import net.pterodactylus.sone.web.WebInterface import net.pterodactylus.sone.web.page.* -import net.pterodactylus.util.template.Template import net.pterodactylus.util.template.TemplateContext import javax.inject.Inject @@ -13,8 +12,9 @@ import javax.inject.Inject * Page that lets the user browse all his bookmarked posts. */ @MenuName("Bookmarks") -class BookmarksPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer) : - SoneTemplatePage("bookmarks.html", webInterface, loaders, template, templateRenderer, pageTitleKey = "Page.Bookmarks.Title") { +@TemplatePath("/templates/bookmarks.html") +class BookmarksPage @Inject constructor(webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer) : + SoneTemplatePage("bookmarks.html", webInterface, loaders, templateRenderer, pageTitleKey = "Page.Bookmarks.Title") { override fun handleRequest(soneRequest: SoneRequest, templateContext: TemplateContext) { soneRequest.core.bookmarkedPosts.let { posts ->