summaryrefslogtreecommitdiff
path: root/src/main/resources/templates/benki/bookmarks/bookmarkList.html
blob: 9d4c70690c1c94d3f4aebb22416a6cb8c7334d85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{@java.util.List<eu.mulk.mulkcms2.benki.bookmarks.Bookmark> bookmarks}
{@java.lang.Boolean authenticated}

{#include base.html}

{#title}Benki Bookmarks{/title}
{#siteSection}Bookmarks{/siteSection}
{#bookmarksClass}this-page{/bookmarksClass}

{#head}{/head}

{#body}

{#if authenticated}
  <section id="bookmark-submission">
    <form class="pure-form pure-form-aligned" method="post">
      <fieldset>
        <legend>Submit Bookmark</legend>

        <div class="pure-control-group">
          <label for="title-input">Title:</label>
          <input name="title" id="title-input" type="text" placeholder="Title" required/>
        </div>

        <div class="pure-control-group">
          <label for="uri-input">URI:</label>
          <input name="uri" id="uri-input" type="text" placeholder="URI" required/>
        </div>

        <div class="pure-control-group">
          <label for="description-input">Description:</label>
          <textarea name="description" id="description-input" placeholder="Description"></textarea>
        </div>

        <div class="pure-control-group">
          <label for="visibility-input">Visibility:</label>
          <select id="visibility-input" name="visibility" required>
            <option value="public">Public</option>
            <option value="semiprivate" selected>Semiprivate</option>
            <option value="private">Private</option>
          </select>
        </div>

        <div class="pure-controls">
          <button type="submit" class="pure-button pure-button-primary">Submit Bookmark</button>
        </div>
      </fieldset>
    </form>
  </section>
{/if}

{#for bookmark in bookmarks}
  {#with bookmark}
    <article class="bookmark">
      <header>
        <a href="{uri}"><h1 class="bookmark-title">{title}</h1></a>
        <div class="bookmark-info">
          <time datetime="{date.htmlDateTime}">{date.humanDateTime}</time>
          <span class="bookmark-owner">{owner.firstName} {owner.lastName}</span>
        </div>
      </header>

      <section class="bookmark-description">
        {descriptionHtml.raw}
      </section>
    </article>
  {/with}
{/for}

{/body}

{/include}