From 55724ff6f6818f2c1b16d4bacd912ae2eb745fdb Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 13 Aug 2008 12:27:12 +0000 Subject: Added a new latest activity title to the front page git-svn-id: https://code.elgg.org/elgg/trunk@1895 36083f99-b078-4883-b0ff-0f9b5a30f544 --- index.php | 4 +- languages/en.php | 3 + mod/pages/actions/pages/delete.php | 35 +++ mod/pages/actions/pages/edit.php | 114 ++++++++ mod/pages/actions/pages/editwelcome.php | 77 ++++++ mod/pages/edit.php | 42 +++ mod/pages/history.php | 50 ++++ mod/pages/images/application.png | Bin 0 -> 464 bytes mod/pages/images/code.png | Bin 0 -> 603 bytes mod/pages/images/css.png | Bin 0 -> 618 bytes mod/pages/images/db.png | Bin 0 -> 579 bytes mod/pages/images/directory.png | Bin 0 -> 537 bytes mod/pages/images/doc.png | Bin 0 -> 651 bytes mod/pages/images/file.gif | Bin 0 -> 110 bytes mod/pages/images/file.png | Bin 0 -> 294 bytes mod/pages/images/film.png | Bin 0 -> 653 bytes mod/pages/images/flash.png | Bin 0 -> 582 bytes mod/pages/images/folder-closed.gif | Bin 0 -> 105 bytes mod/pages/images/folder.gif | Bin 0 -> 106 bytes mod/pages/images/folder_open.png | Bin 0 -> 583 bytes mod/pages/images/html.png | Bin 0 -> 734 bytes mod/pages/images/java.png | Bin 0 -> 633 bytes mod/pages/images/linux.png | Bin 0 -> 668 bytes mod/pages/images/minus.gif | Bin 0 -> 837 bytes mod/pages/images/music.png | Bin 0 -> 385 bytes mod/pages/images/pdf.png | Bin 0 -> 591 bytes mod/pages/images/php.png | Bin 0 -> 538 bytes mod/pages/images/picture.png | Bin 0 -> 606 bytes mod/pages/images/plus.gif | Bin 0 -> 841 bytes mod/pages/images/ppt.png | Bin 0 -> 588 bytes mod/pages/images/psd.png | Bin 0 -> 856 bytes mod/pages/images/ruby.png | Bin 0 -> 626 bytes mod/pages/images/script.png | Bin 0 -> 859 bytes mod/pages/images/spinner.gif | Bin 0 -> 2530 bytes mod/pages/images/treeview-black-line.gif | Bin 0 -> 1877 bytes mod/pages/images/treeview-black.gif | Bin 0 -> 1216 bytes mod/pages/images/treeview-default-line.gif | Bin 0 -> 1993 bytes mod/pages/images/treeview-default.gif | Bin 0 -> 1222 bytes mod/pages/images/treeview-famfamfam-line.gif | Bin 0 -> 807 bytes mod/pages/images/treeview-famfamfam.gif | Bin 0 -> 1280 bytes mod/pages/images/treeview-gray-line.gif | Bin 0 -> 1877 bytes mod/pages/images/treeview-gray.gif | Bin 0 -> 1230 bytes mod/pages/images/treeview-red-line.gif | Bin 0 -> 1877 bytes mod/pages/images/treeview-red.gif | Bin 0 -> 1230 bytes mod/pages/images/txt.png | Bin 0 -> 342 bytes mod/pages/images/xls.png | Bin 0 -> 663 bytes mod/pages/images/zip.png | Bin 0 -> 386 bytes mod/pages/index.php | 55 ++++ mod/pages/javascript/jquery.treeview.async.js | 72 +++++ mod/pages/javascript/jquery.treeview.js | 251 ++++++++++++++++++ mod/pages/languages/en.php | 89 +++++++ mod/pages/manifest.xml | 9 + mod/pages/new.php | 44 ++++ mod/pages/pagesTree.php | 56 ++++ mod/pages/start.php | 291 +++++++++++++++++++++ mod/pages/view.php | 57 ++++ mod/pages/views/default/annotation/icon.php | 32 +++ mod/pages/views/default/annotation/page.php | 40 +++ mod/pages/views/default/forms/pages/edit.php | 66 +++++ .../views/default/forms/pages/editwelcome.php | 57 ++++ mod/pages/views/default/object/page.php | 21 ++ mod/pages/views/default/object/page_top.php | 21 ++ mod/pages/views/default/pages/breadcrumbs.php | 28 ++ mod/pages/views/default/pages/css.php | 108 ++++++++ .../views/default/pages/groupprofile_pages.php | 9 + mod/pages/views/default/pages/menu.php | 14 + mod/pages/views/default/pages/metatags.php | 22 ++ mod/pages/views/default/pages/pagegallery.php | 37 +++ mod/pages/views/default/pages/pagelisting.php | 38 +++ mod/pages/views/default/pages/pageprofile.php | 66 +++++ .../views/default/pages/sidebar/sidebarthis.php | 82 ++++++ mod/pages/views/default/pages/sidebar/starter.php | 21 ++ mod/pages/views/default/pages/sidebar/tree.php | 8 + mod/pages/views/default/pages/sidebar/wrapper.php | 7 + mod/pages/views/default/pages/welcome.php | 29 ++ mod/pages/welcome.php | 34 +++ mod/pages/world.php | 51 ++++ 77 files changed, 2038 insertions(+), 2 deletions(-) create mode 100644 mod/pages/actions/pages/delete.php create mode 100644 mod/pages/actions/pages/edit.php create mode 100644 mod/pages/actions/pages/editwelcome.php create mode 100644 mod/pages/edit.php create mode 100644 mod/pages/history.php create mode 100644 mod/pages/images/application.png create mode 100644 mod/pages/images/code.png create mode 100644 mod/pages/images/css.png create mode 100644 mod/pages/images/db.png create mode 100644 mod/pages/images/directory.png create mode 100644 mod/pages/images/doc.png create mode 100644 mod/pages/images/file.gif create mode 100644 mod/pages/images/file.png create mode 100644 mod/pages/images/film.png create mode 100644 mod/pages/images/flash.png create mode 100644 mod/pages/images/folder-closed.gif create mode 100644 mod/pages/images/folder.gif create mode 100644 mod/pages/images/folder_open.png create mode 100644 mod/pages/images/html.png create mode 100644 mod/pages/images/java.png create mode 100644 mod/pages/images/linux.png create mode 100644 mod/pages/images/minus.gif create mode 100644 mod/pages/images/music.png create mode 100644 mod/pages/images/pdf.png create mode 100644 mod/pages/images/php.png create mode 100644 mod/pages/images/picture.png create mode 100644 mod/pages/images/plus.gif create mode 100644 mod/pages/images/ppt.png create mode 100644 mod/pages/images/psd.png create mode 100644 mod/pages/images/ruby.png create mode 100644 mod/pages/images/script.png create mode 100644 mod/pages/images/spinner.gif create mode 100644 mod/pages/images/treeview-black-line.gif create mode 100644 mod/pages/images/treeview-black.gif create mode 100644 mod/pages/images/treeview-default-line.gif create mode 100644 mod/pages/images/treeview-default.gif create mode 100644 mod/pages/images/treeview-famfamfam-line.gif create mode 100644 mod/pages/images/treeview-famfamfam.gif create mode 100644 mod/pages/images/treeview-gray-line.gif create mode 100644 mod/pages/images/treeview-gray.gif create mode 100644 mod/pages/images/treeview-red-line.gif create mode 100644 mod/pages/images/treeview-red.gif create mode 100644 mod/pages/images/txt.png create mode 100644 mod/pages/images/xls.png create mode 100644 mod/pages/images/zip.png create mode 100644 mod/pages/index.php create mode 100644 mod/pages/javascript/jquery.treeview.async.js create mode 100644 mod/pages/javascript/jquery.treeview.js create mode 100644 mod/pages/languages/en.php create mode 100644 mod/pages/manifest.xml create mode 100644 mod/pages/new.php create mode 100644 mod/pages/pagesTree.php create mode 100644 mod/pages/start.php create mode 100644 mod/pages/view.php create mode 100644 mod/pages/views/default/annotation/icon.php create mode 100644 mod/pages/views/default/annotation/page.php create mode 100644 mod/pages/views/default/forms/pages/edit.php create mode 100644 mod/pages/views/default/forms/pages/editwelcome.php create mode 100644 mod/pages/views/default/object/page.php create mode 100644 mod/pages/views/default/object/page_top.php create mode 100644 mod/pages/views/default/pages/breadcrumbs.php create mode 100644 mod/pages/views/default/pages/css.php create mode 100644 mod/pages/views/default/pages/groupprofile_pages.php create mode 100644 mod/pages/views/default/pages/menu.php create mode 100644 mod/pages/views/default/pages/metatags.php create mode 100644 mod/pages/views/default/pages/pagegallery.php create mode 100644 mod/pages/views/default/pages/pagelisting.php create mode 100644 mod/pages/views/default/pages/pageprofile.php create mode 100644 mod/pages/views/default/pages/sidebar/sidebarthis.php create mode 100644 mod/pages/views/default/pages/sidebar/starter.php create mode 100644 mod/pages/views/default/pages/sidebar/tree.php create mode 100644 mod/pages/views/default/pages/sidebar/wrapper.php create mode 100644 mod/pages/views/default/pages/welcome.php create mode 100644 mod/pages/welcome.php create mode 100644 mod/pages/world.php diff --git a/index.php b/index.php index b6aa50ae1..c9d966b2f 100644 --- a/index.php +++ b/index.php @@ -27,13 +27,13 @@ //Load the front page global $CONFIG; - $title = elgg_view_title($CONFIG->site->title); + $title = elgg_view_title(elgg_echo('content:latest')); set_context('search'); $content = list_registered_entities(); set_context('main'); global $autofeed; $autofeed = false; - $content = elgg_view_layout('two_column_left_sidebar', '', $content, elgg_view("account/forms/login")); + $content = elgg_view_layout('two_column_left_sidebar', '', $title . $content, elgg_view("account/forms/login")); echo page_draw(null, $content); } diff --git a/languages/en.php b/languages/en.php index 35441bed9..b7df82137 100644 --- a/languages/en.php +++ b/languages/en.php @@ -527,6 +527,9 @@ To remove a widget drag it back to the Widget gallery.", 'learnmore' => "Click here to learn more.", + 'content' => "content", + 'content:latest' => 'Latest activity', + /** * Generic data words */ diff --git a/mod/pages/actions/pages/delete.php b/mod/pages/actions/pages/delete.php new file mode 100644 index 000000000..6533ed520 --- /dev/null +++ b/mod/pages/actions/pages/delete.php @@ -0,0 +1,35 @@ +canEdit()) { + + // Bring all child elements forward + $parent = $page->parent_guid; + if ($children = get_entities_from_metadata('parent_guid',$page->getGUID())) { + foreach($children as $child) { + $child->parent_guid = $parent; + } + } + if ($page->delete()) { + system_message(elgg_echo('pages:delete:success')); + if ($parent) { + if ($parent = get_entity($parent)) { + forward($parent->getURL()); + exit; + } + } + forward('pg/pages/owned/' . $_SESSION['user']->username); + exit; + } + + } + + } + + register_error(elgg_echo('pages:delete:failure')); + forward($_SERVER['HTTP_REFERER']); + +?> \ No newline at end of file diff --git a/mod/pages/actions/pages/edit.php b/mod/pages/actions/pages/edit.php new file mode 100644 index 000000000..a34971173 --- /dev/null +++ b/mod/pages/actions/pages/edit.php @@ -0,0 +1,114 @@ +pages as $shortname => $valuetype) { + $input[$shortname] = get_input($shortname); + if ($valuetype == 'tags') + $input[$shortname] = string_to_tag_array($input[$shortname]); + } + + // Get parent + $parent_guid = (int)get_input('parent_guid', 0); + + // New or old? + $page = NULL; + $pages_guid = (int)get_input('pages_guid'); + if ($pages_guid) + { + $page = get_entity($pages_guid); + if (!$page->canEdit()) + $page = NULL; // if we can't edit it, go no further. + } + else + { + $page = new ElggObject(); + if (!$parent_guid) + $page->subtype = 'page_top'; + else + $page->subtype = 'page'; + + // New instance, so set container_guid + $container_guid = get_input('container_guid', $_SESSION['user']->getGUID()); + $page->container_guid = $container_guid; + } + + // Have we got it? Can we edit it? + if ($page instanceof ElggObject) + { + // Yes we have, and yes we can. + + // Save fields - note we always save latest description as both description and annotation + if (sizeof($input) > 0) + { + foreach($input as $shortname => $value) { + if ((!$pages_guid) || (($pages_guid) && ($shortname != 'title'))) + $page->$shortname = $value; + } + } + + + // Validate create + if (!$page->title) + { + register_error(elgg_echo("pages:notitle")); + + forward($_SERVER['HTTP_REFERER']); + exit; + } + + // Access ids + $page->access_id = (int)get_input('access_id', 0); + + // Write access id + $page->write_access_id = (int)get_input('write_access_id', 0); + + // Set parent + $page->parent_guid = $parent_guid; + + // Ensure ultimate owner + $page->owner_guid = ($page->owner_guid ? $page->owner_guid : $_SESSION['user']->guid); + + // finally save + if ($page->save()) + { + + // Now save description as an annotation + $page->annotate('page', $page->description, $page->access_id); + + + system_message(elgg_echo("pages:saved")); + + // Forward to the user's profile + forward($page->getUrl()); + exit; + } + else + register_error(elgg_echo('pages:notsaved')); + + } + else + { + register_error(elgg_echo("pages:noaccess")); + } + + + // Forward to the user's profile + forward($page->getUrl()); + exit; +?> diff --git a/mod/pages/actions/pages/editwelcome.php b/mod/pages/actions/pages/editwelcome.php new file mode 100644 index 000000000..edf0d89f3 --- /dev/null +++ b/mod/pages/actions/pages/editwelcome.php @@ -0,0 +1,77 @@ +getSubtype() == "pages_welcome" && $welcome->canEdit()) { + + $welcome->description = $message; + $welcome->access_id = $access_id; + $welcome->save(); + system_message(elgg_echo("pages:welcomeposted")); + + } else { + + register_error(elgg_echo("pages:welcomeerror")); + + } + + + }else{ + + //it is a new welcome object + if ($owner_guid){ + + $welcome = new ElggObject(); + // Tell the system it's a pages welcome message + $welcome->subtype = "pages_welcome"; + $welcome->title = "Welcome"; + $welcome->description = $message; + $welcome->access_id = $access_id; + + // Set the owner + $welcome->owner_guid = $owner_guid; + + // save + if (!$welcome->save()){ + register_error(elgg_echo("pages:welcomeerror")); + } else { + system_message(elgg_echo("pages:welcomeposted")); + } + + + } else { + + register_error(elgg_echo("pages:welcomeerror")); + + } + + }//end of first if statement + + // Forward to the main blog page + forward("pg/pages/owned/" . get_user($owner_guid)->username); + exit; + +?> \ No newline at end of file diff --git a/mod/pages/edit.php b/mod/pages/edit.php new file mode 100644 index 000000000..c9d12b207 --- /dev/null +++ b/mod/pages/edit.php @@ -0,0 +1,42 @@ +container_guid) { + set_page_owner($container); + } + $page_owner = page_owner_entity(); + if ($page_owner === false || is_null($page_owner)) { + $page_owner = $_SESSION['user']; + set_page_owner($page_owner->getGUID()); + } + + $title = elgg_echo("pages:edit"); + $body = elgg_view_title($title); + + if (($pages) && ($pages->canEdit())) + { + $body .= elgg_view("forms/pages/edit", array('entity' => $pages)); + + } else { + $body .= elgg_echo("pages:noaccess"); + } + + $body = elgg_view_layout('two_column_left_sidebar', '', $body); + + page_draw($title, $body); +?> \ No newline at end of file diff --git a/mod/pages/history.php b/mod/pages/history.php new file mode 100644 index 000000000..135ffe3d2 --- /dev/null +++ b/mod/pages/history.php @@ -0,0 +1,50 @@ +container_guid) { + set_page_owner($pages->container_guid); + } else { + set_page_owner($pages->owner_guid); + } + + $limit = (int)get_input('limit', 20); + $offset = (int)get_input('offset'); + + $page_guid = get_input('page_guid'); + $pages = get_entity($page_guid); + + add_submenu_item(sprintf(elgg_echo("pages:user"), page_owner_entity()->name), $CONFIG->url . "pg/pages/owned/" . page_owner_entity()->username); + + $title = $pages->title . ": " . elgg_echo("pages:history"); + $area2 = elgg_view_title($title); + + $context = get_context(); + + set_context('search'); + + $area2 .= list_annotations($page_guid, 'page', $limit, false); + + set_context($context); + + + pages_set_navigation_parent($pages); + $area3 = elgg_view('pages/sidebar/tree'); + + $body = elgg_view_layout('two_column_left_sidebar', '', $area2, $area3); + + page_draw($title, $body); +?> \ No newline at end of file diff --git a/mod/pages/images/application.png b/mod/pages/images/application.png new file mode 100644 index 000000000..1dee9e366 Binary files /dev/null and b/mod/pages/images/application.png differ diff --git a/mod/pages/images/code.png b/mod/pages/images/code.png new file mode 100644 index 000000000..0c76bd129 Binary files /dev/null and b/mod/pages/images/code.png differ diff --git a/mod/pages/images/css.png b/mod/pages/images/css.png new file mode 100644 index 000000000..f907e44b3 Binary files /dev/null and b/mod/pages/images/css.png differ diff --git a/mod/pages/images/db.png b/mod/pages/images/db.png new file mode 100644 index 000000000..bddba1f98 Binary files /dev/null and b/mod/pages/images/db.png differ diff --git a/mod/pages/images/directory.png b/mod/pages/images/directory.png new file mode 100644 index 000000000..784e8fa48 Binary files /dev/null and b/mod/pages/images/directory.png differ diff --git a/mod/pages/images/doc.png b/mod/pages/images/doc.png new file mode 100644 index 000000000..ae8ecbf47 Binary files /dev/null and b/mod/pages/images/doc.png differ diff --git a/mod/pages/images/file.gif b/mod/pages/images/file.gif new file mode 100644 index 000000000..7e6216798 Binary files /dev/null and b/mod/pages/images/file.gif differ diff --git a/mod/pages/images/file.png b/mod/pages/images/file.png new file mode 100644 index 000000000..8b8b1ca00 Binary files /dev/null and b/mod/pages/images/file.png differ diff --git a/mod/pages/images/film.png b/mod/pages/images/film.png new file mode 100644 index 000000000..b0ce7bb19 Binary files /dev/null and b/mod/pages/images/film.png differ diff --git a/mod/pages/images/flash.png b/mod/pages/images/flash.png new file mode 100644 index 000000000..5769120b1 Binary files /dev/null and b/mod/pages/images/flash.png differ diff --git a/mod/pages/images/folder-closed.gif b/mod/pages/images/folder-closed.gif new file mode 100644 index 000000000..541107888 Binary files /dev/null and b/mod/pages/images/folder-closed.gif differ diff --git a/mod/pages/images/folder.gif b/mod/pages/images/folder.gif new file mode 100644 index 000000000..2b31631ca Binary files /dev/null and b/mod/pages/images/folder.gif differ diff --git a/mod/pages/images/folder_open.png b/mod/pages/images/folder_open.png new file mode 100644 index 000000000..4e3548352 Binary files /dev/null and b/mod/pages/images/folder_open.png differ diff --git a/mod/pages/images/html.png b/mod/pages/images/html.png new file mode 100644 index 000000000..6ed2490ed Binary files /dev/null and b/mod/pages/images/html.png differ diff --git a/mod/pages/images/java.png b/mod/pages/images/java.png new file mode 100644 index 000000000..b7bfcd15f Binary files /dev/null and b/mod/pages/images/java.png differ diff --git a/mod/pages/images/linux.png b/mod/pages/images/linux.png new file mode 100644 index 000000000..52699bfee Binary files /dev/null and b/mod/pages/images/linux.png differ diff --git a/mod/pages/images/minus.gif b/mod/pages/images/minus.gif new file mode 100644 index 000000000..47fb7b767 Binary files /dev/null and b/mod/pages/images/minus.gif differ diff --git a/mod/pages/images/music.png b/mod/pages/images/music.png new file mode 100644 index 000000000..a8b3ede3d Binary files /dev/null and b/mod/pages/images/music.png differ diff --git a/mod/pages/images/pdf.png b/mod/pages/images/pdf.png new file mode 100644 index 000000000..8f8095e46 Binary files /dev/null and b/mod/pages/images/pdf.png differ diff --git a/mod/pages/images/php.png b/mod/pages/images/php.png new file mode 100644 index 000000000..7868a2594 Binary files /dev/null and b/mod/pages/images/php.png differ diff --git a/mod/pages/images/picture.png b/mod/pages/images/picture.png new file mode 100644 index 000000000..4a158fef7 Binary files /dev/null and b/mod/pages/images/picture.png differ diff --git a/mod/pages/images/plus.gif b/mod/pages/images/plus.gif new file mode 100644 index 000000000..690662162 Binary files /dev/null and b/mod/pages/images/plus.gif differ diff --git a/mod/pages/images/ppt.png b/mod/pages/images/ppt.png new file mode 100644 index 000000000..c4eff0387 Binary files /dev/null and b/mod/pages/images/ppt.png differ diff --git a/mod/pages/images/psd.png b/mod/pages/images/psd.png new file mode 100644 index 000000000..73c5b3f24 Binary files /dev/null and b/mod/pages/images/psd.png differ diff --git a/mod/pages/images/ruby.png b/mod/pages/images/ruby.png new file mode 100644 index 000000000..f59b7c436 Binary files /dev/null and b/mod/pages/images/ruby.png differ diff --git a/mod/pages/images/script.png b/mod/pages/images/script.png new file mode 100644 index 000000000..63fe6ceff Binary files /dev/null and b/mod/pages/images/script.png differ diff --git a/mod/pages/images/spinner.gif b/mod/pages/images/spinner.gif new file mode 100644 index 000000000..85b99d46b Binary files /dev/null and b/mod/pages/images/spinner.gif differ diff --git a/mod/pages/images/treeview-black-line.gif b/mod/pages/images/treeview-black-line.gif new file mode 100644 index 000000000..e5496877a Binary files /dev/null and b/mod/pages/images/treeview-black-line.gif differ diff --git a/mod/pages/images/treeview-black.gif b/mod/pages/images/treeview-black.gif new file mode 100644 index 000000000..d549b9fc5 Binary files /dev/null and b/mod/pages/images/treeview-black.gif differ diff --git a/mod/pages/images/treeview-default-line.gif b/mod/pages/images/treeview-default-line.gif new file mode 100644 index 000000000..37114d306 Binary files /dev/null and b/mod/pages/images/treeview-default-line.gif differ diff --git a/mod/pages/images/treeview-default.gif b/mod/pages/images/treeview-default.gif new file mode 100644 index 000000000..a12ac52ff Binary files /dev/null and b/mod/pages/images/treeview-default.gif differ diff --git a/mod/pages/images/treeview-famfamfam-line.gif b/mod/pages/images/treeview-famfamfam-line.gif new file mode 100644 index 000000000..6e289cecc Binary files /dev/null and b/mod/pages/images/treeview-famfamfam-line.gif differ diff --git a/mod/pages/images/treeview-famfamfam.gif b/mod/pages/images/treeview-famfamfam.gif new file mode 100644 index 000000000..0cb178e89 Binary files /dev/null and b/mod/pages/images/treeview-famfamfam.gif differ diff --git a/mod/pages/images/treeview-gray-line.gif b/mod/pages/images/treeview-gray-line.gif new file mode 100644 index 000000000..37600447d Binary files /dev/null and b/mod/pages/images/treeview-gray-line.gif differ diff --git a/mod/pages/images/treeview-gray.gif b/mod/pages/images/treeview-gray.gif new file mode 100644 index 000000000..cfb8a2f09 Binary files /dev/null and b/mod/pages/images/treeview-gray.gif differ diff --git a/mod/pages/images/treeview-red-line.gif b/mod/pages/images/treeview-red-line.gif new file mode 100644 index 000000000..df9e749a8 Binary files /dev/null and b/mod/pages/images/treeview-red-line.gif differ diff --git a/mod/pages/images/treeview-red.gif b/mod/pages/images/treeview-red.gif new file mode 100644 index 000000000..3bbb3a157 Binary files /dev/null and b/mod/pages/images/treeview-red.gif differ diff --git a/mod/pages/images/txt.png b/mod/pages/images/txt.png new file mode 100644 index 000000000..813f712f7 Binary files /dev/null and b/mod/pages/images/txt.png differ diff --git a/mod/pages/images/xls.png b/mod/pages/images/xls.png new file mode 100644 index 000000000..b977d7e52 Binary files /dev/null and b/mod/pages/images/xls.png differ diff --git a/mod/pages/images/zip.png b/mod/pages/images/zip.png new file mode 100644 index 000000000..fd4bbccdf Binary files /dev/null and b/mod/pages/images/zip.png differ diff --git a/mod/pages/index.php b/mod/pages/index.php new file mode 100644 index 000000000..ea0b8c3f6 --- /dev/null +++ b/mod/pages/index.php @@ -0,0 +1,55 @@ +name), $CONFIG->url . "pg/pages/owned/" . page_owner_entity()->username); + add_submenu_item(elgg_echo('pages:all'),$CONFIG->wwwroot."mod/pages/world.php"); + if (($owner) && ($owner->canWriteToContainer($_SESSION['user']))){ + add_submenu_item(elgg_echo('pages:new'), $CONFIG->url . "pg/pages/new/?container_guid=" . page_owner()); + add_submenu_item(elgg_echo('pages:welcome'), $CONFIG->url . "pg/pages/welcome/"); + } + + + $limit = get_input("limit", 10); + $offset = get_input("offset", 0); + + if($owner instanceof ElggGroup){ + $title = sprintf(elgg_echo("pages:group"),$owner->name); + }else{ + $title = sprintf(elgg_echo("pages:user"),$owner->name); + } + + + // Get objects + $context = get_context(); + + set_context('search'); + + $objects = list_entities("object", "page_top", page_owner(), $limit, false); + + set_context($context); + + //get the owners latest welcome message + $welcome_message = get_entities("object", "pages_welcome", $owner->guid, '', 1); + + $body = elgg_view_title($title); + $body .= elgg_view("pages/welcome", array('entity' => $welcome_message)); + $body .= $objects; + $body = elgg_view_layout('two_column_left_sidebar', '', $body); + + // Finally draw the page + page_draw($title, $body); +?> \ No newline at end of file diff --git a/mod/pages/javascript/jquery.treeview.async.js b/mod/pages/javascript/jquery.treeview.async.js new file mode 100644 index 000000000..01059191f --- /dev/null +++ b/mod/pages/javascript/jquery.treeview.async.js @@ -0,0 +1,72 @@ +/* + * Async Treeview 0.1 - Lazy-loading extension for Treeview + * + * http://bassistance.de/jquery-plugins/jquery-plugin-treeview/ + * + * Copyright (c) 2007 Jörn Zaefferer + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + * Revision: $Id$ + * + */ + +;(function($) { + +function load(settings, root, child, container) { + $.getJSON(settings.url, {root: root, currentpage: settings.currentpage}, function(response) { + function createNode(parent) { + var current = $("
  • ").attr("id", this.id || "").html("" + this.text + "").appendTo(parent); + if (this.classes) { + current.children("span").addClass(this.classes); + } + if (this.expanded) { + current.addClass("open"); + } + if (this.hasChildren || this.children && this.children.length) { + var branch = $("