462d1e6130
- Added "Add Page" to menu. - Added "New Page" page.
51 lines
1.9 KiB
Mako
51 lines
1.9 KiB
Mako
<div id="sidebar">
|
|
<ul>
|
|
<li id="search">
|
|
<form id="searchform" method="get" action="/search">
|
|
<div>
|
|
<input type="text" name="q" id="s" size="15" value="${c.querystring}" />
|
|
<br />
|
|
<input type="submit" value="Search" />
|
|
</div>
|
|
</form>
|
|
</li>
|
|
<li id="calendar">
|
|
<h2>Calendar</h2>
|
|
<div id="calendar_wrap">
|
|
<%include file="/calendar.mako"/>
|
|
</div>
|
|
</li>
|
|
% if len(c.categories) > 0:
|
|
<li>
|
|
<h2>Categories</h2>
|
|
<ul>
|
|
% for category in c.categories:
|
|
<li><a href="${h.url_for(controller='category', action=category.url)}" title="${category.name}">${category.name}</a> (${len(category.posts)}) </li>
|
|
% endfor
|
|
</ul>
|
|
</li>
|
|
% endif
|
|
<li>
|
|
<h2>Account</h2>
|
|
<ul>
|
|
% if c.current_user:
|
|
<li><a href="${h.url_for(controller=u'account')}">My Account</a></li>
|
|
% if c.current_user.has_permission('Add Posts'):
|
|
<li><a href="${h.url_for(controller=u'post', action=u'new')}">New Post</a></li>
|
|
% endif
|
|
% if c.current_user.has_permission('Add Pages'):
|
|
<li><a href="${h.url_for(controller=u'page', action=u'new')}">New Page</a></li>
|
|
% endif
|
|
% if c.current_user.has_permission('Edit My Posts'):
|
|
<li><a href="${h.url_for(controller=u'post', action=u'draft')}">Draft Posts</a></li>
|
|
% endif
|
|
<li><a href="${h.url_for(controller=u'account', action=u'logout')}">Logout</a></li>
|
|
% else:
|
|
<li><a href="${h.url_for(controller=u'account', action=u'login')}">Login</a></li>
|
|
% endif
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div style="clear: both; height: 40px;"> </div>
|
|
</div>
|
|
|