2012-05-09 10:54:34 +02:00
|
|
|
$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()
|
2013-09-29 15:11:23 +02:00
|
|
|
<h1 class="entry-title">
|
|
|
|
<a href="links/$link.to_date_link()">$date</a>
|
|
|
|
</h1>
|
2012-05-05 12:12:43 +02:00
|
|
|
|
2013-09-28 19:34:35 +02:00
|
|
|
$if model.is_admin():
|
|
|
|
<p class="meta">
|
2013-09-29 15:11:23 +02:00
|
|
|
<a href="$here/hide">${ "Hidden" if link.hidden else "Showing" }</a>
|
|
|
|
<span class="sep"> | </span>
|
2013-09-28 19:34:35 +02:00
|
|
|
<a href="$here/close">${ "Closed" if link.closed else "Open for comments" }</a>
|
|
|
|
</p>
|
2012-05-05 12:12:43 +02:00
|
|
|
|
2013-09-29 15:11:23 +02:00
|
|
|
<div class="entry-summary">
|
2012-05-05 12:12:43 +02:00
|
|
|
$if not link.URL:
|
|
|
|
<b>$link.title</b>
|
|
|
|
$else:
|
2012-05-06 11:19:51 +02:00
|
|
|
<a href="$link.URL">$:link.URL_description</a>
|
2012-05-05 12:12:43 +02:00
|
|
|
$:link.description
|
|
|
|
$if link.extended:
|
|
|
|
<p>$:link.extended
|
2013-09-29 15:11:23 +02:00
|
|
|
</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
|
2013-09-29 15:11:23 +02:00
|
|
|
</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
|
|
|
|
2013-09-28 20:57:44 +02:00
|
|
|
<ul class="commentlist">
|
2012-05-05 12:12:43 +02:00
|
|
|
$for comment in comments:
|
2013-09-28 20:57:44 +02:00
|
|
|
<li>
|
2014-02-23 21:04:35 +01:00
|
|
|
<div class="comment" id="comment_$comment.commentID">
|
2012-05-05 12:12:43 +02:00
|
|
|
$:comment.content
|
2015-03-03 20:40:26 +01:00
|
|
|
</b></i>
|
2013-09-28 20:57:44 +02:00
|
|
|
<footer>
|
2012-06-04 10:45:58 +02:00
|
|
|
$ user = comment.user
|
2014-04-17 20:17:16 +02:00
|
|
|
posted <a href="$here#comment_$comment.commentID">$comment.ago()</a> ago
|
|
|
|
by <a href="user/$user.username">$user.username</a>
|
2013-09-27 20:32:41 +02:00
|
|
|
$if features.likes:
|
2013-09-29 15:11:23 +02:00
|
|
|
<span class="sep"> | </span>
|
2014-04-18 22:32:01 +02:00
|
|
|
$model.plural(comment.like_count, 'like')
|
2013-09-29 15:11:23 +02:00
|
|
|
<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():
|
2013-09-29 15:11:23 +02:00
|
|
|
<span class="sep"> | </span>
|
|
|
|
<a href="comment/$comment.commentID/delete">Delete</a>
|
2013-09-28 20:57:44 +02:00
|
|
|
</footer>
|
2012-06-04 10:45:58 +02:00
|
|
|
</div>
|
2013-09-28 20:57:44 +02:00
|
|
|
</ul>
|
2012-05-06 09:39:03 +02:00
|
|
|
|
|
|
|
$if not link.closed:
|
2013-09-29 15:11:23 +02:00
|
|
|
<a id="comment"></a>
|
|
|
|
$if preview:
|
2013-09-29 15:58:06 +02:00
|
|
|
<div class="preview">$:preview</div><p>
|
2013-09-29 15:11:23 +02:00
|
|
|
<div id="commentform">
|
2013-10-10 22:05:49 +02:00
|
|
|
<form name="main" method="post" action="$here/new">
|
|
|
|
$:form.render_css()
|
2013-10-09 21:15:14 +02:00
|
|
|
<br/>
|
2013-09-29 15:11:23 +02:00
|
|
|
<input type="submit" name="post" value="Post"/>
|
|
|
|
<input type="submit" name="preview" value="Preview"/>
|
|
|
|
</form>
|
|
|
|
</div>
|