aboutsummaryrefslogtreecommitdiff
path: root/mod/bookmarks/pages
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-17 03:27:03 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-17 03:27:03 +0000
commit5a9dfa444ec1807b7b73b9e86fe219a0055731c3 (patch)
tree9476f58ddb2bd277af171b56d191d5d3840b2848 /mod/bookmarks/pages
parent52e5df0a088c0b8abd1448547c090da9b967f835 (diff)
downloadelgg-5a9dfa444ec1807b7b73b9e86fe219a0055731c3.tar.gz
elgg-5a9dfa444ec1807b7b73b9e86fe219a0055731c3.tar.bz2
Refs #2680: Bookmarks revamp, part 3: menus and bookmarklet.
git-svn-id: http://code.elgg.org/elgg/trunk@8268 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/bookmarks/pages')
-rw-r--r--mod/bookmarks/pages/add.php3
-rw-r--r--mod/bookmarks/pages/all.php6
-rw-r--r--mod/bookmarks/pages/bookmarklet.php36
-rw-r--r--mod/bookmarks/pages/friends.php5
-rw-r--r--mod/bookmarks/pages/owner.php10
5 files changed, 43 insertions, 17 deletions
diff --git a/mod/bookmarks/pages/add.php b/mod/bookmarks/pages/add.php
index 5a61c2e96..77b9a0bd0 100644
--- a/mod/bookmarks/pages/add.php
+++ b/mod/bookmarks/pages/add.php
@@ -2,10 +2,11 @@
/**
* Add bookmark page
*
- * @package ElggBookmarks
+ * @package Bookmarks
*/
gatekeeper();
+
$bookmark_guid = get_input('guid');
$bookmark = get_entity($bookmark_guid);
$container_guid = (int) get_input('container_guid');
diff --git a/mod/bookmarks/pages/all.php b/mod/bookmarks/pages/all.php
index 3442f32c7..5a01b6f34 100644
--- a/mod/bookmarks/pages/all.php
+++ b/mod/bookmarks/pages/all.php
@@ -5,9 +5,6 @@
* @package ElggBookmarks
*/
-elgg_push_context('bookmarks');
-elgg_push_breadcrumb(elgg_echo('bookmarks'));
-
$page_owner = elgg_get_page_owner_entity();
if (!$page_owner) {
$page_owner = elgg_get_logged_in_user_guid();
@@ -32,5 +29,4 @@ $body = elgg_view_layout('content', array(
'title' => $title
));
-echo elgg_view_page($title, $body);
-elgg_pop_context(); \ No newline at end of file
+echo elgg_view_page($title, $body); \ No newline at end of file
diff --git a/mod/bookmarks/pages/bookmarklet.php b/mod/bookmarks/pages/bookmarklet.php
new file mode 100644
index 000000000..99866e385
--- /dev/null
+++ b/mod/bookmarks/pages/bookmarklet.php
@@ -0,0 +1,36 @@
+<?php
+/**
+* Elgg bookmarks plugin bookmarklet page
+*
+* @package Bookmarks
+*/
+
+gatekeeper();
+
+$container_guid = get_input('container_guid');
+$container = get_entity($container_guid);
+$page_owner = $container;
+
+if (elgg_instanceof($container, 'object')) {
+ $page_owner = $container->getContainerEntity();
+}
+
+elgg_set_page_owner_guid($page_owner->getGUID());
+
+$title = elgg_echo('bookmarks:bookmarklet');
+
+if ($page_owner instanceof ElggGroup) {
+ elgg_push_breadcrumb($page_owner->name, $page_owner->getURL());
+}
+
+elgg_push_breadcrumb($title);
+
+$content = elgg_view("bookmarks/bookmarklet");
+
+$body = elgg_view_layout('content', array(
+ 'content' => $content,
+ 'title' => $title,
+ 'filter' => false
+));
+
+echo elgg_view_page($title, $body); \ No newline at end of file
diff --git a/mod/bookmarks/pages/friends.php b/mod/bookmarks/pages/friends.php
index 5c930434b..3c55317eb 100644
--- a/mod/bookmarks/pages/friends.php
+++ b/mod/bookmarks/pages/friends.php
@@ -9,8 +9,6 @@ $guid = get_input('guid');
elgg_set_page_owner_guid($guid);
$owner = elgg_get_page_owner_entity();
-elgg_push_context('bookmarks');
-elgg_push_breadcrumb(elgg_echo('bookmarks'), 'pg/bookmarks/all');
elgg_push_breadcrumb($owner->name, "pg/bookmarks/owner/$owner->username");
elgg_push_breadcrumb(elgg_echo('friends'));
@@ -29,5 +27,4 @@ $params = array(
$body = elgg_view_layout('content', $params);
-echo elgg_view_page($title, $body);
-elgg_pop_context(); \ No newline at end of file
+echo elgg_view_page($title, $body); \ No newline at end of file
diff --git a/mod/bookmarks/pages/owner.php b/mod/bookmarks/pages/owner.php
index 5b864ff48..2216b593f 100644
--- a/mod/bookmarks/pages/owner.php
+++ b/mod/bookmarks/pages/owner.php
@@ -2,19 +2,16 @@
/**
* Elgg bookmarks plugin everyone page
*
- * @package ElggBookmarks
+ * @package Bookmarks
*/
-elgg_push_context('bookmarks');
-elgg_push_breadcrumb(elgg_echo('bookmarks'), 'pg/bookmarks/all');
-
$page_owner = elgg_get_page_owner_entity();
if (!$page_owner) {
$page_owner = elgg_get_logged_in_user_guid();
elgg_set_page_owner_guid($page_owner);
}
-elgg_push_breadcrumb($page_owner->name, "pg/bookmarks/owner/$page_owner->username");
+elgg_push_breadcrumb($page_owner->name);
$offset = (int)get_input('offset', 0);
$content .= elgg_list_entities(array(
@@ -35,5 +32,4 @@ $body = elgg_view_layout('content', array(
'title' => $title
));
-echo elgg_view_page($title, $body);
-elgg_pop_context(); \ No newline at end of file
+echo elgg_view_page($title, $body); \ No newline at end of file