diff options
author | Cash Costello <cash.costello@gmail.com> | 2009-03-28 14:29:55 +0000 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2009-03-28 14:29:55 +0000 |
commit | 2f94fa464bdc62e4e4a394f231df88ee84b33502 (patch) | |
tree | a005ad80080e830c0e31df24b9254ec5649bdeae | |
parent | 871395b74470a70e37aeb684b820e289b0930cba (diff) | |
download | elgg-2f94fa464bdc62e4e4a394f231df88ee84b33502.tar.gz elgg-2f94fa464bdc62e4e4a394f231df88ee84b33502.tar.bz2 |
trying to make menus more consistent
-rw-r--r-- | edit.php | 7 | ||||
-rw-r--r-- | index.php | 15 | ||||
-rw-r--r-- | newalbum.php | 5 | ||||
-rw-r--r-- | start.php | 8 | ||||
-rw-r--r-- | upload.php | 4 | ||||
-rw-r--r-- | viewalbum.php | 2 | ||||
-rw-r--r-- | viewimage.php | 6 |
7 files changed, 43 insertions, 4 deletions
@@ -35,6 +35,13 @@ forward();
}
+ $page_owner = page_owner_entity();
+ if ($page_owner instanceof ElggGroup) {
+ add_submenu_item( sprintf(elgg_echo('album:group'),$page_owner->name),
+ $CONFIG->wwwroot . "pg/photos/owned/" . $page_owner->username);
+ }
+
+
$area2 .= elgg_view_title($title);
$area2 .= elgg_view('tidypics/forms/edit', array('entity' => $entity, 'subtype' => $subtype));
$body = elgg_view_layout('two_column_left_sidebar', $area1, $area2);
@@ -10,6 +10,14 @@ //get the owner of the current page
$owner = page_owner_entity();
+ //$album
+
+ if ($owner instanceof ElggGroup) {
+
+ }
+
+ error_log($owner->guid);
+
//if page owner cannot be found, forward to user's pictures instead (or world if not logged in)
if (is_null($owner->username) || empty($owner->username)) {
//if not logged in, see world pictures instead
@@ -21,6 +29,8 @@ // setup group menu for album index
if ($owner instanceof ElggGroup) {
+ add_submenu_item( sprintf(elgg_echo('album:group'),$owner->name),
+ $CONFIG->wwwroot . "pg/photos/owned/" . $owner->username);
add_submenu_item( elgg_echo('album:create'),
$CONFIG->wwwroot . 'pg/photos/new/' . $owner->username,
'tidypics');
@@ -33,7 +43,10 @@ // Get objects
set_context('search');
set_input('search_viewtype', 'gallery');
- $area2 .= list_entities("object", "album", page_owner(), 10);
+ if ($owner instanceof ElggGroup)
+ $area2 .= list_entities_groups("album", 0, $owner->guid, 10);
+ else
+ $area2 .= list_entities("object", "album", $owner->guid, 10);
set_context('photos');
$body = elgg_view_layout('two_column_left_sidebar', '', $area2);
diff --git a/newalbum.php b/newalbum.php index 95cdb7860..44e0e07a7 100644 --- a/newalbum.php +++ b/newalbum.php @@ -16,6 +16,11 @@ set_page_owner($_SESSION['guid']);
}
+ if ($page_owner instanceof ElggGroup) {
+ add_submenu_item( sprintf(elgg_echo('album:group'),$page_owner->name),
+ $CONFIG->wwwroot . "pg/photos/owned/" . $page_owner->username);
+ }
+
$area2 = elgg_view_title(elgg_echo('album:add'));
$area2 .= elgg_view("tidypics/forms/edit");
@@ -53,9 +53,11 @@ $page_owner = page_owner_entity();
if ($page_owner instanceof ElggGroup) {
- if ($page_owner->photos_enable != "no") {
- add_submenu_item( sprintf(elgg_echo('album:group'),$page_owner->name),
- $CONFIG->wwwroot . "pg/photos/owned/" . $page_owner->username);
+ if (get_context() == "groups") {
+ if ($page_owner->photos_enable != "no") {
+ add_submenu_item( sprintf(elgg_echo('album:group'),$page_owner->name),
+ $CONFIG->wwwroot . "pg/photos/owned/" . $page_owner->username);
+ }
}
}
// context is only set to photos on individual pages, not on group pages
diff --git a/upload.php b/upload.php index 48a8ea522..71beb8752 100644 --- a/upload.php +++ b/upload.php @@ -25,6 +25,10 @@ set_page_owner($container);
$page_owner = page_owner_entity();
+ if ($page_owner instanceof ElggGroup) {
+ add_submenu_item( sprintf(elgg_echo('album:group'),$page_owner->name),
+ $CONFIG->wwwroot . "pg/photos/owned/" . $page_owner->username);
+ }
set_context('photos');
$title = elgg_echo('album:addpix') . ': ' . $album->title;
diff --git a/viewalbum.php b/viewalbum.php index c216273cd..2a89742a1 100644 --- a/viewalbum.php +++ b/viewalbum.php @@ -23,6 +23,8 @@ // setup group menu
if ($owner instanceof ElggGroup) {
+ add_submenu_item( sprintf(elgg_echo('album:group'),$owner->name),
+ $CONFIG->wwwroot . "pg/photos/owned/" . $owner->username);
add_submenu_item( elgg_echo('album:create'),
$CONFIG->wwwroot . 'pg/photos/new/' . $owner->username,
'photos');
diff --git a/viewimage.php b/viewimage.php index 6734fdffd..a303fbe3c 100644 --- a/viewimage.php +++ b/viewimage.php @@ -25,6 +25,12 @@ set_page_owner($owner_guid);
}
+ $page_owner = page_owner_entity();
+ if ($page_owner instanceof ElggGroup) {
+ add_submenu_item( sprintf(elgg_echo('album:group'),$page_owner->name),
+ $CONFIG->wwwroot . "pg/photos/owned/" . $page_owner->username);
+ }
+
add_submenu_item( elgg_echo('image:edit'),
$CONFIG->wwwroot . 'pg/photos/edit/' . $photo_guid,
'photos');
|