2009-01-01 00:23:29 +00:00
|
|
|
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
2009-11-02 10:02:34 -08:00
|
|
|
<a href="<?= url::site("form/add/comments/{$item->id}") ?>" id="g-admin-comment-button"
|
2009-09-30 08:04:49 -06:00
|
|
|
class="g-button ui-corner-all ui-icon-left ui-state-default right">
|
2009-08-28 13:44:01 -07:00
|
|
|
<span class="ui-icon ui-icon-comment"></span>
|
|
|
|
|
<?= t("Add a comment") ?>
|
|
|
|
|
</a>
|
2009-10-04 00:27:22 -06:00
|
|
|
<div id="g-comment-detail">
|
2009-02-23 00:46:25 +00:00
|
|
|
<? if (!$comments->count()): ?>
|
2009-10-04 00:27:22 -06:00
|
|
|
<p id="g-no-comments-yet">
|
2009-04-03 23:12:52 +00:00
|
|
|
<?= t("No comments yet. Be the first to <a %attrs>comment</a>!",
|
2009-10-04 00:27:22 -06:00
|
|
|
array("attrs" => html::mark_clean("id= \"g-no-comments\" href=\"" . url::site("form/add/comments/{$item->id}") . "\" 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-10-04 00:27:22 -06:00
|
|
|
<li id="g-comment-<?= $comment->id ?>">
|
|
|
|
|
<p class="g-author">
|
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-10-04 00:27:22 -06:00
|
|
|
class="g-avatar"
|
2009-08-31 21:51:57 -07:00
|
|
|
alt="<?= html::clean_attribute($comment->author_name()) ?>"
|
2009-01-10 19:13:00 +00:00
|
|
|
width="40"
|
|
|
|
|
height="40" />
|
2009-01-10 00:34:23 +00:00
|
|
|
</a>
|
2010-01-28 08:14:33 -08:00
|
|
|
<? if ($comment->author()->guest): ?>
|
|
|
|
|
<?= t('on %date %name said',
|
|
|
|
|
array("date" => date("Y-M-d H:i:s", $comment->created),
|
|
|
|
|
"name" => html::clean($comment->author_name()))); ?>
|
|
|
|
|
<? else: ?>
|
2010-01-23 21:38:01 -08:00
|
|
|
<?= t('on %date <a href="%url">%name</a> said',
|
2009-01-10 05:56:11 +00:00
|
|
|
array("date" => date("Y-M-d H:i:s", $comment->created),
|
2010-01-23 21:38:01 -08:00
|
|
|
"url" => user_profile::url($comment->author_id),
|
2009-08-29 22:54:20 -07:00
|
|
|
"name" => html::clean($comment->author_name()))); ?>
|
2010-01-28 08:14:33 -08:00
|
|
|
<? endif ?>
|
2008-12-25 00:47:40 +00:00
|
|
|
</p>
|
|
|
|
|
<div>
|
2009-08-29 22:54:20 -07:00
|
|
|
<?= nl2br(html::purify($comment->text)) ?>
|
2008-12-25 00:47:40 +00:00
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
<? endforeach ?>
|
|
|
|
|
</ul>
|
2009-08-28 13:44:01 -07:00
|
|
|
</div>
|