*/
class LinkedElementRenderFilter @Inject constructor(private val templateContextFactory: TemplateContextFactory): Filter {
- companion object {
- private val loadedImageTemplate = """<%include linked/image.html>""".asTemplate()
- private val loadedHtmlPageTemplate = """<%include linked/html-page.html>""".asTemplate()
- private val notLoadedImageTemplate = """<%include linked/notLoaded.html>""".asTemplate()
- }
-
override fun format(templateContext: TemplateContext?, data: Any?, parameters: Map<String, Any?>?) =
when {
data is LinkedElement && data.loading -> renderNotLoadedLinkedElement(data)
}.toString()
}
+
+private val loadedImageTemplate = """<%include linked/image.html>""".asTemplate()
+private val loadedHtmlPageTemplate = """<%include linked/html-page.html>""".asTemplate()
+private val notLoadedImageTemplate = """<%include linked/notLoaded.html>""".asTemplate()