niche/templates/link.html

68 lines
1.8 KiB
HTML
Raw Permalink Normal View History

$def with (link, form, preview)
2012-05-05 12:12:43 +02:00
2012-05-05 13:13:46 +02:00
$ here = "link/%s" % link.linkID
2012-05-05 12:12:43 +02:00
2012-06-04 10:45:58 +02:00
$ date = link.to_datestr()
<h1 class="entry-title">
<a href="links/$link.to_date_link()">$date</a>
</h1>
2012-05-05 12:12:43 +02:00
$if model.is_admin():
<p class="meta">
<a href="$here/hide">${ "Hidden" if link.hidden else "Showing" }</a>
<span class="sep"> | </span>
<a href="$here/close">${ "Closed" if link.closed else "Open for comments" }</a>
</p>
2012-05-05 12:12:43 +02:00
<div class="entry-summary">
2012-05-05 12:12:43 +02:00
$if not link.URL:
<b>$link.title</b>
$else:
<a href="$link.URL">$:link.URL_description</a>
2012-05-05 12:12:43 +02:00
$:link.description
$if link.extended:
<p>$:link.extended
</div>
<div class="entry-meta">
2012-06-04 10:45:58 +02:00
$ user = link.user
2012-05-05 13:13:46 +02:00
posted by <a href="user/$user.username">$user.username</a>
2012-06-04 10:45:58 +02:00
$link.ago() ago
</div>
2012-05-05 12:12:43 +02:00
2012-06-04 10:45:58 +02:00
$ comments = link.comments
2012-05-05 12:12:43 +02:00
<ul class="commentlist">
2012-05-05 12:12:43 +02:00
$for comment in comments:
<li>
<div class="comment" id="comment_$comment.commentID">
2012-05-05 12:12:43 +02:00
$:comment.content
</b></i>
<footer>
2012-06-04 10:45:58 +02:00
$ user = comment.user
posted <a href="$here#comment_$comment.commentID">$comment.ago()</a> ago
by <a href="user/$user.username">$user.username</a>
$if features.likes:
<span class="sep"> | </span>
$model.plural(comment.like_count, 'like')
<span class="sep"> | </span>
<a href="comment/$comment.commentID/like">I like it</a>
2012-05-05 12:12:43 +02:00
$if model.is_admin():
<span class="sep"> | </span>
<a href="comment/$comment.commentID/delete">Delete</a>
</footer>
2012-06-04 10:45:58 +02:00
</div>
</ul>
2012-05-06 09:39:03 +02:00
$if not link.closed:
<a id="comment"></a>
$if preview:
<div class="preview">$:preview</div><p>
<div id="commentform">
<form name="main" method="post" action="$here/new">
$:form.render_css()
2013-10-09 21:15:14 +02:00
<br/>
<input type="submit" name="post" value="Post"/>
<input type="submit" name="preview" value="Preview"/>
</form>
</div>