1
0
Fork 0

* infrastructure for authkit

* menu generation code
* improved templates
* database and basic role setup in websetup.py
This commit is contained in:
Jan Dittberner 2008-06-05 16:24:43 +00:00
parent 096df406b8
commit 55124e861f
20 changed files with 431 additions and 68 deletions

View file

@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
<%inherit file="site.mako" />
<h1>Login</h1>
${h.form(h.url(action='login'), method='post')}
User name: ${h.text_field('username')}
Password: ${h.password_field('password')}
${h.submit('Login')}
${h.end_form()}
<%def name="headlines()">
<title>Login</title>
</%def>

View file

@ -1,4 +1,6 @@
# -*- coding: utf-8 -*-
<%inherit file="site.mako" />
<h1>Main page</h1>
<%def name="title()">Main page</%def>
<%def name="headlines()">
<title>Main page</title>
</%def>

View file

@ -0,0 +1,6 @@
# -*- coding: utf-8 -*-
<%inherit file="site.mako" />
<h1>Menu editor</h1>
<%def name="headlines()">
<title>Menu editor</title>
</%def>

View file

@ -1,8 +1,9 @@
# -*- coding: utf-8 -*-
<html>
<head>
<title>${self.title()}</title>
${self.headlines()}
${h.javascript_include_tag('jquery.js')}
${h.stylesheet_link_tag('gva.css')}
</head>
<body>
<ul id="menu">
@ -10,9 +11,25 @@ ${h.javascript_include_tag('jquery.js')}
<li class="${h.cssclasses(item)}">${h.menulink(item)}</li>
% endfor
</ul>
% if c.messages['errors']:
<ul id="errors">
% for msg in c.messages['errors']:
<li>${msg}</li>
% endfor
</ul>
% endif
% if c.messages['messages']:
<ul id="messages">
% for msg in c.messages['messages']:
<li>${msg}</li>
% endfor
</ul>
% endif
<div id="content">
${next.body()}
</div>
</body>
</html>
<%def name="title()">Site</%def>
<%def name="headlines()">
<title>Site</title>
</%def>