From bdacb612f3fffa967ef6fda89c081fb7a59894d2 Mon Sep 17 00:00:00 2001 From: brettp Date: Thu, 11 Mar 2010 18:07:26 +0000 Subject: Added breadcrumb support and updated the mods with old-style breadcrumbs. git-svn-id: http://code.elgg.org/elgg/trunk@5366 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/groups/views/default/forms/forums/addtopic.php | 56 ++++++++-------- mod/groups/views/default/forum/viewposts.php | 77 ++++++++++------------ 2 files changed, 62 insertions(+), 71 deletions(-) (limited to 'mod/groups/views/default') diff --git a/mod/groups/views/default/forms/forums/addtopic.php b/mod/groups/views/default/forms/forums/addtopic.php index 37075aa6d..e3bc3e1c6 100644 --- a/mod/groups/views/default/forms/forums/addtopic.php +++ b/mod/groups/views/default/forms/forums/addtopic.php @@ -1,13 +1,13 @@ * @copyright Curverider Ltd 2008-2010 * @link http://elgg.com/ - * + * * @uses $vars['object'] Optionally, the topic to edit */ @@ -20,22 +20,20 @@ $message_id = ""; $status = ""; $access_id = ACCESS_DEFAULT; - - // get the group guid - $group_guid = (int) get_input('group_guid'); - - // set breadcrumbs - echo elgg_view('page_elements/breadcrumbs', array( - 'breadcrumb_root_url' => '', - 'breadcrumb_root_text' => 'Parent Group Name', - 'breadcrumb_level1_url' => '#', - 'breadcrumb_level1_text' => elgg_echo('item:object:groupforumtopic'), - 'breadcrumb_currentpage' => elgg_echo("groups:addtopic") - )); - + + // get the group guid + $group_guid = (int) get_input('group_guid'); + + // set breadcrumbs + elgg_push_breadcrumb('', 'Parent Group Name'); + elgg_push_breadcrumb(elgg_echo('item:object:groupforumtopic'), ''); + elgg_push_breadcrumb(elgg_echo("groups:addtopic")); + + echo elgg_view('navigation/breadcrumbs'); + // set the title echo elgg_view_title(elgg_echo("groups:addtopic")); - + ?>
@@ -44,7 +42,7 @@

- +

- +

- +

- +

- +

- +

diff --git a/mod/groups/views/default/forum/viewposts.php b/mod/groups/views/default/forum/viewposts.php index efb7e595c..02ed06b62 100644 --- a/mod/groups/views/default/forum/viewposts.php +++ b/mod/groups/views/default/forum/viewposts.php @@ -1,8 +1,8 @@ + elgg_push_breadcrumb('', 'Parent Group Name'); + elgg_push_breadcrumb(elgg_echo('item:object:groupforumtopic'), ''); + elgg_push_breadcrumb($vars['entity']->title); - '', - 'breadcrumb_root_text' => 'Parent Group Name', - 'breadcrumb_level1_url' => '#', - 'breadcrumb_level1_text' => elgg_echo('item:object:groupforumtopic'), - 'breadcrumb_currentpage' => $vars['entity']->title - )); + echo elgg_view('navigation/breadcrumbs'); - + //display follow up comments + $count = $vars['entity']->countAnnotations('group_topic_post'); + $offset = (int) get_input('offset',0); - //display follow up comments - $count = $vars['entity']->countAnnotations('group_topic_post'); - $offset = (int) get_input('offset',0); - - $baseurl = $vars['url'] . "mod/groups/topicposts.php?topic={$vars['entity']->guid}&group_guid={$vars['entity']->container_guid}"; - echo elgg_view('navigation/pagination',array( - 'limit' => 50, - 'offset' => $offset, - 'baseurl' => $baseurl, - 'count' => $count, - )); + $baseurl = $vars['url'] . "mod/groups/topicposts.php?topic={$vars['entity']->guid}&group_guid={$vars['entity']->container_guid}"; + echo elgg_view('navigation/pagination',array( + 'limit' => 50, + 'offset' => $offset, + 'baseurl' => $baseurl, + 'count' => $count, + )); ?>

title; ?>

getAnnotations('group_topic_post', 50, $offset, "asc") as $post) { - - echo elgg_view("forum/topicposts",array('entity' => $post)); - + + foreach($vars['entity']->getAnnotations('group_topic_post', 50, $offset, "asc") as $post) { + + echo elgg_view("forum/topicposts",array('entity' => $post)); + } - + // check to find out the status of the topic and act - if($vars['entity']->status != "closed" && page_owner_entity()->isMember($vars['user'])){ - - //display the add comment form, this will appear after all the existing comments - echo elgg_view("forms/forums/addpost", array('entity' => $vars['entity'])); - - } elseif($vars['entity']->status == "closed") { - - //this topic has been closed by the owner - echo "

" . elgg_echo("groups:topicisclosed") . "

"; - echo "

" . elgg_echo("groups:topiccloseddesc") . "

"; - - } else { - } + if($vars['entity']->status != "closed" && page_owner_entity()->isMember($vars['user'])){ + + //display the add comment form, this will appear after all the existing comments + echo elgg_view("forms/forums/addpost", array('entity' => $vars['entity'])); + + } elseif($vars['entity']->status == "closed") { + + //this topic has been closed by the owner + echo "

" . elgg_echo("groups:topicisclosed") . "

"; + echo "

" . elgg_echo("groups:topiccloseddesc") . "

"; + + } else { + } ?> -- cgit v1.2.3