aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'mod/groups/views/default')
-rw-r--r--mod/groups/views/default/discussion/group_module.php (renamed from mod/groups/views/default/groups/profile/forum_widget.php)2
-rw-r--r--mod/groups/views/default/forum/maintopic.php55
-rw-r--r--mod/groups/views/default/forum/topics.php25
-rw-r--r--mod/groups/views/default/forum/viewposts.php47
-rw-r--r--mod/groups/views/default/groups/profile/widgets.php5
-rw-r--r--mod/groups/views/default/object/groupforumtopic.php22
6 files changed, 20 insertions, 136 deletions
diff --git a/mod/groups/views/default/groups/profile/forum_widget.php b/mod/groups/views/default/discussion/group_module.php
index 969eb0559..b42084655 100644
--- a/mod/groups/views/default/groups/profile/forum_widget.php
+++ b/mod/groups/views/default/discussion/group_module.php
@@ -18,7 +18,7 @@ $all_link = elgg_view('output/url', array(
));
$header = "<span class=\"group-widget-viewall\">$all_link</span>";
-$header .= '<h3>' . elgg_echo('groups:latestdiscussion') . '</h3>';
+$header .= '<h3>' . elgg_echo('discussion:group') . '</h3>';
elgg_push_context('widgets');
diff --git a/mod/groups/views/default/forum/maintopic.php b/mod/groups/views/default/forum/maintopic.php
deleted file mode 100644
index 7031c7418..000000000
--- a/mod/groups/views/default/forum/maintopic.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-
- /**
- * Elgg Topic individual post view.
- *
- * @package ElggGroups
- *
- * @uses $vars['entity'] The post
- */
-
- $topic = get_input('topic');
- $group_guid = get_input('group_guid');
-
-?>
-
-<div class="entity-listing topic clearfix">
-<a class="anchor_link" name="<?php echo $vars['entity']->id; ?>"></a>
- <?php
- // get infomation about the owner of the comment
- if ($post_owner = get_user($vars['entity']->owner_guid)) {
- // display the user icon
- echo "<div class='entity-listing-icon'>" . elgg_view("profile/icon",array('entity' => $post_owner, 'size' => 'tiny')) . "</div>";
- // display the user name
- echo "<div class='entity-listing-info'>";
- // if comment owner, group owner, or site admin - display edit and delete options
- if (groups_can_edit_discussion($vars['entity'], elgg_get_page_owner()->owner_guid)) {
- echo "<div class='entity-metadata'>";
- echo "<span class='delete-button'>".elgg_view("output/confirmlink",array(
- 'href' => "action/groups/deletepost?post=" . $vars['entity']->id . "&topic=" . get_input('topic') . "&group=" . get_input('group_guid'),
- 'text' => elgg_echo('delete'),
- 'confirm' => elgg_echo('deleteconfirm')
- ))."</span>";
- echo "<span class='entity-edit'><a class='link' href=\"".elgg_get_site_url()."pg/discussion/edit/{$vars['entity']->guid}\">".elgg_echo('edit')."</a></span>";
- echo "</div>";
-
- }
-
- echo "<p class='entity-title'><a href='".$post_owner->getURL()."'>" . $post_owner->name . "</a></p>";
- } else {
- echo "<div class='entity-listing-icon'><img src=\"" . elgg_view('icon/user/default/tiny') . "\" /></div>";
- echo "<div class='entity-listing-info'><p class='entity-title'>" . elgg_echo('profile:deleteduser') . "</p>";
- }
-
- //display the date of the comment
- echo "<p class='entity-subtext'>" . elgg_view_friendly_time($vars['entity']->time_created) . "</p>";
- echo "</div>"; // close entity-listing-info
- echo "</div>"; // close entity-listing.topic
-
- //display the actual message posted
- echo "<div class='topic_post maintopic'>";
- echo parse_urls(elgg_view("output/longtext",array("value" => $vars['entity']->description)));
- echo "</div>";
-?>
-
-<!-- </div> --> \ No newline at end of file
diff --git a/mod/groups/views/default/forum/topics.php b/mod/groups/views/default/forum/topics.php
deleted file mode 100644
index e67294c72..000000000
--- a/mod/groups/views/default/forum/topics.php
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-/**
- * Elgg groups plugin
- */
-?>
-
-<div id="content-header" class="clearfix">
- <div class="content-header-title">
- <h2><?php echo elgg_echo("groups:forum"); ?></h2>
- </div>
- <?php // only show the add topic button if the user is a member
- if(elgg_get_page_owner()->isMember(get_loggedin_user())) {
- ?>
- <div class="content-header-options">
- <a class="elgg-action-button" href="<?php echo elgg_get_site_url(); ?>mod/groups/addtopic.php?group_guid=<?php echo $vars['group_guid']; ?>"><?php echo elgg_echo("groups:addtopic"); ?></a>
- </div>
- <?php
- }
- ?>
-</div>
-<?php
-if($vars['topics'])
- echo $vars['topics'];
-else
- echo "<p class='margin-top'>". elgg_echo("grouptopic:notcreated") . "</p>"; \ No newline at end of file
diff --git a/mod/groups/views/default/forum/viewposts.php b/mod/groups/views/default/forum/viewposts.php
deleted file mode 100644
index 3c9da1258..000000000
--- a/mod/groups/views/default/forum/viewposts.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-/**
- * Elgg groups plugin display topic posts
- */
-/*
-// set up breadcrumbs
-$group_guid = get_input('group_guid');
-$group = get_entity($group_guid);
-elgg_push_breadcrumb(elgg_echo('groups'), elgg_get_site_url()."pg/groups/world/");
-elgg_push_breadcrumb($group->name, $group->getURL());
-elgg_push_breadcrumb(elgg_echo('item:object:groupforumtopic'), elgg_get_site_url()."pg/groups/forum/{$vars['entity']->container_guid}");
-elgg_push_breadcrumb($vars['entity']->title);
-
-echo elgg_view('navigation/breadcrumbs');
-*/
-
-//display follow up comments
-$count = $vars['entity']->countAnnotations('group_topic_post');
-$offset = (int) get_input('offset',0);
-
-$baseurl = elgg_get_site_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,
- ));
-
-?>
-<?php
- //display the topic
- echo elgg_view("forum/maintopic",array('entity' => $vars['entity']));
-
- // check to find out the status of the topic and act
- if($vars['entity']->status == "closed") {
- echo elgg_view_comments($vars['entity'], false);
- //this topic has been closed by the owner
- echo "<h3>" . elgg_echo("groups:topicisclosed") . "</h3>";
- echo "<p>" . elgg_echo("groups:topiccloseddesc") . "</p>";
-
- }elseif(elgg_get_page_owner()->isMember(get_loggedin_user())){
- //comments are on and the user viewing is a member
- echo elgg_view_comments($vars['entity']);
- }else{
- //the user is not a member so cannot post a comment
- echo elgg_view_comments($vars['entity'], false);
- }
diff --git a/mod/groups/views/default/groups/profile/widgets.php b/mod/groups/views/default/groups/profile/widgets.php
index af558c90d..3e28c0091 100644
--- a/mod/groups/views/default/groups/profile/widgets.php
+++ b/mod/groups/views/default/groups/profile/widgets.php
@@ -12,11 +12,6 @@ echo "<div id='group_tools_latest' class='clearfix'>";
echo "<div class='group_tool_widget activity clearfix'>";
echo elgg_view("groups/profile/activity_widget", array('entity' => $vars['entity']));
echo "</div>";
-
- // forum latest
- //echo "<div class='group_tool_widget forum clearfix'>";
- echo elgg_view("groups/profile/forum_widget", array('entity' => $vars['entity']));
- //echo "</div>";
// enable tools to extend this area
echo elgg_view("groups/tool_latest", array('entity' => $vars['entity']));
diff --git a/mod/groups/views/default/object/groupforumtopic.php b/mod/groups/views/default/object/groupforumtopic.php
index a89419931..c6f9da4b4 100644
--- a/mod/groups/views/default/object/groupforumtopic.php
+++ b/mod/groups/views/default/object/groupforumtopic.php
@@ -5,7 +5,7 @@
* @package ElggGroups
*/
-//$full = elgg_get_array_value('full', $vars, FALSE);
+$full = elgg_get_array_value('full', $vars, FALSE);
$topic = elgg_get_array_value('entity', $vars, FALSE);
if (!$topic) {
@@ -46,17 +46,33 @@ $metadata = elgg_view('layout/objects/list/metadata', array(
'handler' => 'discussion',
));
-$subtitle = "$poster_text $date $comments_link <span class=\"groups-latest-comment\">$comments_text</span>";
-
// do not show the metadata and controls in widget view
if (elgg_in_context('widgets')) {
$metadata = '';
}
if ($full) {
+ $subtitle = "$poster_text $date $comments_link";
+
+ $params = array(
+ 'entity' => $topic,
+ 'title' => false,
+ 'metadata' => $metadata,
+ 'subtitle' => $subtitle,
+ 'tags' => $tags,
+ );
+ $list_body = elgg_view('layout/objects/list/body', $params);
+
+ $info = elgg_view_image_block($poster_icon, $list_body);
+ echo <<<HTML
+$header
+$info
+$body
+HTML;
} else {
// brief view
+ $subtitle = "$poster_text $date $comments_link <span class=\"groups-latest-comment\">$comments_text</span>";
$params = array(
'entity' => $topic,