summaryrefslogtreecommitdiff
path: root/modules/comment/views
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-08-28 13:44:01 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-08-28 13:44:01 -0700
commit1d5262f9c354a8564f05a8a31b915ad479f4d361 (patch)
treeb8a57186de654a908b89ee8e7a1a031c0851c819 /modules/comment/views
parentdcead39dfbd1885720e888446d0572e11b7ad47c (diff)
Fix ticket #591: reCaptcha always on the page.
1) move creating the "Add a comment" button into the comments.html.php 2) use $.get() to retrieve the comment add form
Diffstat (limited to 'modules/comment/views')
-rw-r--r--modules/comment/views/comments.html.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/comment/views/comments.html.php b/modules/comment/views/comments.html.php
index f7251389..6dce9971 100644
--- a/modules/comment/views/comments.html.php
+++ b/modules/comment/views/comments.html.php
@@ -1,11 +1,17 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
+ <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">
<? if (!$comments->count()): ?>
<p id="gNoCommentsYet">
<?= t("No comments yet. Be the first to <a %attrs>comment</a>!",
array("attrs" => "href=\"#add_comment_form\" class=\"showCommentForm\"")) ?>
</p>
<? endif ?>
-<ul id="gComments">
+<ul>
<? foreach ($comments as $comment): ?>
<li id="gComment-<?= $comment->id ?>">
<p class="gAuthor">
@@ -26,4 +32,4 @@
</li>
<? endforeach ?>
</ul>
-<a name="add_comment_form"></a>
+</div>