From 4766f36a4d74924f21ff329c4318ce4e069ffa04 Mon Sep 17 00:00:00 2001
From: brettp
Date: Wed, 3 Mar 2010 17:53:05 +0000
Subject: Pulled in the interface changes.
git-svn-id: http://code.elgg.org/elgg/trunk@5257 36083f99-b078-4883-b0ff-0f9b5a30f544
---
mod/groups/views/default/forum/topicposts.php | 106 ++++++++++++++++++++++++++
mod/groups/views/default/forum/topics.php | 33 ++++++++
mod/groups/views/default/forum/viewposts.php | 58 ++++++++++++++
3 files changed, 197 insertions(+)
create mode 100644 mod/groups/views/default/forum/topicposts.php
create mode 100644 mod/groups/views/default/forum/topics.php
create mode 100644 mod/groups/views/default/forum/viewposts.php
(limited to 'mod/groups/views/default/forum')
diff --git a/mod/groups/views/default/forum/topicposts.php b/mod/groups/views/default/forum/topicposts.php
new file mode 100644
index 000000000..20a545eec
--- /dev/null
+++ b/mod/groups/views/default/forum/topicposts.php
@@ -0,0 +1,106 @@
+
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.com/
+ *
+ * @uses $vars['entity'] The posted comment to view
+ */
+
+
+?>
+
+
+
+
+
+
+
+ owner_guid)) {
+
+ //display the user icon
+ echo " " . elgg_view("profile/icon",array('entity' => $post_owner, 'size' => 'small')) . " ";
+
+ //display the user name
+ echo "" . $post_owner->name . " ";
+
+ } else {
+ echo " ";
+ echo "" . elgg_echo('profile:deleteduser') . " ";
+ }
+
+ //display the date of the comment
+ echo "" . friendly_time($vars['entity']->time_created) . " ";
+ ?>
+ |
+
+ $vars['entity']->value)));
+ ?>
+ |
+
+
+ owner_guid)) {
+ ?>
+
";
+ //get the edit form and details
+ $submit_input = elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('save')));
+ $text_textarea = elgg_view('input/longtext', array('internalname' => 'postComment'.$vars['entity']->id, 'value' => $vars['entity']->value));
+ $post = elgg_view('input/hidden', array('internalname' => 'post', 'value' => $vars['entity']->id));
+ $field = elgg_view('input/hidden', array('internalname' => 'field_num', 'value' => $vars['entity']->id));
+ $topic = elgg_view('input/hidden', array('internalname' => 'topic', 'value' => get_input('topic')));
+ $group = elgg_view('input/hidden', array('internalname' => 'group', 'value' => get_input('group_guid')));
+
+ $form_body = <<
+
+EOT;
+
+?>
+
+ "{$vars['url']}action/groups/editpost", 'body' => $form_body, 'internalid' => 'editforumpostForm'));
+ ?>
+
+
+
+
+
+
\ No newline at end of file
diff --git a/mod/groups/views/default/forum/topics.php b/mod/groups/views/default/forum/topics.php
new file mode 100644
index 000000000..c4cd9becf
--- /dev/null
+++ b/mod/groups/views/default/forum/topics.php
@@ -0,0 +1,33 @@
+
+
+
+
+
+countAnnotations('group_topic_post');
+ $offset = (int) get_input('offset',0);
+
+ $baseurl = $vars['url'] . "mod/groups/topicposts.php?topic={$vars['entity']->guid}&group_guid={$vars['entity']->container_guid}";
+ echo elgg_view('navigation/pagination',array(
+ 'limit' => 50,
+ 'offset' => $offset,
+ 'baseurl' => $baseurl,
+ 'count' => $count,
+ ));
+
+?>
+
+
title; ?>
+getAnnotations('group_topic_post', 50, $offset, "asc") as $post) {
+
+ echo elgg_view("forum/topicposts",array('entity' => $post));
+
+ }
+
+ // check to find out the status of the topic and act
+ if($vars['entity']->status != "closed" && page_owner_entity()->isMember($vars['user'])){
+
+ //display the add comment form, this will appear after all the existing comments
+ echo elgg_view("forms/forums/addpost", array('entity' => $vars['entity']));
+
+ } elseif($vars['entity']->status == "closed") {
+
+ //this topic has been closed by the owner
+ echo "
" . elgg_echo("groups:topicisclosed") . "
";
+ echo "
" . elgg_echo("groups:topiccloseddesc") . "
";
+
+ } else {
+ }
+
+?>
+
\ No newline at end of file
--
cgit v1.2.3