From 49b01519bbfcd4219ce77ff9ef7497d4ab1458e0 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Mon, 5 Jul 2021 06:45:54 +0200 Subject: KB66 Use type-safe templates everywhere. Change-Id: I879e76e5bbaf91349f6df4637d9dc15291a3ada1 --- .../templates/benki/bookmarks/newBookmark.html | 5 +- .../resources/templates/benki/posts/postList.html | 138 ++++++++++----------- .../resources/templates/benki/wiki/wikiPage.html | 4 +- .../templates/benki/wiki/wikiPageRevisionList.html | 21 ++-- 4 files changed, 74 insertions(+), 94 deletions(-) (limited to 'src/main/resources/templates/benki') diff --git a/src/main/resources/templates/benki/bookmarks/newBookmark.html b/src/main/resources/templates/benki/bookmarks/newBookmark.html index d6a868c..bc469f5 100644 --- a/src/main/resources/templates/benki/bookmarks/newBookmark.html +++ b/src/main/resources/templates/benki/bookmarks/newBookmark.html @@ -1,5 +1,6 @@ -{@java.util.List bookmarks} -{@java.lang.Boolean authenticated} +{@java.lang.String uri} +{@java.lang.String title} +{@java.lang.String description} {#include base.html} diff --git a/src/main/resources/templates/benki/posts/postList.html b/src/main/resources/templates/benki/posts/postList.html index 7039d65..7198af1 100644 --- a/src/main/resources/templates/benki/posts/postList.html +++ b/src/main/resources/templates/benki/posts/postList.html @@ -1,13 +1,3 @@ -{@java.util.List.Day> postDays} -{@java.lang.String pageTitle} -{@java.lang.Boolean showBookmarkForm} -{@java.lang.Boolean hasPreviousPage} -{@java.lang.Boolean hasNextPage} -{@java.lang.Integer previousCursor} -{@java.lang.Integer nextCursor} -{@java.lang.Integer pageSize} -{@java.lang.String searchQuery} - {#include base.html} {#title}Benki {pageTitle}{/title} @@ -60,73 +50,71 @@ {#for post in day.posts} - {#with post} - {#if post.isBookmark} -
-
- {#if showBookmarkForm} - - - - {/if} -
- -
-
- {owner.firstName} - - # - - - -

🔖 {title}

. -
-
-
- -
- {#if showBookmarkForm} - - {/if} + {#if post.isBookmark} + - {#else} -
-
- {#if showLazychatForm} - - - - {/if} -
- -
-
- {owner.firstName} - - # - -
-
- -
- {#if showLazychatForm} - - {/if} + + +
+ {#if showBookmarkForm} + + {/if} +
+ +
+ {post.descriptionHtml.raw} +
+ +
+
+ {#else} +
+
+ {#if showLazychatForm} + + + + {/if} +
+ +
+
+ {post.owner.firstName} + + # +
- -
- {contentHtml.raw} -
-
- {/if} - {/with} + + +
+ {#if showLazychatForm} + + {/if} +
+ +
+ {post.descriptionHtml.raw} +
+
+ {/if} {/for} {/for} diff --git a/src/main/resources/templates/benki/wiki/wikiPage.html b/src/main/resources/templates/benki/wiki/wikiPage.html index 048c9b3..63d9950 100644 --- a/src/main/resources/templates/benki/wiki/wikiPage.html +++ b/src/main/resources/templates/benki/wiki/wikiPage.html @@ -1,5 +1,3 @@ -{@eu.mulk.mulkcms2.benki.wiki.WikiPageRevision page} - {#include base.html} {#title}{page.title} — Benki Wiki{/title} @@ -84,7 +82,7 @@
- {#with page}{enrichedContent.raw}{/} + {page.enrichedContent.raw}
diff --git a/src/main/resources/templates/benki/wiki/wikiPageRevisionList.html b/src/main/resources/templates/benki/wiki/wikiPageRevisionList.html index eacad4b..ca84fcb 100644 --- a/src/main/resources/templates/benki/wiki/wikiPageRevisionList.html +++ b/src/main/resources/templates/benki/wiki/wikiPageRevisionList.html @@ -1,6 +1,3 @@ -{@eu.mulk.mulkcms2.benki.wiki.WikiPage page} -{@java.lang.String title} - {#include base.html} {#title}Revisions — {title} — Benki Wiki{/title} @@ -25,17 +22,13 @@ - {#with page} - {#for revision in revisions} - - {#with revision} - {date.humanDateTime} - {title} - {author.firstName} - {/with} - - {/for} - {/with} + {#for revision in page.revisions} + + {revision.date.humanDateTime} + {revision.title} + {revision.author.firstName} + + {/for} -- cgit v1.2.3