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/view.mako

69 lines
2.9 KiB
Plaintext
Raw Normal View History

2010-01-15 20:55:30 +00:00
<%inherit file="/base.mako"/>
<%include file="/flash.mako"/>
2010-01-15 20:55:30 +00:00
<div class="post">
2010-01-18 20:16:46 +00:00
<h2 class="title">${c.post.title}</h2>
2010-02-01 21:57:47 +00:00
<div class="info">
Posted by ${c.post.user.nick} on ${c.post.created.strftime('%B %d, %Y')}
% if c.current_user and c.current_user.id == c.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=c.post.id)}">Edit</a>]
% endif
</div>
2010-01-15 20:55:30 +00:00
<div class="entry">
${h.literal(c.post.body)}
</div>
2010-01-22 11:07:27 +00:00
% if c.post.tags:
<div class="tags">
2010-01-22 11:07:27 +00:00
<p>Filed under:</p>
<ul>
% for tag in c.post.tags:
2010-01-22 11:07:27 +00:00
<li><a href="/tag/${tag.url}">${tag.name}</a></li>
% endfor
2010-01-22 11:07:27 +00:00
</ul>
</div>
2010-01-22 11:07:27 +00:00
% endif
2010-01-15 20:55:30 +00:00
% if len(c.post.comments) == 0:
<h3 id="comments">No Responses</h3>
% elif len(c.post.comments) == 1:
<h3 id="comments">One Response</h3>
% else:
<h3 id="comments">${len(c.post.comments)} Responses</h3>
% endif
% if len(c.post.comments) > 0:
<ol class="commentlist">
% for num, comment in enumerate(c.post.comments):
<li id="comment-${comment.id}">
2010-01-18 20:16:46 +00:00
<div class="comment-title">
<a href="#comment-${comment.id}" title="${comment.title}">${comment.title}</a>
</div>
<div class="comment-meta">
by <cite>${comment.user.nick}</cite>
on ${comment.created.strftime('%B %d, %Y')} at ${comment.created.strftime('%H:%M')}
</div>
<div>
${comment.body}
</div>
2010-01-15 20:55:30 +00:00
</li>
% endfor
</ol>
% else:
% if c.post.comment_status != u'open':
<p class="nocomments">Comments are closed.</p>
% endif
% endif
% if c.post.comment_status == u'open':
<h3 id="respond">Leave a Reply</h3>
% if not c.current_user:
<p>You must be <a href="${h.url_for(controller=u'account', action=u'login')}">logged in</a> to post a comment.</p>
2010-01-15 20:55:30 +00:00
% else:
<form action="${h.url_for(controller='blog',action='comment', id= c.post.id)}" method="post" id="commentform">
<p class="user-details">Logged in as <em>${c.current_user.nick}</em>. <a href="${h.url_for(controller='admin',action='logout')}" title="Log out of this account">Logout &raquo;</a></p>
2010-01-18 20:16:46 +00:00
<p><input type="text" name="title" class="form-text" value="RE: ${c.post.title}" /></p>
<p><textarea name="body" class="form-textarea" cols="80" rows="10" tabindex="4"></textarea></p>
2010-01-15 20:55:30 +00:00
<p>
2010-01-18 20:16:46 +00:00
<input name="submit" type="submit" id="submit" tabindex="5" class="form-button" value="Submit Comment" />
2010-01-15 20:55:30 +00:00
</p>
</form>
% endif
% endif
</div>