2009-01-01 00:23:29 +00:00
|
|
|
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
2009-08-28 13:44:01 -07:00
|
|
|
<a href="<?= url::site("form/add/comments/{$item->id})") ?>" id="gAddCommentButton"
|
|
|
|
|
class="gButtonLink ui-corner-all ui-icon-left ui-state-default right">
|
|
|
|
|
<span class="ui-icon ui-icon-comment"></span>
|
|
|
|
|
<?= t("Add a comment") ?>
|
|
|
|
|
</a>
|
|
|
|
|
<div id="gCommentDetail">
|
2009-02-23 00:46:25 +00:00
|
|
|
<? if (!$comments->count()): ?>
|
2009-04-06 00:27:24 +00:00
|
|
|
<p id="gNoCommentsYet">
|
2009-04-03 23:12:52 +00:00
|
|
|
<?= t("No comments yet. Be the first to <a %attrs>comment</a>!",
|
|
|
|
|
array("attrs" => "href=\"#add_comment_form\" class=\"showCommentForm\"")) ?>
|
2009-02-23 00:46:25 +00:00
|
|
|
</p>
|
|
|
|
|
<? endif ?>
|
2009-08-28 13:44:01 -07:00
|
|
|
<ul>
|
2008-12-25 00:47:40 +00:00
|
|
|
<? foreach ($comments as $comment): ?>
|
2009-01-10 00:34:23 +00:00
|
|
|
<li id="gComment-<?= $comment->id ?>">
|
2009-01-03 01:11:20 +00:00
|
|
|
<p class="gAuthor">
|
2009-01-10 00:34:23 +00:00
|
|
|
<a href="#">
|
2009-07-23 10:20:49 -07:00
|
|
|
<img src="<?= $comment->author()->avatar_url(40, $theme->url("images/avatar.jpg", true)) ?>"
|
2009-01-10 19:13:00 +00:00
|
|
|
class="gAvatar"
|
2009-08-29 12:48:40 -07:00
|
|
|
alt="<?= SafeString::of($comment->author_name()) ?>"
|
2009-01-10 19:13:00 +00:00
|
|
|
width="40"
|
|
|
|
|
height="40" />
|
2009-01-10 00:34:23 +00:00
|
|
|
</a>
|
2009-06-18 01:47:29 -07:00
|
|
|
<?= t('on %date <a href="#">%name</a> said',
|
2009-01-10 05:56:11 +00:00
|
|
|
array("date" => date("Y-M-d H:i:s", $comment->created),
|
2009-08-29 12:48:40 -07:00
|
|
|
"name" => SafeString::of($comment->author_name()))); ?>
|
2008-12-25 00:47:40 +00:00
|
|
|
</p>
|
|
|
|
|
<div>
|
2009-08-29 12:48:40 -07:00
|
|
|
<?= nl2br(SafeString::purify($comment->text)) ?>
|
2008-12-25 00:47:40 +00:00
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
<? endforeach ?>
|
|
|
|
|
</ul>
|
2009-08-28 13:44:01 -07:00
|
|
|
</div>
|