Mikael's blog

A developers sixth time trying to maintain a blog

Source Code - Root / views / admin.mu
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{{>header}}
  <script>
  if (typeof(BlogPageMetaData) == 'undefined') {
    var BlogPageMetaData = {};
  }
  BlogPageMetaData.init = ['admin'];
  </script>
  <section class="admin">
    <section class="editor">
      <fieldset>
        <legend>Upload files</legend>
        <p>
          <input type="file" name="files-upload" id="files-upload" accept="image/*" multiple/>
        </p>
      </fieldset>
      <fieldset>
        <legend>Image previews</legend>
        <ul id="file-list">
          <li class="empty-list">No files uploaded.</li>
        </ul>
      </fieldset>
      <fieldset>
        <legend>Blog post</legend>
        <p>
          Title:<br/>
          <input type="text" name="title" id="title"/>
        </p>
        <p>
          Content:<br/>
          <textarea name="htmlContent" id="htmlContent"></textarea>
        </p>
        <p>
          Tags:<br/>
          <input type="text" name="tags" id="tags"/>
        </p>
        <p>
          Readable key:<br/>
          <input type="text" name="readableKey" id="readableKey"/>
        </p>
        <p>
          Author:<br/>
          <input type="text" name="author" id="author" value="{{{currentUser}}}"/>
        </p>
        <p>
          DateTime:<br/>
          <input type="text" name="dateTime" id="dateTime"/>
        </p>
        <p>
          Picture URL:<br/>
          <input type="text" name="pictureURL" id="pictureURL"/>
        </p>
        <p>
          Picture ALT Text:<br/>
          <input type="text" name="pictureAltText" id="pictureAltText"/>
        </p>
        <p>
          Picture Sub Text:<br/>
          <input type="text" name="pictureSubText" id="pictureSubText"/>
        </p>
        <p>
          <input type="checkbox" name="published" id="published" /> Published
        </p>
        <p>
          <input type="hidden" name="docId" id="docId" value="0" />
          <input type="submit" id="postbutton" value="Save blog post" />
        </p>
      </fieldset>
    </section>
  
    <section class="comments">
      <header>
        Drafts
      </header>
      <div class="draftlist">
        {{#drafts}}
        <div class="draft">
          <div class="draftdatetime">
            <a href="#" data-docid="{{docId}}">{{readableDateTime}}</a>
          </div>
          <div class="drafttitle">
            <a href="#" data-docid="{{docId}}">{{{title}}}</a>
          </div>
        </div>
        {{/drafts}}
        {{^drafts}}
        <section class="nocomments">
          There are no drafts at the moment.
        </section>
        {{/drafts}}
      </div>
    </section>
      
  </section>
{{>footer}}