aboutsummaryrefslogtreecommitdiff
path: root/mod/groups
diff options
context:
space:
mode:
Diffstat (limited to 'mod/groups')
-rw-r--r--mod/groups/views/default/groups/css.php22
-rw-r--r--mod/groups/views/default/object/groupforumtopic.php25
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>";
-
- }
}