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 --- mod/groups/views/default/groups/css.php | 22 +++++++++++++++++++ .../views/default/object/groupforumtopic.php | 25 +++++++++++++--------- 2 files changed, 37 insertions(+), 10 deletions(-) (limited to 'mod/groups/views/default') diff --git a/mod/groups/views/default/groups/css.php b/mod/groups/views/default/groups/css.php index fafd3df71..2eaa87681 100644 --- a/mod/groups/views/default/groups/css.php +++ b/mod/groups/views/default/groups/css.php @@ -357,6 +357,28 @@ span.timestamp { margin:5px 0 0 0; } +/* delete post */ +.delete_discussion { + +} +.delete_discussion a { + display:block; + float:right; + cursor: pointer; + width:14px; + height:14px; + margin:0; + background: url("_graphics/icon_customise_remove.png") no-repeat 0 0; + text-indent: -9000em; +} +.delete_discussion a:hover { + background-position: 0 -16px; + text-decoration: none; +} +/* IE6 */ +* html .delete_discussion a { text-indent: none; font-size: 1px; } +/* IE7 */ +*:first-child+html .delete_discussion a { text-indent: none; font-size: 1px; } /* delete group button */ #delete_group_option input[type="submit"] { 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