aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views/default/object/groupforumtopic.php
diff options
context:
space:
mode:
authorpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-10 17:13:37 +0000
committerpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-10 17:13:37 +0000
commit409331a459355fb827aa33acf3275f3d618a2510 (patch)
treec300483fe791a99a4e6890cf507ddf7c9843078d /mod/groups/views/default/object/groupforumtopic.php
parent755367a31d3c1dbc1cc24ce270a217d2390cbe44 (diff)
downloadelgg-409331a459355fb827aa33acf3275f3d618a2510.tar.gz
elgg-409331a459355fb827aa33acf3275f3d618a2510.tar.bz2
Updated Groups to the new interface. Some view clean-up & simplification done.
git-svn-id: http://code.elgg.org/elgg/trunk@5348 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups/views/default/object/groupforumtopic.php')
-rw-r--r--mod/groups/views/default/object/groupforumtopic.php54
1 files changed, 24 insertions, 30 deletions
diff --git a/mod/groups/views/default/object/groupforumtopic.php b/mod/groups/views/default/object/groupforumtopic.php
index 1dd57c859..5fb1dad0b 100644
--- a/mod/groups/views/default/object/groupforumtopic.php
+++ b/mod/groups/views/default/object/groupforumtopic.php
@@ -21,8 +21,7 @@
//get the time and user
if ($last_post) {
- foreach($last_post as $last)
- {
+ foreach($last_post as $last) {
$last_time = $last->time_created;
$last_user = $last->owner_guid;
}
@@ -33,42 +32,37 @@
//select the correct output depending on where you are
if(get_context() == "search"){
- $info = "<p class=\"latest_discussion_info\">" . sprintf(elgg_echo('group:created'), $forum_created, $counter) . "<br /><span class=\"timestamp\">";
+ $info = "<p class='entity_subtext groups'>" . sprintf(elgg_echo('group:created'), $forum_created, $counter) . "<br />";
if (($last_time) && ($u)) $info.= sprintf(elgg_echo('groups:lastupdated'), friendly_time($last_time), " <a href=\"" . $u->getURL() . "\">" . $u->name . "</a>");
- $info .= '</span></p>';
+ $info .= '</p>';
//get the group avatar
- $icon = elgg_view("profile/icon",array('entity' => $group, 'size' => 'small'));
+ $icon = elgg_view("profile/icon",array('entity' => $group, 'size' => 'tiny'));
//get the group and topic title
- if ($group instanceof ElggGroup)
- $info .= "<p>" . elgg_echo('group') . ": <a href=\"{$group->getURL()}\">".htmlentities($group->name, ENT_QUOTES, 'UTF-8') ."</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;
+ if ($group instanceof ElggGroup) {
+ $info .= "<p class='entity_title'>" . elgg_echo('group') . ": <a href=\"{$group->getURL()}\">".htmlentities($group->name, ENT_QUOTES, 'UTF-8') ."</a></p>";
+ }
+ $info .= "<p class='entity_subtext'>" . elgg_echo('topic') . ": <a href=\"{$vars['url']}mod/groups/topicposts.php?topic={$vars['entity']->guid}&group_guid={$group->guid}\">{$title}</a></p>";
}else{
- $info = "<span class=\"latest_discussion_info\"><span class=\"timestamp\">" . sprintf(elgg_echo('group:created'), $forum_created, $counter) . "</span>";
- if (($last_time) && ($u)) $info.= "<br /><span class='timestamp'>" . elgg_echo('groups:updated') . " " . friendly_time($last_time) . " by <a href=\"" . $u->getURL() . "\">" . $u->name . "</a></span>";
+ $info = "<p class='entity_subtext groups'>" . sprintf(elgg_echo('group:created'), $forum_created, $counter) . "</p>";
+ $info .= "<p class='entity_title'>" . 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 .= "<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' => " ",
- 'confirm' => elgg_echo('deleteconfirm'),
- )) . "</span>";
-
- }
-
- $info .= "</span>";
-
+ 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_button'>" . elgg_view("output/confirmlink", array(
+ 'href' => $vars['url'] . "action/groups/deletetopic?topic=" . $vars['entity']->guid . "&group=" . $vars['entity']->container_guid,
+ 'text' => " ",
+ 'confirm' => elgg_echo('deleteconfirm'),
+ )) . "</div>";
+
+ }
+
+ if (($last_time) && ($u)) {
+ $info.= "<p class='entity_subtext'>" . elgg_echo('groups:updated') . " " . friendly_time($last_time) . " by <a href=\"" . $u->getURL() . "\">" . $u->name . "</a></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>";
- $info .= "<div class='clearfloat'></div>";
-
+ $icon = elgg_view("profile/icon",array('entity' => $topic_owner, 'size' => 'tiny'));
}
//display