-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.html
More file actions
52 lines (49 loc) · 1.65 KB
/
admin.html
File metadata and controls
52 lines (49 loc) · 1.65 KB
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
{% set title = "Admin" %}
{% extends "template.html" %}
{% block container %}
<table class="table table-striped">
<thead>
<tr>
<th>#</th>
<th>Author</th>
<th>Date</th>
<th>Content</th>
<th>Ratings</th>
</tr>
</thead>
{% for content in contents %}
<tr>
<td>{{ loop.index }}</td>
<td>{{ content.author }}</td>
<td>{{ content.date }}</td>
<td><div style="max-height: 75px; overflow-y: auto;">{{ content.content|e }}</div></td>
<td>{{ counts[content.key.urlsafe()] }}</td>
</tr>
{% set outer = loop.index %}
{% for subcontent in subcontents[content.key.urlsafe()] %}
<tr>
<td>{{ outer }}.{{ loop.index }}</td>
<td>{{ subcontent.author }}</td>
<td>{{ subcontent.date }}</td>
<td><div style="max-height: 75px; overflow-y: auto;">{{ subcontent.content|e }}</div></td>
<td>{{ counts[subcontent.key.urlsafe()] }}</td>
</tr>
{% endfor %}
{% endfor %}
</table>
<form role="form" class="text-right" method="post">
<select class="form-control" name="parent">
<option value="">No parent</option>
{% for content in contents %}
<option value="{{ content.key.urlsafe() }}">
{{ loop.index }}. {{ content.date }}
{{ content.content }}
</option>
{% endfor %}
</select>
<textarea class="form-control" rows="3" name="content"></textarea><br />
<a href="/admin?dump" class="btn btn-primary pull-left">Dump everything</a>
<label><input type="checkbox" name="isYAML"> Process <a href="http://en.wikipedia.org/wiki/Yaml">YAML</a> content with template and items</label>
<button type="submit" class="btn btn-primary">Add</button>
</form>
{% endblock %}