Permalink
Browse files

feature(routing): Render bookmarks pages with views

  • Loading branch information...
ewinslow committed May 27, 2015
1 parent 2091546 commit 6c63b0dfcc4f4ca984041b0a07afe149fdb76091
View
@@ -97,45 +97,40 @@ function bookmarks_page_handler($page) {
elgg_push_breadcrumb(elgg_echo('bookmarks'), 'bookmarks/all');
- $pages = dirname(__FILE__) . '/pages/bookmarks';
-
switch ($page[0]) {
case "all":
- include "$pages/all.php";
+ echo elgg_view('resources/bookmarks/all');
break;
case "owner":
- include "$pages/owner.php";
+ echo elgg_view('resources/bookmarks/owner');
break;
case "friends":
- include "$pages/friends.php";
+ echo elgg_view('resources/bookmarks/friends');
break;
case "view":
set_input('guid', $page[1]);
- include "$pages/view.php";
+ echo elgg_view('resources/bookmarks/view');
break;
case "add":
- elgg_gatekeeper();
- include "$pages/add.php";
+ echo elgg_view('resources/bookmarks/add');
break;
case "edit":
- elgg_gatekeeper();
set_input('guid', $page[1]);
- include "$pages/edit.php";
+ echo elgg_view('resources/bookmarks/edit');
break;
case 'group':
- elgg_group_gatekeeper();
- include "$pages/owner.php";
+ echo elgg_view('resources/bookmarks/owner');
break;
case "bookmarklet":
set_input('container_guid', $page[1]);
- include "$pages/bookmarklet.php";
+ echo elgg_view('resources/bookmarks/bookmarklet');
break;
default:
@@ -4,6 +4,7 @@
*
* @package Bookmarks
*/
+elgg_gatekeeper();
$page_owner = elgg_get_page_owner_entity();
@@ -4,6 +4,7 @@
*
* @package ElggBookmarks
*/
+elgg_gatekeeper();
$bookmark_guid = get_input('guid');
$bookmark = get_entity($bookmark_guid);
@@ -4,6 +4,7 @@
*
* @package Bookmarks
*/
+elgg_group_gatekeeper();
$page_owner = elgg_get_page_owner_entity();
if (!$page_owner) {

0 comments on commit 6c63b0d

Please sign in to comment.