/
default.htm
executable file
·104 lines (89 loc) · 3.96 KB
/
default.htm
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
95
96
97
98
99
100
101
102
103
104
{% extends "_base.htm" %}
{% block bodycontent %}
{% if authorize %}
<span id="authorized_controls">
<a class="hidden" href="edit/{{ CP.url }}">edit page</a> |
<a class="hidden" href="create">create page</a> |
<a class="hidden" href="logout">logout</a>
</span>
{% endif %}
<div class="block" id="block-L2-menu"><ul>
{% for p2 in L2 %}
{% if p2.reference.key == CP.key or CP.key == p2.key or CP.reference.key == p2.reference.key or CP.reference.key == p2.key or CP.reference.reference.key == p2.reference.key %}
<li>
<span {% if p2.hidden %}class="hidden"{% endif %}>
{% if CP.key == p2.key %}
<span id="selected">{{ p2.title }}</span>
{% else %}
{% if p2.content == '' %}
{{ p2.title }}
{% if authorize %}
<a href="{{ p2.url }}">➨</a>
{% endif %}
{% else %}
<a href="{{ p2.url }}">{{ p2.title }}</a>{% endif %}
{% endif %}
</span>
</li>
{% for p3 in L3 %}
{% if p3.reference.key == p2.key or CP.reference.key == p2.key and p3.reference.key == p2.key or CP.key == p3.reference.key and p2.key == p3.reference.key %}
<ul>
<li>
<span {% if p3.hidden %}class="hidden"{% endif %}>
{% if CP.key == p3.key %}
<span id="selected">{{ p3.title }}</span>
{% else %}
{% if p3.content == '' %}
{{ p3.title }}
{% if authorize %}
<a href="{{ p3.url }}">➨</a>
{% endif %}
{% else %}
<a href="{{ p3.url }}">{{ p3.title }}</a>{% endif %}
{% endif %}
</span>
</li>
</ul>
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
</ul></div>
<hr/>
{% block content %}
<div class="block" id="block-content">
<!--{# if CP.key == L0.key #}!!!{# else #}<h2>{{ CP.title }}</h2>{# endif #}-->
{% load custom_tags %}
{% if CP.markup == 'markdown' %}
{{ CP.content|fix_ampersands|custom_markdown|custom_youtube }}
{% else %}
{{ CP.content|fix_ampersands|custom_youtube }}
{% endif %}
{# CP.content|fix_ampersands|custom_youtube|custom_googledocs #}
</div>
{% endblock %}
{% if CP.allow_comments %}
<hr/>
<div class="block" id="block-comments">
<h2>Comments ({{ CP.number_of_comments }})</h2>
{% for c in COMM %}
{% ifequal CP.key c.reference.key %}
<span id="user">{{ c.user|escape }}</span>
<span id="date">
<!--[{{ c.created|date:"H:i - j.m.Y" }}]-->
posted {{ c.created|timesince }} ago:
</span>
{% if c.registered %}<div id="comment-registered">{% else %}<div id="comment">{% endif %}
<pre>{{ c.content }}</pre></div>
<br/>
{% endifequal %}
{% endfor %}
<form id="comment-form" method="get" action="/post-comment/{{ CP.url }}">
<input onClick="if (this.value=='Your name...'){this.value=''}" id="user-name-input" type="text" name="user" value="{% if authorize %}Vladimir Keleshev{% else %}Your name...{% endif %}"/>
<input id="post-comment" type="submit" value="JavaScript should be ON to post" disabled="disabled"/> <br/>
<textarea name="content" rows="4" cols="50"></textarea><br/>
<br/>
</form>
</div>
{% endif %}
{% endblock %}