summaryrefslogtreecommitdiff
path: root/admin/templates/index.html
blob: 87238d50f029f84e053f2106f7c65b4a69d7237d (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
<!DOCTYPE html>
<html>
<head>
<title>CCCMS Admin</title>
<meta charset="UTF-8">
{{ dropzone.load_css() }}
{{ dropzone.style('border: 2px dashed #0087F7; min-height: 3em;') }}
<script type=text/javascript src="static/cccms.js"></script>
<link rel="stylesheet" href="/static/style.css">
</head>
<body>
{{ dropzone.load_js() }}

<button onclick="toggle_hide('edit_update')">Neues Update</button>
<div class="hidden" id="edit_update">
    <form action="/admin/submit_page">
    <div><label for="page_title">Titel:</label><input type="text" id="page_title"/></div>
    <div><label for="page_slug">slug: updates/2020/</label><input type="text" id="page_slug"/></div>
    <div><label for="page_author">Author:</label><input type="text" id="page_author"/></div>
    <div><label for="page_date">Date:</label><input type="datetime-local" id="page_date"/></div>
    <div><label for="page_teaser">Teaser:</label><textarea name="page_teaser" id="page_teaser"></textarea></div>
    <div><label for="page_content">Content:</label><textarea name="page_content" id="page_content"></textarea></div>
    </form>
</div>

<button>Neue Page</button>
<button>Neues File</button>
<div class="droppy">{{ dropzone.create(action='/admin') }}</div>

<ul class="tree">
  {% for obj in tree recursive %}
    <li>
      {%- if obj.type_str == 'tree' -%}
        <div class="entry_title entry_node" title="{{ obj.id }}" onclick="toggle_hide('{{ obj.id }}')">{{ obj.name }}</div>
        <ul id="{{ obj.id }}" class="hidden">{{ loop(obj) }}</ul>
      {%- else -%}
        <div class="entry_title" title="{{ obj.id }}" onclick="load_object('{{ obj.id }}')">{{ obj.name }}</div>
      {%- endif %}
    </li>
  {% endfor %}
</ul>

{{ dropzone.config() }}
</body>
</html>