diff options
Diffstat (limited to 'modules/comment/views')
| -rw-r--r-- | modules/comment/views/comment_form.html.php | 21 | ||||
| -rw-r--r-- | modules/comment/views/comment_list.html.php | 15 | ||||
| -rw-r--r-- | modules/comment/views/show_comments.html.php | 9 |
3 files changed, 45 insertions, 0 deletions
diff --git a/modules/comment/views/comment_form.html.php b/modules/comment/views/comment_form.html.php new file mode 100644 index 00000000..418f0027 --- /dev/null +++ b/modules/comment/views/comment_form.html.php @@ -0,0 +1,21 @@ +<? defined("SYSPATH") or die("No direct script access."); ?> +<form id="gCommentAdd" class="gExpandedForm"> + <fieldset> + <legend>Add comment</legend> + <div class="row"> + <label for="gCommentAuthor">Your Name</label> + <input type="text" name="author" id="gCommentAuthor" class="text" /> + </div> + <div class="row"> + <label for="gCommentEmail">Your Email (not displayed)</label> + <input type="text" name="email" id="gCommentEmail" class="text" /> + </div> + <div class="row"> + <label for="gCommentText">Comment</label> + <textarea name="text" id="gCommentText"></textarea> + </div> + <input type="hidden" id="gItemId" name="item_id" value="<?= $item_id ?>" /> + <input type="submit" id="gCommentSubmit" value="Add" /> + </fieldset> +</form> + diff --git a/modules/comment/views/comment_list.html.php b/modules/comment/views/comment_list.html.php new file mode 100644 index 00000000..2196af1c --- /dev/null +++ b/modules/comment/views/comment_list.html.php @@ -0,0 +1,15 @@ +<? defined("SYSPATH") or die("No direct script access."); ?> +<ul id="gCommentThread"> + <? foreach (array_reverse($comments) as $index => $comment): ?> + <li id="gComment-<?= $index; ?>" class="gComment <?= $index % 2 ? 'odd' : 'even' ?>"> + <p> + <a href="#" class="gAuthor"><?= $comment->author ?></a> + said <?= round((time() - $comment->datetime)/60) ?> minutes ago + <span class="understate"><?= strftime('%c', $comment->datetime) ?></span> + </p> + <div> + <?= $comment->text ?> + </div> + </li> + <? endforeach; ?> +</ul> diff --git a/modules/comment/views/show_comments.html.php b/modules/comment/views/show_comments.html.php new file mode 100644 index 00000000..9726364f --- /dev/null +++ b/modules/comment/views/show_comments.html.php @@ -0,0 +1,9 @@ +<? defined("SYSPATH") or die("No direct script access."); ?> +<div id="gComments"><!-- BEGIN #gComments --> + <? if ($comment_list): ?> + <h2>Comments</h2> + <?= $comment_list ?> + <? endif ?> + + <?= $comment_form ?> +</div><!-- END #gComments --> |
