2010-01-15 20:55:30 +00:00
|
|
|
<%inherit file="/base.mako"/>
|
|
|
|
<div class="post">
|
2010-01-18 20:16:46 +00:00
|
|
|
<h2 class="title">${c.post.title}</h2>
|
2010-01-15 20:55:30 +00:00
|
|
|
<div class="info">Posted by ${c.post.user.nick} on ${c.post.created.strftime('%B %d, %Y')}</div>
|
2010-01-18 20:16:46 +00:00
|
|
|
<%include file="/flash.mako"/>
|
2010-01-15 20:55:30 +00:00
|
|
|
<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}">
|
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:
|
2010-01-18 20:16:46 +00:00
|
|
|
<p>You must be <a href="${h.url_for('/admin/login')}">logged in</a> to post a comment.</p>
|
2010-01-15 20:55:30 +00:00
|
|
|
% else:
|
2010-01-18 20:16:46 +00:00
|
|
|
<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>
|
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>
|