54 lines
2.3 KiB
Mako
54 lines
2.3 KiB
Mako
<%inherit file="/base.mako"/>
|
|
<div class="post">
|
|
<h2 class="title">${c.post.title}</h2>
|
|
<div class="info">Posted by ${c.post.user.nick} on ${c.post.created.strftime('%B %d, %Y')}</div>
|
|
<%include file="/flash.mako"/>
|
|
<div class="entry">
|
|
${h.literal(c.post.body)}
|
|
</div>
|
|
% 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}">
|
|
<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>
|
|
</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('/admin/login')}">logged in</a> to post a comment.</p>
|
|
% else:
|
|
<form action="${h.url_for('/blog/comment/%s' % c.post.id)}" method="post" id="commentform">
|
|
<p class="user-details">Logged in as <em>${c.current_user.nick}</em>. <a href="/logout" title="Log out of this account">Logout »</a></p>
|
|
<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>
|
|
<p>
|
|
<input name="submit" type="submit" id="submit" tabindex="5" class="form-button" value="Submit Comment" />
|
|
</p>
|
|
</form>
|
|
% endif
|
|
% endif
|
|
</div>
|
|
|