diff options
author | pete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-03-01 18:05:20 +0000 |
---|---|---|
committer | pete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-03-01 18:05:20 +0000 |
commit | d830ffc0ec91310a5a5d089848879d9436f5d634 (patch) | |
tree | 0e58089db79581dd37d2260d83e1c7e673cca8fd | |
parent | fb3d7eee01745888a74ecd022090e8f76e29df1a (diff) | |
download | elgg-d830ffc0ec91310a5a5d089848879d9436f5d634.tar.gz elgg-d830ffc0ec91310a5a5d089848879d9436f5d634.tar.bz2 |
delete discussion button layout tweaked
git-svn-id: https://code.elgg.org/elgg/trunk@3011 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | mod/groups/views/default/groups/css.php | 22 | ||||
-rw-r--r-- | mod/groups/views/default/object/groupforumtopic.php | 25 |
2 files changed, 37 insertions, 10 deletions
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("<?php echo $vars['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 .= "<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{
$info = "<p class=\"latest_discussion_info\"><span class=\"timestamp\">" . sprintf(elgg_echo('group:created'), $forum_created, $counter) . "</span>";
if ($last_time) $info.= "<br /><span class='timestamp'>" . elgg_echo('groups:updated') . " " . friendly_time($last_time) . " by <a href=\"" . $u->getURL() . "\">" . $u->username . "</a></span>";
+
+ if (groups_can_edit_discussion($vars['entity'], page_owner_entity()->owner_guid)) {
+
+ // display the delete link to those allowed to delete
+ $info .= "<br /><span 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'),
+ )) . "</span>";
+
+ }
+
$info .= "</p>";
//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>";
- 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>";
-
- }
}
|