From d830ffc0ec91310a5a5d089848879d9436f5d634 Mon Sep 17 00:00:00 2001 From: pete Date: Sun, 1 Mar 2009 18:05:20 +0000 Subject: delete discussion button layout tweaked git-svn-id: https://code.elgg.org/elgg/trunk@3011 36083f99-b078-4883-b0ff-0f9b5a30f544 --- .../views/default/object/groupforumtopic.php | 25 +++++++++++++--------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'mod/groups/views/default/object') diff --git a/mod/groups/views/default/object/groupforumtopic.php b/mod/groups/views/default/object/groupforumtopic.php index af0cf914f..1e67cd1ab 100644 --- a/mod/groups/views/default/object/groupforumtopic.php +++ b/mod/groups/views/default/object/groupforumtopic.php @@ -12,6 +12,7 @@ //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); @@ -42,27 +43,31 @@ $info .= "

" . elgg_echo('group') . ": getURL()}\">{$group->name}

"; $info .= "

" . elgg_echo('topic') . ": guid}&group_guid={$group->guid}\">{$title}

"; - + //get the forum description + //$info .= $description; }else{ $info = "

" . sprintf(elgg_echo('group:created'), $forum_created, $counter) . ""; if ($last_time) $info.= "
" . elgg_echo('groups:updated') . " " . friendly_time($last_time) . " by getURL() . "\">" . $u->username . ""; + + if (groups_can_edit_discussion($vars['entity'], page_owner_entity()->owner_guid)) { + + // display the delete link to those allowed to delete + $info .= "
" . 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'), + )) . ""; + + } + $info .= "

"; //get the user avatar $icon = elgg_view("profile/icon",array('entity' => $topic_owner, 'size' => 'small')); $info .= "

" . elgg_echo('groups:started') . " " . $topic_owner->name . ": guid}&group_guid={$group->guid}\">{$title}

"; - if (groups_can_edit_discussion($vars['entity'], page_owner_entity()->owner_guid)) { - // display the delete link to those allowed to delete - $info .= "
" . 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'), - )) . "
"; - - } } -- cgit v1.2.3