aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views/default
diff options
context:
space:
mode:
authordave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-03-01 14:28:17 +0000
committerdave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-03-01 14:28:17 +0000
commit557e2dd6c6bcaabd7379f31c2c523ffd04b8adb7 (patch)
treedad8ece8e5277ecdf97d46f067480c43734b6c6e /mod/groups/views/default
parentca41536858d67f1b0a7e1f05ab6db35c4d4cac78 (diff)
downloadelgg-557e2dd6c6bcaabd7379f31c2c523ffd04b8adb7.tar.gz
elgg-557e2dd6c6bcaabd7379f31c2c523ffd04b8adb7.tar.bz2
deleting discussions added
git-svn-id: https://code.elgg.org/elgg/trunk@3008 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups/views/default')
-rw-r--r--mod/groups/views/default/object/groupforumtopic.php16
1 files changed, 11 insertions, 5 deletions
diff --git a/mod/groups/views/default/object/groupforumtopic.php b/mod/groups/views/default/object/groupforumtopic.php
index 2419cb76a..af0cf914f 100644
--- a/mod/groups/views/default/object/groupforumtopic.php
+++ b/mod/groups/views/default/object/groupforumtopic.php
@@ -12,7 +12,6 @@
//get the required variables
$title = $vars['entity']->title;
- $description = get_entity($vars['entity']->description);
$topic_owner = get_user($vars['entity']->owner_guid);
$group = get_entity($vars['entity']->container_guid);
$forum_created = friendly_time($vars['entity']->time_created);
@@ -43,8 +42,7 @@
$info .= "<p>" . elgg_echo('group') . ": <a href=\"{$group->getURL()}\">{$group->name}</a></p>";
$info .= "<p>" . elgg_echo('topic') . ": <a href=\"{$vars['url']}mod/groups/topicposts.php?topic={$vars['entity']->guid}&group_guid={$group->guid}\">{$title}</a></p>";
- //get the forum description
- $info .= $description;
+
}else{
@@ -55,8 +53,16 @@
//get the user avatar
$icon = elgg_view("profile/icon",array('entity' => $topic_owner, 'size' => 'small'));
$info .= "<p>" . elgg_echo('groups:started') . " " . $topic_owner->name . ": <a href=\"{$vars['url']}mod/groups/topicposts.php?topic={$vars['entity']->guid}&group_guid={$group->guid}\">{$title}</a></p>";
-
- $info .= $description;
+ if (groups_can_edit_discussion($vars['entity'], page_owner_entity()->owner_guid)) {
+
+ // display the delete link to those allowed to delete
+ $info .= "<div class=\"delete_discussion\">" . elgg_view("output/confirmlink", array(
+ 'href' => $vars['url'] . "action/groups/deletetopic?topic=" . $vars['entity']->guid . "&group=" . $vars['entity']->container_guid,
+ 'text' => elgg_echo('delete'),
+ 'confirm' => elgg_echo('deleteconfirm'),
+ )) . "</div>";
+
+ }
}