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

59 lines
2.5 KiB
Plaintext
Raw Normal View History

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>
<div class="tags">
% for tag in c.post.tags:
<a href="/tag/${tag.url}">${tag.name}</a>
% endfor
</div>
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='admin', action='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>