aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-14 11:07:44 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-14 11:07:44 +0000
commit651530d1d633eb4ee07784daf356956187d3207d (patch)
treedd040abe8f65bddec6c9da2bdfad38d646e27b57
parent26469396670f21e3f96922c839a397158956d351 (diff)
downloadelgg-651530d1d633eb4ee07784daf356956187d3207d.tar.gz
elgg-651530d1d633eb4ee07784daf356956187d3207d.tar.bz2
Further submenu clustering
git-svn-id: https://code.elgg.org/elgg/trunk@1916 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--mod/groups/start.php26
-rw-r--r--views/default/canvas_header/submenu_group.php3
-rw-r--r--views/default/page_elements/owner_block.php1
3 files changed, 15 insertions, 15 deletions
diff --git a/mod/groups/start.php b/mod/groups/start.php
index e55ef9c3c..7b7a4a854 100644
--- a/mod/groups/start.php
+++ b/mod/groups/start.php
@@ -95,39 +95,39 @@
// Submenu items for all group pages
if ($page_owner instanceof ElggGroup) {
if ($page_owner->canEdit()) {
- add_submenu_item(elgg_echo('groups:edit'),$CONFIG->wwwroot . "mod/groups/edit.php?group_guid=" . $page_owner->getGUID());
- add_submenu_item(elgg_echo('groups:invite'),$CONFIG->wwwroot . "mod/groups/invite.php?group_guid={$page_owner->getGUID()}");
+ add_submenu_item(elgg_echo('groups:edit'),$CONFIG->wwwroot . "mod/groups/edit.php?group_guid=" . $page_owner->getGUID(), 'groupsactions');
+ add_submenu_item(elgg_echo('groups:invite'),$CONFIG->wwwroot . "mod/groups/invite.php?group_guid={$page_owner->getGUID()}", 'groupsactions');
}
if ($page_owner->isMember($_SESSION['user'])) {
- add_submenu_item(elgg_echo('groups:leave'), $CONFIG->wwwroot . "action/groups/leave?group_guid=" . $page_owner->getGUID());
+ add_submenu_item(elgg_echo('groups:leave'), $CONFIG->wwwroot . "action/groups/leave?group_guid=" . $page_owner->getGUID(), 'groupsactions');
} else {
if ($page_owner->isPublicMembership())
{
- add_submenu_item(elgg_echo('groups:join'),$CONFIG->wwwroot . "action/groups/join?group_guid={$page_owner->getGUID()}");
+ add_submenu_item(elgg_echo('groups:join'),$CONFIG->wwwroot . "action/groups/join?group_guid={$page_owner->getGUID()}", 'groupsactions');
}
else
{
- add_submenu_item(elgg_echo('groups:joinrequest'),$CONFIG->wwwroot . "action/groups/joinrequest?group_guid={$page_owner->getGUID()}");
+ add_submenu_item(elgg_echo('groups:joinrequest'),$CONFIG->wwwroot . "action/groups/joinrequest?group_guid={$page_owner->getGUID()}", 'groupsactions');
}
}
- add_submenu_item(elgg_echo('groups:forum'),$CONFIG->wwwroot . "pg/groups/forum/{$page_owner->getGUID()}/");
+ add_submenu_item(elgg_echo('groups:forum'),$CONFIG->wwwroot . "pg/groups/forum/{$page_owner->getGUID()}/", 'groupslinks');
}
// Add submenu options
if (get_context() == "groups") {
if ((page_owner() == $_SESSION['guid'] || !page_owner()) && isloggedin()) {
- add_submenu_item(elgg_echo('groups:new'), $CONFIG->wwwroot."pg/groups/new/");
- add_submenu_item(elgg_echo('groups:owned'), $CONFIG->wwwroot . "pg/groups/owned/" . $_SESSION['user']->username);
- add_submenu_item(elgg_echo('groups:yours'), $CONFIG->wwwroot . "pg/groups/member/" . $_SESSION['user']->username);
- add_submenu_item(elgg_echo('groups:all'), $CONFIG->wwwroot . "pg/groups/world/");
+ add_submenu_item(elgg_echo('groups:new'), $CONFIG->wwwroot."pg/groups/new/", 'groupslinks');
+ add_submenu_item(elgg_echo('groups:owned'), $CONFIG->wwwroot . "pg/groups/owned/" . $_SESSION['user']->username, 'groupslinks');
+ add_submenu_item(elgg_echo('groups:yours'), $CONFIG->wwwroot . "pg/groups/member/" . $_SESSION['user']->username, 'groupslinks');
+ add_submenu_item(elgg_echo('groups:all'), $CONFIG->wwwroot . "pg/groups/world/", 'groupslinks');
} else if (page_owner()) {
$page_owner = page_owner_entity();
- add_submenu_item(sprintf(elgg_echo('groups:yours'), $CONFIG->wwwroot . "pg/groups/owned/" . $page_owner->username));
- add_submenu_item(elgg_echo('groups:all'), $CONFIG->wwwroot . "pg/groups/world/");
+ add_submenu_item(elgg_echo('groups:yours'), $CONFIG->wwwroot . "pg/groups/owned/" . $page_owner->username, 'groupslinks');
+ add_submenu_item(elgg_echo('groups:all'), $CONFIG->wwwroot . "pg/groups/world/", 'groupslinks');
} else {
- add_submenu_item(elgg_echo('groups:all'), $CONFIG->wwwroot . "pg/groups/world/");
+ add_submenu_item(elgg_echo('groups:all'), $CONFIG->wwwroot . "pg/groups/world/", 'groupslinks');
}
}
diff --git a/views/default/canvas_header/submenu_group.php b/views/default/canvas_header/submenu_group.php
index 4ce6bce50..5af0f0609 100644
--- a/views/default/canvas_header/submenu_group.php
+++ b/views/default/canvas_header/submenu_group.php
@@ -7,7 +7,8 @@
}
if (isset($vars['submenu'])) {
- echo "<div class=\"submenu_group\"><div class=\"submenu_group_{$groupname}\">{$vars['submenu']}</div></div>";
+ $submenu = "<ul>" . $vars['submenu'] . "</ul>";
+ echo "<div class=\"submenu_group\"><div class=\"submenu_group_{$groupname}\">{$submenu}</div></div>";
}
diff --git a/views/default/page_elements/owner_block.php b/views/default/page_elements/owner_block.php
index b3a5d139b..35c39f557 100644
--- a/views/default/page_elements/owner_block.php
+++ b/views/default/page_elements/owner_block.php
@@ -86,7 +86,6 @@ END;
// Initialise the submenu
$submenu = get_submenu(); // elgg_view('canvas_header/submenu');
- if (!empty($submenu)) $submenu = "<ul>" . $submenu . "</ul>";
if (!empty($submenu))
$contents .= "<div id=\"owner_block_submenu\">" . $submenu . "</div>"; // plugins can extend this to add menu options