diff options
Diffstat (limited to 'src/main/resources')
| -rw-r--r-- | src/main/resources/templates/benki/posts/postList.html | 138 | 
1 files changed, 71 insertions, 67 deletions
| diff --git a/src/main/resources/templates/benki/posts/postList.html b/src/main/resources/templates/benki/posts/postList.html index bc479f4..2911be4 100644 --- a/src/main/resources/templates/benki/posts/postList.html +++ b/src/main/resources/templates/benki/posts/postList.html @@ -1,4 +1,4 @@ -{@java.util.List<eu.mulk.mulkcms2.benki.posts.Post> posts} +{@java.util.List<eu.mulk.mulkcms2.benki.posts.Day> postDays}  {@java.lang.String pageTitle}  {@java.lang.Boolean showBookmarkForm}  {@java.lang.Boolean hasPreviousPage} @@ -52,72 +52,76 @@  </div>  <section id="main-content"> -  {#for post in posts} -    {#with post} -      {#if post.isBookmark} -        <article class="bookmark"> -          <header> -            <div class="bookmark-info"> -              <a class="post-link" href="/posts/{post.id}"> -                <time datetime="{date.htmlDateTime}">{date.humanDateTime}</time> -                <span class="bookmark-owner">{owner.firstName} {owner.lastName}</span> -              </a> -            </div> - -            <div class="bookmark-controls"> -              {#if showBookmarkForm} -              <button class="pure-button bookmark-edit-button">Edit</button> -              {/if} -            </div> -          </header> - -          <section class="bookmark-editor post-editor"> -            {#if showBookmarkForm} -            <elix-expandable-panel class="bookmark-editor-pane editor-pane"> -              <mlk-bookmark-submission-form edited-id="{post.id}"></mlk-bookmark-submission-form> -            </elix-expandable-panel> -            {/if} -          </section> - -          <section class="bookmark-title-section"> -            <a href="{uri}" class="bookmark-title"><h1 class="bookmark-title">⇢ {title}</h1></a> -          </section> - -          <section class="bookmark-description"> -            {descriptionHtml.raw} -          </section> -        </article> -      {#else} -        <article class="lazychat-message"> -          <header> -            <div class="lazychat-message-info"> -              <a class="post-link" href="/posts/{post.id}"> -                <time datetime="{date.htmlDateTime}">{date.humanDateTime}</time> -                <span class="lazychat-message-owner">{owner.firstName} {owner.lastName}</span> -              </a> -            </div> - -            <div class="lazychat-message-controls"> -              {#if showLazychatForm} -                <button class="pure-button lazychat-edit-button">Edit</button> -              {/if} -            </div> -          </header> - -          <section class="lazychat-editor post-editor"> -            {#if showLazychatForm} -              <elix-expandable-panel class="lazychat-editor-pane editor-pane"> -                <mlk-lazychat-submission-form edited-id="{post.id}"></mlk-lazychat-submission-form> -              </elix-expandable-panel> -            {/if} -          </section> - -          <section class="lazychat-message-content"> -            {contentHtml.raw} -          </section> -        </article> -      {/if} -    {/with} +  {#for day in postDays} +    <div class="post-day"> +      {#for post in day.posts} +        {#with post} +          {#if post.isBookmark} +            <article class="bookmark"> +              <header> +                <div class="bookmark-info"> +                  <a class="post-link" href="/posts/{post.id}"> +                    <time datetime="{date.htmlDateTime}">{date.humanDateTime}</time> +                    <span class="bookmark-owner">{owner.firstName} {owner.lastName}</span> +                  </a> +                </div> + +                <div class="bookmark-controls"> +                  {#if showBookmarkForm} +                  <button class="pure-button bookmark-edit-button">Edit</button> +                  {/if} +                </div> +              </header> + +              <section class="bookmark-editor post-editor"> +                {#if showBookmarkForm} +                <elix-expandable-panel class="bookmark-editor-pane editor-pane"> +                  <mlk-bookmark-submission-form edited-id="{post.id}"></mlk-bookmark-submission-form> +                </elix-expandable-panel> +                {/if} +              </section> + +              <section class="bookmark-title-section"> +                <a href="{uri}" class="bookmark-title"><h1 class="bookmark-title">⇢ {title}</h1></a> +              </section> + +              <section class="bookmark-description"> +                {descriptionHtml.raw} +              </section> +            </article> +          {#else} +            <article class="lazychat-message"> +              <header> +                <div class="lazychat-message-info"> +                  <a class="post-link" href="/posts/{post.id}"> +                    <time datetime="{date.htmlDateTime}">{date.humanDateTime}</time> +                    <span class="lazychat-message-owner">{owner.firstName} {owner.lastName}</span> +                  </a> +                </div> + +                <div class="lazychat-message-controls"> +                  {#if showLazychatForm} +                    <button class="pure-button lazychat-edit-button">Edit</button> +                  {/if} +                </div> +              </header> + +              <section class="lazychat-editor post-editor"> +                {#if showLazychatForm} +                  <elix-expandable-panel class="lazychat-editor-pane editor-pane"> +                    <mlk-lazychat-submission-form edited-id="{post.id}"></mlk-lazychat-submission-form> +                  </elix-expandable-panel> +                {/if} +              </section> + +              <section class="lazychat-message-content"> +                {contentHtml.raw} +              </section> +            </article> +          {/if} +        {/with} +      {/for} +    </div>    {/for}  </section> | 
