X-Git-Url: http://git.nikiroo.be/?p=fanfix.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Flibrary%2Fweb%2Ftemplates%2FWebLibraryServerTemplates.java;fp=src%2Fbe%2Fnikiroo%2Ffanfix%2Flibrary%2Fweb%2Ftemplates%2FWebLibraryServerTemplates.java;h=ba4deb83f290739407822fc4933802633fb5bf0e;hp=482a1b826e12514a0714cf5cd3256531851d4166;hb=8639c60de668b16a3aab1f673da58514c8430de9;hpb=0ab690692ea8b1a230346d7469902cc99452d90f diff --git a/src/be/nikiroo/fanfix/library/web/templates/WebLibraryServerTemplates.java b/src/be/nikiroo/fanfix/library/web/templates/WebLibraryServerTemplates.java index 482a1b8..ba4deb8 100644 --- a/src/be/nikiroo/fanfix/library/web/templates/WebLibraryServerTemplates.java +++ b/src/be/nikiroo/fanfix/library/web/templates/WebLibraryServerTemplates.java @@ -1,4 +1,166 @@ package be.nikiroo.fanfix.library.web.templates; +import java.util.List; + +import be.nikiroo.fanfix.Instance; +import be.nikiroo.fanfix.bundles.UiConfig; +import be.nikiroo.fanfix.library.Template; +import be.nikiroo.utils.Version; + public class WebLibraryServerTemplates { + static private WebLibraryServerTemplates instance = new WebLibraryServerTemplates(); + + static public WebLibraryServerTemplates getInstance() { + return instance; + } + + public Template bookline(String luid, String href, String title, + String author, boolean cached) { + + String cachedClass = "cached"; + String cachedValue = "◉"; + if (!cached) { + cachedClass = "uncached"; + cachedValue = "○"; + } + + return new Template(getClass(), "bookline.html") // + .set("href", href) // + .set("cachedClass", cachedClass) // + .set("cached", cachedValue) // + .set("luid", luid) // + .set("title", title) // + .set("author", author) // + ; + } + + public Template browser(String selectedValue, String filter, + List