This repository has been archived on 2024-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
old-scribeengine/scribeengine/templates/blog/index.mako

29 lines
1.3 KiB
Plaintext
Raw Normal View History

2010-01-15 20:55:30 +00:00
<%inherit file="/base.mako"/>
2010-01-22 11:07:27 +00:00
<%include file="/flash.mako"/>
<%include file="/pagination.mako"/>
2010-01-15 20:55:30 +00:00
% for post in c.posts:
<div class="post">
<h2 class="title"><a href="${h.url_for_post(post)}">${post.title}</a></h2>
2010-01-15 20:55:30 +00:00
<div class="entry">
${h.literal(h.teaser(post.body))}
2010-01-15 20:55:30 +00:00
</div>
<p class="meta">
2010-02-01 21:57:47 +00:00
<span class="byline">
Posted by ${post.user.nick} on ${post.created.strftime('%B %d, %Y')}
% if c.current_user and c.current_user.id == post.user.id and c.current_user.has_permission(u'Edit My Posts'):
[<a href="${h.url_for(controller=u'post', action=u'edit', id=post.id)}">Edit</a>]
% endif
</span>
<a href="${h.url_for_post(post)}" class="read-more">Read more</a>
2010-01-15 20:55:30 +00:00
% if len(post.comments) == 0:
2010-02-01 21:57:47 +00:00
<a href="${h.url_for_post(post)}#comments" class="comments">No comments</a>
2010-01-15 20:55:30 +00:00
% elif len(post.comments) == 1:
2010-02-01 21:57:47 +00:00
<a href="${h.url_for_post(post)}#comments" class="comments">1 comment</a>
2010-01-15 20:55:30 +00:00
% else:
2010-02-01 21:57:47 +00:00
<a href="${h.url_for_post(post)}#comments" class="comments">${len(post.comments)} comments</a>
2010-01-15 20:55:30 +00:00
% endif
</p>
</div>
% endfor
<%include file="/pagination.mako"/>