Skip to content

Commit 3f46838

Browse files
committed
more html
1 parent 4e418c5 commit 3f46838

File tree

5 files changed

+148
-0
lines changed

5 files changed

+148
-0
lines changed

src/templates/admin.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{% extends "template.html" %}
2+
{% block title %}{{ title }}{% endblock %}
3+
4+
{% block content %}
5+
<h1>Admin Area</h1>
6+
7+
8+
<ul>
9+
{% for user in users %}
10+
<li><a href="{{ user }}">asdf</a></li>
11+
{% endfor %}
12+
</ul>
13+
14+
15+
{% endblock %}
16+
17+

src/templates/all.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{% extends "template.html" %}
2+
{% block title %}{{ title }}{% endblock %}
3+
4+
{% block content %}
5+
<h1>All users:</h1>
6+
7+
8+
<ul>
9+
{% for user in users %}
10+
<li><a href="/user/{{ user.nick }}">{{user.nick}}</a></li>
11+
{% endfor %}
12+
</ul>
13+
14+
15+
{% endblock %}
16+
17+

src/templates/me.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{% extends "template.html" %}
2+
{% block title %}List of all Users{% endblock %}
3+
4+
{% block content %}
5+
<h1>Thats you!</h1>
6+
7+
<ul>
8+
<li> {{user.nick}} </li>
9+
<li> {{user.email}} </li>
10+
<li> {{user.jid}} </li>
11+
</ul>
12+
13+
Change!!
14+
15+
{% endblock %}
16+
17+

src/templates/new.html

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{% extends "template.html" %}
2+
{% block title %}{{ title }}{% endblock %}
3+
4+
{% block scripthead %}
5+
<script type="text/javascript" src="/static/jquery-1.5.2.min.js"></script>
6+
<script type="text/javascript" src="/static/jquery.validate.min.js"></script>
7+
8+
<style type="text/css">
9+
* { font-family: Verdana; font-size: 96%; }
10+
label { width: 10em; float: left; }
11+
label.error { float: none; color: red; padding-left: .5em; vertical-align: top; }
12+
p { clear: both; }
13+
.submit { margin-left: 12em; }
14+
em { font-weight: bold; padding-right: 1em; vertical-align: top; }
15+
</style>
16+
17+
18+
<script>
19+
$(document).ready(function(){
20+
$("#newUserForm").validate();
21+
});
22+
23+
$("#newUserForm").validate({
24+
rules: {
25+
password: "required",
26+
password_again: {
27+
equalTo: "#password"
28+
}
29+
}
30+
});
31+
32+
</script>
33+
34+
{% endblock %}
35+
36+
{% block content %}
37+
<h1>Create new user</h1>
38+
39+
<form id="newUserForm" method="post" action="create">
40+
<fieldset>
41+
<legend>Create a new user </legend>
42+
<p>
43+
<label for="nick">Nickname</label>
44+
<em>*</em><input id="nick" name="nick" size="25" class="required" minlength="3" />
45+
</p>
46+
<p>
47+
<label for="fullname">Full name</label>
48+
<em>*</em><input id="fullname" name="fullname" size="25" class="required" minlength="5" />
49+
</p>
50+
<p>
51+
<label for="email">E-Mail</label>
52+
<em>*</em><input id="email" name="email" size="25" class="required email" />
53+
</p>
54+
<p>
55+
<label for="jid">Jabber ID</label>
56+
<em></em><input id="jid" name="jid" size="25" class="optional email" />
57+
</p>
58+
59+
<p>
60+
<label for="password">Your password</label>
61+
<em>*</em><input type="password" id="password" name="password" size="16" class="required" />
62+
</p>
63+
64+
<p>
65+
<label for="password_again">Again:</label>
66+
<em>*</em><input type="password" id="password_again" name="password_again" size="16" class="required" />
67+
</p>
68+
69+
<p>
70+
<input class="submit" type="submit" value="Submit"/>
71+
</p>
72+
</fieldset>
73+
</form>
74+
75+
76+
77+
{% endblock %}
78+
79+

src/templates/user.html

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{% extends "template.html" %}
2+
{% block title %}{{title}}{% endblock %}
3+
4+
{% block content %}
5+
<h1>Details for {{showuser.nick}}</h1>
6+
7+
{% if error is defined %}
8+
{{ error }}
9+
{% else %}
10+
<ul>
11+
<li> {{showuser.nick}} </li>
12+
<li> <a href="mailto:{{showuser.email}}">{{showuser.email}}</a> </li>
13+
<li> {{showuser.jid}} </li>
14+
</ul>
15+
{% endif %}
16+
{% endblock %}
17+
18+

0 commit comments

Comments
 (0)