aboutsummaryrefslogtreecommitdiff
path: root/views/default/page
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/page')
-rw-r--r--views/default/page/admin.php66
-rw-r--r--views/default/page/components/gallery.php77
-rw-r--r--views/default/page/components/image_block.php52
-rw-r--r--views/default/page/components/list.php75
-rw-r--r--views/default/page/components/module.php48
-rw-r--r--views/default/page/components/summary.php4
-rw-r--r--views/default/page/default.php76
-rw-r--r--views/default/page/elements/body.php8
-rw-r--r--views/default/page/elements/comments.php42
-rw-r--r--views/default/page/elements/comments_block.php45
-rw-r--r--views/default/page/elements/content.php14
-rw-r--r--views/default/page/elements/content_header.php94
-rw-r--r--views/default/page/elements/content_header_member.php24
-rw-r--r--views/default/page/elements/foot.php11
-rw-r--r--views/default/page/elements/footer.php21
-rw-r--r--views/default/page/elements/head.php81
-rw-r--r--views/default/page/elements/header.php30
-rw-r--r--views/default/page/elements/header_logo.php6
-rw-r--r--views/default/page/elements/html_begin.php93
-rw-r--r--views/default/page/elements/html_end.php11
-rw-r--r--views/default/page/elements/messages.php17
-rw-r--r--views/default/page/elements/owner_block.php31
-rw-r--r--views/default/page/elements/shortcut_icon.php6
-rw-r--r--views/default/page/elements/sidebar.php32
-rw-r--r--views/default/page/elements/sidebar_alt.php12
-rw-r--r--views/default/page/elements/tagcloud_block.php58
-rw-r--r--views/default/page/elements/title.php14
-rw-r--r--views/default/page/elements/topbar.php67
-rw-r--r--views/default/page/elements/wrapper.php22
-rw-r--r--views/default/page/error.php14
-rw-r--r--views/default/page/layouts/admin.php40
-rw-r--r--views/default/page/layouts/content.php53
-rw-r--r--views/default/page/layouts/content/filter.php52
-rw-r--r--views/default/page/layouts/content/footer.php8
-rw-r--r--views/default/page/layouts/content/header.php43
-rw-r--r--views/default/page/layouts/content/sidebar.php8
-rw-r--r--views/default/page/layouts/default.php18
-rw-r--r--views/default/page/layouts/error.php12
-rw-r--r--views/default/page/layouts/one_column.php38
-rw-r--r--views/default/page/layouts/one_sidebar.php48
-rw-r--r--views/default/page/layouts/two_column_left_sidebar.php26
-rw-r--r--views/default/page/layouts/two_sidebar.php43
-rw-r--r--views/default/page/layouts/walled_garden.php16
-rw-r--r--views/default/page/layouts/widgets.php62
-rw-r--r--views/default/page/layouts/widgets/add_button.php16
-rw-r--r--views/default/page/layouts/widgets/add_panel.php62
-rw-r--r--views/default/page/shells/admin.php19
-rw-r--r--views/default/page/shells/default.php27
-rw-r--r--views/default/page/shells/upgrade.php22
-rw-r--r--views/default/page/shells/walled_garden.php281
-rw-r--r--views/default/page/upgrade.php18
-rw-r--r--views/default/page/walled_garden.php40
52 files changed, 1409 insertions, 694 deletions
diff --git a/views/default/page/admin.php b/views/default/page/admin.php
new file mode 100644
index 000000000..7045edd91
--- /dev/null
+++ b/views/default/page/admin.php
@@ -0,0 +1,66 @@
+<?php
+/**
+ * Elgg pageshell for the admin area
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['title'] The page title
+ * @uses $vars['body'] The main content of the page
+ * @uses $vars['sysmessages'] A 2d array of various message registers, passed from system_messages()
+ */
+
+$notices_html = '';
+$notices = elgg_get_admin_notices();
+if ($notices) {
+ foreach ($notices as $notice) {
+ $notices_html .= elgg_view_entity($notice);
+ }
+
+ $notices_html = "<div class=\"elgg-admin-notices\">$notices_html</div>";
+}
+
+// render content before head so that JavaScript and CSS can be loaded. See #4032
+$messages = elgg_view('page/elements/messages', array('object' => $vars['sysmessages']));
+$header = elgg_view('admin/header', $vars);
+$body = $vars['body'];
+$footer = elgg_view('admin/footer', $vars);
+
+
+// Set the content type
+header("Content-type: text/html; charset=UTF-8");
+
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<?php echo elgg_view('page/elements/head', $vars); ?>
+</head>
+<body>
+ <div class="elgg-page elgg-page-admin">
+ <div class="elgg-inner">
+ <div class="elgg-page-header">
+ <div class="elgg-inner clearfix">
+ <?php echo $header; ?>
+ </div>
+ </div>
+ <div class="elgg-page-messages">
+ <?php echo $messages; ?>
+ <?php echo $notices_html; ?>
+ </div>
+ <div class="elgg-page-body">
+ <div class="elgg-inner">
+ <?php echo $body; ?>
+ </div>
+ </div>
+ <div class="elgg-page-footer">
+ <div class="elgg-inner">
+ <?php echo $footer; ?>
+ </div>
+ </div>
+ </div>
+ </div>
+ <?php echo elgg_view('page/elements/foot'); ?>
+</body>
+
+</html> \ No newline at end of file
diff --git a/views/default/page/components/gallery.php b/views/default/page/components/gallery.php
new file mode 100644
index 000000000..e8b3f477e
--- /dev/null
+++ b/views/default/page/components/gallery.php
@@ -0,0 +1,77 @@
+<?php
+/**
+ * Gallery view
+ *
+ * Implemented as an unorder list
+ *
+ * @uses $vars['items'] Array of ElggEntity or ElggAnnotation objects
+ * @uses $vars['offset'] Index of the first list item in complete list
+ * @uses $vars['limit'] Number of items per page
+ * @uses $vars['count'] Number of items in the complete list
+ * @uses $vars['pagination'] Show pagination? (default: true)
+ * @uses $vars['position'] Position of the pagination: before, after, or both
+ * @uses $vars['full_view'] Show the full view of the items (default: false)
+ * @uses $vars['gallery_class'] Additional CSS class for the <ul> element
+ * @uses $vars['item_class'] Additional CSS class for the <li> elements
+ */
+
+$items = $vars['items'];
+if (!is_array($items) || sizeof($items) == 0) {
+ return true;
+}
+
+elgg_push_context('gallery');
+
+$offset = $vars['offset'];
+$limit = $vars['limit'];
+$count = $vars['count'];
+$pagination = elgg_extract('pagination', $vars, true);
+$offset_key = elgg_extract('offset_key', $vars, 'offset');
+$position = elgg_extract('position', $vars, 'after');
+
+$gallery_class = 'elgg-gallery';
+if (isset($vars['gallery_class'])) {
+ $gallery_class = "$gallery_class {$vars['gallery_class']}";
+}
+
+$item_class = 'elgg-item';
+if (isset($vars['item_class'])) {
+ $item_class = "$item_class {$vars['item_class']}";
+}
+
+$nav = '';
+if ($pagination && $count) {
+ $nav .= elgg_view('navigation/pagination', array(
+ 'offset' => $offset,
+ 'count' => $count,
+ 'limit' => $limit,
+ 'offset_key' => $offset_key,
+ ));
+}
+
+if ($position == 'before' || $position == 'both') {
+ echo $nav;
+}
+
+?>
+<ul class="<?php echo $gallery_class; ?>">
+ <?php
+ foreach ($items as $item) {
+ if (elgg_instanceof($item)) {
+ $id = "elgg-{$item->getType()}-{$item->getGUID()}";
+ } else {
+ $id = "item-{$item->getType()}-{$item->id}";
+ }
+ echo "<li id=\"$id\" class=\"$item_class\">";
+ echo elgg_view_list_item($item, $vars);
+ echo "</li>";
+ }
+ ?>
+</ul>
+
+<?php
+if ($position == 'after' || $position == 'both') {
+ echo $nav;
+}
+
+elgg_pop_context();
diff --git a/views/default/page/components/image_block.php b/views/default/page/components/image_block.php
new file mode 100644
index 000000000..a7f480aef
--- /dev/null
+++ b/views/default/page/components/image_block.php
@@ -0,0 +1,52 @@
+<?php
+/**
+ * Elgg image block pattern
+ *
+ * Common pattern where there is an image, icon, media object to the left
+ * and a descriptive block of text to the right.
+ *
+ * ---------------------------------------------------------------
+ * | | | alt |
+ * | image | body | image |
+ * | block | block | block |
+ * | | | (optional)|
+ * ---------------------------------------------------------------
+ *
+ * @uses $vars['body'] HTML content of the body block
+ * @uses $vars['image'] HTML content of the image block
+ * @uses $vars['image_alt'] HTML content of the alternate image block
+ * @uses $vars['class'] Optional additional class for media element
+ * @uses $vars['id'] Optional id for the media element
+ */
+
+$body = elgg_extract('body', $vars, '');
+$image = elgg_extract('image', $vars, '');
+$alt_image = elgg_extract('image_alt', $vars, '');
+
+$class = 'elgg-image-block';
+$additional_class = elgg_extract('class', $vars, '');
+if ($additional_class) {
+ $class = "$class $additional_class";
+}
+
+$id = '';
+if (isset($vars['id'])) {
+ $id = "id=\"{$vars['id']}\"";
+}
+
+
+$body = "<div class=\"elgg-body\">$body</div>";
+
+if ($image) {
+ $image = "<div class=\"elgg-image\">$image</div>";
+}
+
+if ($alt_image) {
+ $alt_image = "<div class=\"elgg-image-alt\">$alt_image</div>";
+}
+
+echo <<<HTML
+<div class="$class clearfix" $id>
+ $image$alt_image$body
+</div>
+HTML;
diff --git a/views/default/page/components/list.php b/views/default/page/components/list.php
new file mode 100644
index 000000000..28ed58ddf
--- /dev/null
+++ b/views/default/page/components/list.php
@@ -0,0 +1,75 @@
+<?php
+/**
+ * View a list of items
+ *
+ * @package Elgg
+ *
+ * @uses $vars['items'] Array of ElggEntity or ElggAnnotation objects
+ * @uses $vars['offset'] Index of the first list item in complete list
+ * @uses $vars['limit'] Number of items per page. Only used as input to pagination.
+ * @uses $vars['count'] Number of items in the complete list
+ * @uses $vars['base_url'] Base URL of list (optional)
+ * @uses $vars['pagination'] Show pagination? (default: true)
+ * @uses $vars['position'] Position of the pagination: before, after, or both
+ * @uses $vars['full_view'] Show the full view of the items (default: false)
+ * @uses $vars['list_class'] Additional CSS class for the <ul> element
+ * @uses $vars['item_class'] Additional CSS class for the <li> elements
+ */
+
+$items = $vars['items'];
+$offset = elgg_extract('offset', $vars);
+$limit = elgg_extract('limit', $vars);
+$count = elgg_extract('count', $vars);
+$base_url = elgg_extract('base_url', $vars, '');
+$pagination = elgg_extract('pagination', $vars, true);
+$offset_key = elgg_extract('offset_key', $vars, 'offset');
+$position = elgg_extract('position', $vars, 'after');
+
+$list_class = 'elgg-list';
+if (isset($vars['list_class'])) {
+ $list_class = "$list_class {$vars['list_class']}";
+}
+
+$item_class = 'elgg-item';
+if (isset($vars['item_class'])) {
+ $item_class = "$item_class {$vars['item_class']}";
+}
+
+$html = "";
+$nav = "";
+
+if ($pagination && $count) {
+ $nav .= elgg_view('navigation/pagination', array(
+ 'base_url' => $base_url,
+ 'offset' => $offset,
+ 'count' => $count,
+ 'limit' => $limit,
+ 'offset_key' => $offset_key,
+ ));
+}
+
+if (is_array($items) && count($items) > 0) {
+ $html .= "<ul class=\"$list_class\">";
+ foreach ($items as $item) {
+ $li = elgg_view_list_item($item, $vars);
+ if ($li) {
+ if (elgg_instanceof($item)) {
+ $id = "elgg-{$item->getType()}-{$item->getGUID()}";
+ } else {
+ $id = "item-{$item->getType()}-{$item->id}";
+ }
+ $html .= "<li id=\"$id\" class=\"$item_class\">$li</li>";
+ }
+ }
+ $html .= '</ul>';
+}
+
+if ($position == 'before' || $position == 'both') {
+ $html = $nav . $html;
+}
+
+if ($position == 'after' || $position == 'both') {
+ $html .= $nav;
+}
+
+echo $html;
diff --git a/views/default/page/components/module.php b/views/default/page/components/module.php
new file mode 100644
index 000000000..7e1eaff20
--- /dev/null
+++ b/views/default/page/components/module.php
@@ -0,0 +1,48 @@
+<?php
+/**
+ * Elgg module element
+ *
+ * @uses $vars['title'] Optional title text (do not pass header with this option)
+ * @uses $vars['header'] Optional HTML content of the header
+ * @uses $vars['body'] HTML content of the body
+ * @uses $vars['footer'] Optional HTML content of the footer
+ * @uses $vars['class'] Optional additional class for module
+ * @uses $vars['id'] Optional id for module
+ * @uses $vars['show_inner'] Optional flag to leave out inner div (default: false)
+ */
+
+$title = elgg_extract('title', $vars, '');
+$header = elgg_extract('header', $vars, '');
+$body = elgg_extract('body', $vars, '');
+$footer = elgg_extract('footer', $vars, '');
+$show_inner = elgg_extract('show_inner', $vars, false);
+
+$class = 'elgg-module';
+$additional_class = elgg_extract('class', $vars, '');
+if ($additional_class) {
+ $class = "$class $additional_class";
+}
+
+$id = '';
+if (isset($vars['id'])) {
+ $id = "id=\"{$vars['id']}\"";
+}
+
+if (isset($vars['header'])) {
+ $header = "<div class=\"elgg-head\">$header</div>";
+} elseif ($title) {
+ $header = "<div class=\"elgg-head\"><h3>$title</h3></div>";
+}
+
+$body = "<div class=\"elgg-body\">$body</div>";
+
+if ($footer) {
+ $footer = "<div class=\"elgg-foot\">$footer</div>";
+}
+
+$contents = $header . $body . $footer;
+if ($show_inner) {
+ $contents = "<div class=\"elgg-inner\">$contents</div>";
+}
+
+echo "<div class=\"$class\" $id>$contents</div>";
diff --git a/views/default/page/components/summary.php b/views/default/page/components/summary.php
new file mode 100644
index 000000000..ea61a6e4b
--- /dev/null
+++ b/views/default/page/components/summary.php
@@ -0,0 +1,4 @@
+<?php
+
+// Deprecated in favor of type/elements/summary
+echo elgg_view('object/elements/summary', $vars);
diff --git a/views/default/page/default.php b/views/default/page/default.php
new file mode 100644
index 000000000..567494d0c
--- /dev/null
+++ b/views/default/page/default.php
@@ -0,0 +1,76 @@
+<?php
+/**
+ * Elgg pageshell
+ * The standard HTML page shell that everything else fits into
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['title'] The page title
+ * @uses $vars['body'] The main content of the page
+ * @uses $vars['sysmessages'] A 2d array of various message registers, passed from system_messages()
+ */
+
+// backward compatability support for plugins that are not using the new approach
+// of routing through admin. See reportedcontent plugin for a simple example.
+if (elgg_get_context() == 'admin') {
+ if (get_input('handler') != 'admin') {
+ elgg_deprecated_notice("admin plugins should route through 'admin'.", 1.8);
+ }
+ elgg_admin_add_plugin_settings_menu();
+ elgg_unregister_css('elgg');
+ echo elgg_view('page/admin', $vars);
+ return true;
+}
+
+// render content before head so that JavaScript and CSS can be loaded. See #4032
+$topbar = elgg_view('page/elements/topbar', $vars);
+$messages = elgg_view('page/elements/messages', array('object' => $vars['sysmessages']));
+$header = elgg_view('page/elements/header', $vars);
+$body = elgg_view('page/elements/body', $vars);
+$footer = elgg_view('page/elements/footer', $vars);
+
+// Set the content type
+header("Content-type: text/html; charset=UTF-8");
+
+$lang = get_current_language();
+
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $lang; ?>" lang="<?php echo $lang; ?>">
+<head>
+<?php echo elgg_view('page/elements/head', $vars); ?>
+</head>
+<body>
+<div class="elgg-page elgg-page-default">
+ <div class="elgg-page-messages">
+ <?php echo $messages; ?>
+ </div>
+
+ <?php if (elgg_is_logged_in()){ ?>
+ <div class="elgg-page-topbar">
+ <div class="elgg-inner">
+ <?php echo $topbar; ?>
+ </div>
+ </div>
+ <?php } ?>
+
+ <div class="elgg-page-header">
+ <div class="elgg-inner">
+ <?php echo $header; ?>
+ </div>
+ </div>
+ <div class="elgg-page-body">
+ <div class="elgg-inner">
+ <?php echo $body; ?>
+ </div>
+ </div>
+ <div class="elgg-page-footer">
+ <div class="elgg-inner">
+ <?php echo $footer; ?>
+ </div>
+ </div>
+</div>
+<?php echo elgg_view('page/elements/foot'); ?>
+</body>
+</html> \ No newline at end of file
diff --git a/views/default/page/elements/body.php b/views/default/page/elements/body.php
index 6f7691693..14c3978d3 100644
--- a/views/default/page/elements/body.php
+++ b/views/default/page/elements/body.php
@@ -5,10 +5,4 @@
* @uses $vars['body'] The HTML of the page body
*/
-$body = elgg_get_array_value('body', $vars, '');
-
-echo <<<HTML
-<div class="elgg-page-body">
- $body
-</div>
-HTML;
+echo elgg_extract('body', $vars, ''); \ No newline at end of file
diff --git a/views/default/page/elements/comments.php b/views/default/page/elements/comments.php
new file mode 100644
index 000000000..97cb9574e
--- /dev/null
+++ b/views/default/page/elements/comments.php
@@ -0,0 +1,42 @@
+<?php
+/**
+ * List comments with optional add form
+ *
+ * @uses $vars['entity'] ElggEntity
+ * @uses $vars['show_add_form'] Display add form or not
+ * @uses $vars['id'] Optional id for the div
+ * @uses $vars['class'] Optional additional class for the div
+ */
+
+$show_add_form = elgg_extract('show_add_form', $vars, true);
+
+$id = '';
+if (isset($vars['id'])) {
+ $id = "id=\"{$vars['id']}\"";
+}
+
+$class = 'elgg-comments';
+if (isset($vars['class'])) {
+ $class = "$class {$vars['class']}";
+}
+
+// work around for deprecation code in elgg_view()
+unset($vars['internalid']);
+
+echo "<div $id class=\"$class\">";
+
+$options = array(
+ 'guid' => $vars['entity']->getGUID(),
+ 'annotation_name' => 'generic_comment'
+);
+$html = elgg_list_annotations($options);
+if ($html) {
+ echo '<h3>' . elgg_echo('comments') . '</h3>';
+ echo $html;
+}
+
+if ($show_add_form) {
+ echo elgg_view_form('comments/add', array(), $vars);
+}
+
+echo '</div>';
diff --git a/views/default/page/elements/comments_block.php b/views/default/page/elements/comments_block.php
new file mode 100644
index 000000000..d0f8ab809
--- /dev/null
+++ b/views/default/page/elements/comments_block.php
@@ -0,0 +1,45 @@
+<?php
+/**
+ * Display the latest related comments
+ *
+ * Generally used in a sidebar. Does not work with groups currently.
+ *
+ * @uses $vars['subtypes'] Object subtype string or array of subtypes
+ * @uses $vars['owner_guid'] The owner of the content being commented on
+ * @uses $vars['limit'] The number of comments to display
+ */
+
+$owner_guid = elgg_extract('owner_guid', $vars, ELGG_ENTITIES_ANY_VALUE);
+if (!$owner_guid) {
+ $owner_guid = ELGG_ENTITIES_ANY_VALUE;
+}
+
+$owner_entity = get_entity($owner_guid);
+if ($owner_entity && elgg_instanceof($owner_entity, 'group')) {
+ // not supporting groups so return
+ return true;
+}
+
+$options = array(
+ 'annotation_name' => 'generic_comment',
+ 'owner_guid' => $owner_guid,
+ 'reverse_order_by' => true,
+ 'limit' => elgg_extract('limit', $vars, 4),
+ 'type' => 'object',
+ 'subtypes' => elgg_extract('subtypes', $vars, ELGG_ENTITIES_ANY_VALUE),
+);
+
+$title = elgg_echo('generic_comments:latest');
+$comments = elgg_get_annotations($options);
+if ($comments) {
+ $body = elgg_view('page/components/list', array(
+ 'items' => $comments,
+ 'pagination' => false,
+ 'list_class' => 'elgg-latest-comments',
+ 'full_view' => false,
+ ));
+} else {
+ $body = '<p>' . elgg_echo('generic_comment:none') . '</p>';
+}
+
+echo elgg_view_module('aside', $title, $body);
diff --git a/views/default/page/elements/content.php b/views/default/page/elements/content.php
deleted file mode 100644
index f82720c2f..000000000
--- a/views/default/page/elements/content.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
-/**
- * Elgg content wrapper
- *
- * @uses $vars['body'] The main content HTML
- */
-
-$body = elgg_get_array_value('body', $vars, '');
-
-echo <<<HTML
-<div class="elgg-page-body">
- $body
-</div>
-HTML;
diff --git a/views/default/page/elements/content_header.php b/views/default/page/elements/content_header.php
deleted file mode 100644
index 8809ad8b7..000000000
--- a/views/default/page/elements/content_header.php
+++ /dev/null
@@ -1,94 +0,0 @@
-<?php
-/**
- * Displays the Add New button, and the All, Mine, My Friends tabs for plugins
- * If a user is not logged in, this only displays the All tab.
- * If this is in a group context, it doesn't display any tabs
- *
- * @uses string $vars['type'] The section type. Should be the same as the page handler. Used for generating URLs.
- * @uses string $vars['context'] Which filter we're looking at: all, mine, friends, or action. Nothing to do with get_context().
- *
- * @uses string $vars['all_link'] Optional. The URL to use for the "All" tab link. Defaults to mod/$type/all.php
- * @uses string $vars['mine_link'] Optional. The URL to use for the "Mine" tab link. Defaults to pg/$type/$username
- * @uses string $vars['friends_link'] Optional. The URL to use for the "Friends" tab link. Defaults to pg/$type/$username/friends
- * @uses string $vars['new_link'] Optional. The URL to use for the "New" button. Defaults to pg/$type/$username/new
- * @uses array $vars['tabs'] Optional. Override all tab generation. See view:navgiation/tabs for formatting
- *
- * @package Elgg
- * @subpackage Core
- */
-
-$page_owner = elgg_get_page_owner();
-$logged_in_user = get_loggedin_user();
-$username = $logged_in_user->username;
-
-if (!$page_owner) {
- $page_owner = $logged_in_user;
-}
-
-// so we know if the user is looking at their own, everyone's or all friends
-$filter_context = $vars['context'];
-
-// get the object type
-$type = $vars['type'];
-
-// create an empty string to start with
-$new_button = '';
-
-// generate a list of default tabs
-$default_tabs = array(
- 'all' => array(
- 'title' => elgg_echo('all'),
- 'url' => (isset($vars['all_link'])) ? $vars['all_link'] : "mod/$type/all.php",
- 'selected' => ($filter_context == 'everyone'),
- ),
- 'mine' => array(
- 'title' => elgg_echo('mine'),
- 'url' => (isset($vars['mine_link'])) ? $vars['mine_link'] : "pg/$type/$username",
- 'selected' => ($filter_context == 'mine'),
- ),
- 'friend' => array(
- 'title' => elgg_echo('friends'),
- 'url' => (isset($vars['friend_link'])) ? $vars['friend_link'] : "pg/$type/$username/friends",
- 'selected' => ($filter_context == 'friends'),
- ),
-);
-
-// determine if using default or overwritten tabs
-$tabs = (isset($vars['tabs'])) ? $vars['tabs'] : $default_tabs;
-$tab_list = elgg_view('navigation/tabs', array('tabs' => $tabs));
-
-$title = elgg_echo($type);
-$title = '<div class="content-header-title">' . elgg_view_title($title) . '</div>';
-
-// must be logged in to see any action buttons
-if (isloggedin()) {
- // only show the new button when not on the add form.
- // hide the tabs when on the add form.
- if ($filter_context == 'action') {
- $tab_list = '';
- } else {
- // @todo remove the hard coded reference to the videolist plugin
- if (elgg_get_context() == "videolist"){
- $video_link = elgg_get_site_url() . "pg/videolist/browse/$username/";
- $new_button = "<a href=\"{$video_link}\" class='action-button'>" . elgg_echo('videolist:browsemenu') . '</a>';
- } else {
- $new_link = elgg_normalize_url((isset($vars['new_link'])) ? $vars['new_link'] : "pg/$type/$username/new");
- $new_button = "<a href=\"{$new_link}\" class='action-button'>" . elgg_echo($type . ':new') . '</a>';
- }
- $new_button = "<div class='content-header-options'>$new_button</div>";
- }
-
- // also hide the tabs if in a group context (ie, listing groups) or
- // when viewing tools belonging to a group
- if (elgg_get_context() == 'groups' || $page_owner instanceof ElggGroup) {
- $tab_list = '';
- }
-}
-
-echo <<<HTML
-<div id="content-header" class="clearfix">
- $title $new_button
-</div>
-HTML;
-
-echo $tab_list;
diff --git a/views/default/page/elements/content_header_member.php b/views/default/page/elements/content_header_member.php
deleted file mode 100644
index 4cfee9258..000000000
--- a/views/default/page/elements/content_header_member.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-/**
- * When looking at a users blog, bookmarks, video etc only show
- * the users name and the tool you are viewing
- *
- * @package Elgg
- * @subpackage Core
- *
- */
-
-$page_owner = elgg_get_page_owner();
-$name = elgg_get_page_owner()->name;
-
-// get the object type
-$type = $vars['type'];
-
-$title = elgg_echo($type);
-$title = $name . "'s " . $type;
-?>
-
-<div id="content-header" class="clearfix">
- <?php echo '<div class="content-header-title">' . elgg_view_title($title) . '</div>'; ?>
-</div>
-
diff --git a/views/default/page/elements/foot.php b/views/default/page/elements/foot.php
new file mode 100644
index 000000000..a56b373b4
--- /dev/null
+++ b/views/default/page/elements/foot.php
@@ -0,0 +1,11 @@
+<?php
+
+echo elgg_view('footer/analytics');
+
+$js = elgg_get_loaded_js('footer');
+foreach ($js as $script) { ?>
+ <script type="text/javascript" src="<?php echo $script; ?>"></script>
+<?php
+}
+
+?> \ No newline at end of file
diff --git a/views/default/page/elements/footer.php b/views/default/page/elements/footer.php
index 4a8220312..ded2cea9a 100644
--- a/views/default/page/elements/footer.php
+++ b/views/default/page/elements/footer.php
@@ -8,14 +8,15 @@
*
*/
-?>
-<div class="elgg-page-footer">
- <div class="elgg-inner clearfix">
- <?php echo elgg_view('footer/links'); ?>
- <a href="http://www.elgg.org" class="right">
- <img src="<?php echo elgg_get_site_url(); ?>_graphics/powered_by_elgg_badge_drk_bckgnd.gif" alt="Powered by Elgg" />
- </a>
- </div>
-</div>
+echo elgg_view_menu('footer', array('sort_by' => 'priority', 'class' => 'elgg-menu-hz'));
-<?php echo elgg_view('footer/analytics'); ?>
+$powered_url = elgg_get_site_url() . "_graphics/powered_by_elgg_badge_drk_bckgnd.gif";
+
+echo '<div class="mts clearfloat float-alt">';
+echo elgg_view('output/url', array(
+ 'href' => 'http://elgg.org',
+ 'text' => "<img src=\"$powered_url\" alt=\"Powered by Elgg\" width=\"106\" height=\"15\" />",
+ 'class' => '',
+ 'is_trusted' => true,
+));
+echo '</div>';
diff --git a/views/default/page/elements/head.php b/views/default/page/elements/head.php
new file mode 100644
index 000000000..d4a95b4d0
--- /dev/null
+++ b/views/default/page/elements/head.php
@@ -0,0 +1,81 @@
+<?php
+/**
+ * The standard HTML head
+ *
+ * @uses $vars['title'] The page title
+ */
+
+// Set title
+if (empty($vars['title'])) {
+ $title = elgg_get_config('sitename');
+} else {
+ $title = elgg_get_config('sitename') . ": " . $vars['title'];
+}
+
+global $autofeed;
+if (isset($autofeed) && $autofeed == true) {
+ $url = current_page_url();
+ if (substr_count($url,'?')) {
+ $url .= "&view=rss";
+ } else {
+ $url .= "?view=rss";
+ }
+ $url = elgg_format_url($url);
+ $feedref = <<<END
+
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="{$url}" />
+
+END;
+} else {
+ $feedref = "";
+}
+
+$js = elgg_get_loaded_js('head');
+$css = elgg_get_loaded_css();
+
+$version = get_version();
+$release = get_version(true);
+?>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta name="ElggRelease" content="<?php echo $release; ?>" />
+ <meta name="ElggVersion" content="<?php echo $version; ?>" />
+ <title><?php echo $title; ?></title>
+ <?php echo elgg_view('page/elements/shortcut_icon', $vars); ?>
+
+<?php foreach ($css as $link) { ?>
+ <link rel="stylesheet" href="<?php echo $link; ?>" type="text/css" />
+<?php } ?>
+
+<?php
+ $ie_url = elgg_get_simplecache_url('css', 'ie');
+ $ie7_url = elgg_get_simplecache_url('css', 'ie7');
+ $ie6_url = elgg_get_simplecache_url('css', 'ie6');
+?>
+ <!--[if gt IE 7]>
+ <link rel="stylesheet" type="text/css" href="<?php echo $ie_url; ?>" />
+ <![endif]-->
+ <!--[if IE 7]>
+ <link rel="stylesheet" type="text/css" href="<?php echo $ie7_url; ?>" />
+ <![endif]-->
+ <!--[if IE 6]>
+ <link rel="stylesheet" type="text/css" href="<?php echo $ie6_url; ?>" />
+ <![endif]-->
+
+<?php foreach ($js as $script) { ?>
+ <script type="text/javascript" src="<?php echo $script; ?>"></script>
+<?php } ?>
+
+<script type="text/javascript">
+// <![CDATA[
+ <?php echo elgg_view('js/initialize_elgg'); ?>
+// ]]>
+</script>
+
+<?php
+echo $feedref;
+
+$metatags = elgg_view('metatags', $vars);
+if ($metatags) {
+ elgg_deprecated_notice("The metatags view has been deprecated. Extend page/elements/head instead", 1.8);
+ echo $metatags;
+}
diff --git a/views/default/page/elements/header.php b/views/default/page/elements/header.php
index 0cedd33e2..1a1f5d211 100644
--- a/views/default/page/elements/header.php
+++ b/views/default/page/elements/header.php
@@ -1,24 +1,14 @@
<?php
/**
- * Elgg header contents
- * This file holds the header output that a user will see
- **/
+ * Elgg page header
+ * In the default theme, the header lives between the topbar and main content area.
+ */
-?>
-<div class="elgg-page-header">
- <div class="elgg-inner">
- <?php
- // link back to main site.
- echo elgg_view('page/elements/header_logo', $vars);
-
- // drop-down login
- echo elgg_view('core/account/login_dropdown');
-
- // insert site-wide navigation
- echo elgg_view('navigation/site_nav');
+// link back to main site.
+echo elgg_view('page/elements/header_logo', $vars);
- // insert a view which can be extended
- echo elgg_view('header/extend');
- ?>
- </div>
-</div>
+// drop-down login
+echo elgg_view('core/account/login_dropdown');
+
+// insert site-wide navigation
+echo elgg_view_menu('site'); \ No newline at end of file
diff --git a/views/default/page/elements/header_logo.php b/views/default/page/elements/header_logo.php
index 45bb9cc16..7fe721c40 100644
--- a/views/default/page/elements/header_logo.php
+++ b/views/default/page/elements/header_logo.php
@@ -1,13 +1,15 @@
<?php
/**
* Elgg header logo
- * The logo to display in elgg-header.
*/
$site = elgg_get_site_entity();
$site_name = $site->name;
+$site_url = elgg_get_site_url();
?>
<h1>
- <a href="<?php echo elgg_get_site_url(); ?>"><?php echo $site_name; ?></a>
+ <a class="elgg-heading-site" href="<?php echo $site_url; ?>">
+ <?php echo $site_name; ?>
+ </a>
</h1>
diff --git a/views/default/page/elements/html_begin.php b/views/default/page/elements/html_begin.php
deleted file mode 100644
index 29f7d893f..000000000
--- a/views/default/page/elements/html_begin.php
+++ /dev/null
@@ -1,93 +0,0 @@
-<?php
-/**
- * Start html output.
- * The standard HTML header that displays across the site
- *
- * @uses $vars['config'] The site configuration settings, imported
- * @uses $vars['title'] The page title
- * @uses $vars['body'] The main content of the page
- */
-
-// Set title
-if (empty($vars['title'])) {
- $title = $vars['config']->sitename;
-} else if (empty($vars['config']->sitename)) {
- $title = $vars['title'];
-} else {
- $title = $vars['config']->sitename . ": " . $vars['title'];
-}
-
-global $autofeed;
-if (isset($autofeed) && $autofeed == true) {
- $url = full_url();
- if (substr_count($url,'?')) {
- $url .= "&view=rss";
- } else {
- $url .= "?view=rss";
- }
- $url = elgg_format_url($url);
- $feedref = <<<END
-
- <link rel="alternate" type="application/rss+xml" title="RSS" href="{$url}" />
-
-END;
-} else {
- $feedref = "";
-}
-
-$js = elgg_get_js('head');
-$css = elgg_get_css();
-
-// we won't trust server configuration but specify utf-8
-header('Content-type: text/html; charset=utf-8');
-
-$version = get_version();
-$release = get_version(true);
-?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="ElggRelease" content="<?php echo $release; ?>" />
- <meta name="ElggVersion" content="<?php echo $version; ?>" />
- <title><?php echo $title; ?></title>
- <link rel="SHORTCUT ICON" href="<?php echo elgg_get_site_url(); ?>_graphics/favicon.ico" />
-
-<?php
-foreach ($js as $script) {
-?>
- <script type="text/javascript" src="<?php echo $script; ?>"></script>
-<?php
-}
-
-foreach ($css as $link) {
-?>
- <link rel="stylesheet" href="<?php echo $link; ?>" type="text/css" />
-<?php
-}
-
-$ie_url = elgg_view_get_simplecache_url('css', 'ie');
-$ie6_url = elgg_view_get_simplecache_url('css', 'ie6');
-?>
- <!--[if IE 6]>
- <link rel="stylesheet" type="text/css" href="<?php echo $ie_url; ?>" />
- <![endif]-->
-
- <!--[if gt IE 6]>
- <link rel="stylesheet" type="text/css" href="<?php echo $ie6_url; ?>" />
- <![endif]-->
-<?php
-
-echo elgg_view('js/initialize_elgg');
-echo $feedref;
-
-$metatags = elgg_view('metatags', $vars);
-if ($metatags) {
- elgg_deprecated_notice("The metatags view has been deprecated for html_head/extend", 1.8);
- echo $metatags;
-}
-echo elgg_view('html_head/extend', $vars);
-?>
-</head>
-
-<body>
diff --git a/views/default/page/elements/html_end.php b/views/default/page/elements/html_end.php
deleted file mode 100644
index 0862934cf..000000000
--- a/views/default/page/elements/html_end.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-/**
- * Start html output.
- * The standard HTML header that displays across the site
- * @uses $vars['config'] The site configuration settings, imported
- * @uses $vars['title'] The page title
- * @uses $vars['body'] The main content of the page
- */
-?>
-</body>
-</html>
diff --git a/views/default/page/elements/messages.php b/views/default/page/elements/messages.php
index f44d1204b..edd40d71e 100644
--- a/views/default/page/elements/messages.php
+++ b/views/default/page/elements/messages.php
@@ -9,20 +9,19 @@
* @uses $vars['object'] The array of message registers
*/
-if (isset($vars['object']) && is_array($vars['object']) && sizeof($vars['object']) > 0) {
+echo '<ul class="elgg-system-messages">';
- echo '<ul class="elgg-system-messages">';
+// hidden li so we validate
+echo '<li class="hidden"></li>';
+if (isset($vars['object']) && is_array($vars['object']) && sizeof($vars['object']) > 0) {
foreach ($vars['object'] as $type => $list ) {
foreach ($list as $message) {
- echo "<li class=\"elgg-state-$type radius8\">";
- echo elgg_view('output/longtext', array(
- 'value' => $message,
- 'parse_urls' => false
- ));
+ echo "<li class=\"elgg-message elgg-state-$type\">";
+ echo elgg_autop($message);
echo '</li>';
}
}
-
- echo '</ul>';
}
+
+echo '</ul>';
diff --git a/views/default/page/elements/owner_block.php b/views/default/page/elements/owner_block.php
new file mode 100644
index 000000000..fc7f0f6d2
--- /dev/null
+++ b/views/default/page/elements/owner_block.php
@@ -0,0 +1,31 @@
+<?php
+/**
+ * Elgg owner block
+ * Displays page ownership information
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ */
+
+elgg_push_context('owner_block');
+
+// groups and other users get owner block
+$owner = elgg_get_page_owner_entity();
+if ($owner instanceof ElggGroup ||
+ ($owner instanceof ElggUser && $owner->getGUID() != elgg_get_logged_in_user_guid())) {
+
+ $header = elgg_view_entity($owner, array('full_view' => false));
+
+ $body = elgg_view_menu('owner_block', array('entity' => $owner));
+
+ $body .= elgg_view('page/elements/owner_block/extend', $vars);
+
+ echo elgg_view('page/components/module', array(
+ 'header' => $header,
+ 'body' => $body,
+ 'class' => 'elgg-owner-block',
+ ));
+}
+
+elgg_pop_context(); \ No newline at end of file
diff --git a/views/default/page/elements/shortcut_icon.php b/views/default/page/elements/shortcut_icon.php
new file mode 100644
index 000000000..12fe9c1f8
--- /dev/null
+++ b/views/default/page/elements/shortcut_icon.php
@@ -0,0 +1,6 @@
+<?php
+/**
+ * Displays the default shortcut icon
+ */
+?>
+<link rel="SHORTCUT ICON" href="<?php echo elgg_get_site_url(); ?>_graphics/favicon.ico" /> \ No newline at end of file
diff --git a/views/default/page/elements/sidebar.php b/views/default/page/elements/sidebar.php
new file mode 100644
index 000000000..fe6bb450e
--- /dev/null
+++ b/views/default/page/elements/sidebar.php
@@ -0,0 +1,32 @@
+<?php
+/**
+ * Elgg sidebar contents
+ *
+ * @uses $vars['sidebar'] Optional content that is displayed at the bottom of sidebar
+ */
+
+echo elgg_view_menu('extras', array(
+ 'sort_by' => 'priority',
+ 'class' => 'elgg-menu-hz',
+));
+
+echo elgg_view('page/elements/owner_block', $vars);
+
+echo elgg_view_menu('page', array('sort_by' => 'name'));
+
+// optional 'sidebar' parameter
+if (isset($vars['sidebar'])) {
+ echo $vars['sidebar'];
+}
+
+// @todo deprecated so remove in Elgg 2.0
+// optional second parameter of elgg_view_layout
+if (isset($vars['area2'])) {
+ echo $vars['area2'];
+}
+
+// @todo deprecated so remove in Elgg 2.0
+// optional third parameter of elgg_view_layout
+if (isset($vars['area3'])) {
+ echo $vars['area3'];
+} \ No newline at end of file
diff --git a/views/default/page/elements/sidebar_alt.php b/views/default/page/elements/sidebar_alt.php
new file mode 100644
index 000000000..6d91ca58b
--- /dev/null
+++ b/views/default/page/elements/sidebar_alt.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * Elgg secondary sidebar contents
+ *
+ * You can override, extend, or pass content to it
+ *
+ * @uses $vars['sidebar_alt] HTML content for the alternate sidebar
+ */
+
+$sidebar = elgg_extract('sidebar_alt', $vars, '');
+
+echo $sidebar;
diff --git a/views/default/page/elements/tagcloud_block.php b/views/default/page/elements/tagcloud_block.php
new file mode 100644
index 000000000..258951c41
--- /dev/null
+++ b/views/default/page/elements/tagcloud_block.php
@@ -0,0 +1,58 @@
+<?php
+/**
+ * Display content-based tags
+ *
+ * Generally used in a sidebar. Does not work with groups currently.
+ *
+ * @uses $vars['subtypes'] Object subtype string or array of subtypes
+ * @uses $vars['owner_guid'] The owner of the content being tagged
+ * @uses $vars['limit'] The maxinum number of tags to display
+ */
+
+$owner_guid = elgg_extract('owner_guid', $vars, ELGG_ENTITIES_ANY_VALUE);
+if (!$owner_guid) {
+ $owner_guid = ELGG_ENTITIES_ANY_VALUE;
+}
+
+$owner_entity = get_entity($owner_guid);
+if ($owner_entity && elgg_instanceof($owner_entity, 'group')) {
+ // not supporting groups so return
+ return true;
+}
+
+$options = array(
+ 'type' => 'object',
+ 'subtype' => elgg_extract('subtypes', $vars, ELGG_ENTITIES_ANY_VALUE),
+ 'owner_guid' => $owner_guid,
+ 'threshold' => 0,
+ 'limit' => elgg_extract('limit', $vars, 50),
+ 'tag_name' => 'tags',
+);
+
+$title = elgg_echo('tagcloud');
+if (is_array($options['subtype']) && count($options['subtype']) > 1) {
+ // we cannot provide links to tagged objects with multiple types
+ $tag_data = elgg_get_tags($options);
+ $cloud = elgg_view("output/tagcloud", array(
+ 'value' => $tag_data,
+ 'type' => $type,
+ ));
+} else {
+ $cloud = elgg_view_tagcloud($options);
+}
+if (!$cloud) {
+ return true;
+}
+
+// add a link to all site tags
+$cloud .= '<p class="small">';
+$cloud .= elgg_view_icon('tag');
+$cloud .= elgg_view('output/url', array(
+ 'href' => 'tags',
+ 'text' => elgg_echo('tagcloud:allsitetags'),
+ 'is_trusted' => true,
+));
+$cloud .= '</p>';
+
+
+echo elgg_view_module('aside', $title, $cloud);
diff --git a/views/default/page/elements/title.php b/views/default/page/elements/title.php
new file mode 100644
index 000000000..19f47f4e6
--- /dev/null
+++ b/views/default/page/elements/title.php
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Elgg title element
+ *
+ * @uses $vars['title'] The page title
+ * @uses $vars['class'] Optional class for heading
+ */
+
+$class= '';
+if (isset($vars['class'])) {
+ $class = " class=\"{$vars['class']}\"";
+}
+
+echo "<h2{$class}>{$vars['title']}</h2>";
diff --git a/views/default/page/elements/topbar.php b/views/default/page/elements/topbar.php
index 2f4436d6c..e4c6c86bb 100644
--- a/views/default/page/elements/topbar.php
+++ b/views/default/page/elements/topbar.php
@@ -1,71 +1,16 @@
<?php
/**
- * Elgg top toolbar
+ * Elgg topbar
* The standard elgg top toolbar
*/
-$user = get_loggedin_user();
-if (!elgg_instanceof($user, 'user')) {
- // do not show tobpar to logged out users
- return true;
-}
-
-echo '<div class="elgg-page-topbar">';
-echo '<div class="elgg-inner clearfix">';
-
// Elgg logo
-$image = '<img src="' . elgg_get_site_url() . '_graphics/elgg_toolbar_logo.gif" alt="Elgg logo" />';
-echo elgg_view('output/url', array(
- 'href' => 'http://www.elgg.org/',
- 'text' => $image,
-));
-
-// avatar
-$user_link = $user->getURL();
-$user_image = $user->getIcon('topbar');
-$image = "<img src=\"$user_image\" alt=\"$user->name\" class=\"elgg-border-plain\" />";
-echo elgg_view('output/url', array(
- 'href' => $user_link,
- 'text' => $image,
-));
-
-// friends
-echo elgg_view('output/url', array(
- 'href' => elgg_get_site_url() . "pg/friends/{$user->username}/",
- 'text' => '<span class="elgg-icon elgg-icon-friends"></span>',
- 'title' => elgg_echo('friends'),
-));
-
-// logout link
-echo elgg_view('output/url', array(
- 'href' => "action/logout",
- 'text' => elgg_echo('logout'),
- 'is_action' => TRUE,
- 'class' => 'alt',
-));
+echo elgg_view_menu('topbar', array('sort_by' => 'priority', array('elgg-menu-hz')));
// elgg tools menu
// need to echo this empty view for backward compatibility.
-echo elgg_view("navigation/topbar_tools");
-
-// enable elgg topbar extending
-echo elgg_view('elgg_topbar/extend', $vars);
-
-// user settings
-echo elgg_view('output/url', array(
- 'href' => elgg_get_site_url() . 'pg/settings/',
- 'text' => '<span class="elgg-icon elgg-icon-settings"></span>' . elgg_echo('settings'),
- 'class' => 'alt',
-));
-
-// The administration link is for admin or site admin users only
-if ($user->isAdmin()) {
- echo elgg_view('output/url', array(
- 'href' => elgg_get_site_url() . 'pg/admin/',
- 'text' => '<span class="elgg-icon elgg-icon-settings"></span>' . elgg_echo('admin'),
- 'class' => 'alt',
- ));
+$content = elgg_view("navigation/topbar_tools");
+if ($content) {
+ elgg_deprecated_notice('navigation/topbar_tools was deprecated. Extend the topbar menus or the page/elements/topbar view directly', 1.8);
+ echo $content;
}
-
-echo '</div>';
-echo '</div>';
diff --git a/views/default/page/elements/wrapper.php b/views/default/page/elements/wrapper.php
new file mode 100644
index 000000000..61828832d
--- /dev/null
+++ b/views/default/page/elements/wrapper.php
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Deprecated content wrapper view from Elgg 1.5 through 1.7
+ *
+ * @uses $vars['body'] The content to display inside content wrapper
+ * @uses $vars['subclass'] Additional css class
+ */
+
+elgg_deprecated_notice("The 'page_elements/contentwrapper' has been deprecated", 1.8);
+?>
+
+<div class="contentWrapper<?php
+
+ if (isset($vars['subclass'])) {
+ echo ' ' . $vars['subclass'];
+ }
+
+?>">
+<?php
+ echo $vars['body'];
+?>
+</div>
diff --git a/views/default/page/error.php b/views/default/page/error.php
new file mode 100644
index 000000000..b7ba3ae9b
--- /dev/null
+++ b/views/default/page/error.php
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Page shell for errors
+ *
+ * This is for errors that are not unhandled exceptions. Those are handled
+ * through the failsafe viewtype to guarantee that no further exceptions occur.
+ * An example error would be 404 (page not found).
+ *
+ * @uses $vars['title'] The page title
+ * @uses $vars['body'] The main content of the page
+ * @uses $vars['sysmessages'] A 2d array of various message registers, passed from system_messages()
+ */
+
+echo elgg_view('page/default', $vars);
diff --git a/views/default/page/layouts/admin.php b/views/default/page/layouts/admin.php
new file mode 100644
index 000000000..8dbdc27e6
--- /dev/null
+++ b/views/default/page/layouts/admin.php
@@ -0,0 +1,40 @@
+<?php
+/**
+ * Elgg Admin Area Canvas
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['content'] Content string
+ * @uses $vars['sidebar'] Optional sidebar content
+ * @uses $vars['title'] Title string
+ */
+
+?>
+
+<div class="elgg-layout elgg-layout-one-sidebar">
+ <div class="elgg-sidebar clearfix">
+ <?php
+ echo elgg_view('admin/sidebar', $vars);
+ ?>
+ </div>
+ <div class="elgg-main elgg-body">
+ <div class="elgg-head">
+ <?php
+ echo elgg_view_menu('title', array(
+ 'sort_by' => 'priority',
+ 'class' => 'elgg-menu-hz',
+ ));
+
+ if (isset($vars['title'])) {
+ echo elgg_view_title($vars['title']);
+ }
+ ?>
+ </div>
+ <?php
+ if (isset($vars['content'])) {
+ echo $vars['content'];
+ }
+ ?>
+ </div>
+</div> \ No newline at end of file
diff --git a/views/default/page/layouts/content.php b/views/default/page/layouts/content.php
new file mode 100644
index 000000000..c406c9faf
--- /dev/null
+++ b/views/default/page/layouts/content.php
@@ -0,0 +1,53 @@
+<?php
+/**
+ * Main content area layout
+ *
+ * @uses $vars['content'] HTML of main content area
+ * @uses $vars['sidebar'] HTML of the sidebar
+ * @uses $vars['header'] HTML of the content area header (override)
+ * @uses $vars['nav'] HTML of the content area nav (override)
+ * @uses $vars['footer'] HTML of the content area footer
+ * @uses $vars['filter'] HTML of the content area filter (override)
+ * @uses $vars['title'] Title text (override)
+ * @uses $vars['context'] Page context (override)
+ * @uses $vars['filter_context'] Filter context: everyone, friends, mine
+ * @uses $vars['class'] Additional class to apply to layout
+ */
+
+// give plugins an opportunity to add to content sidebars
+$sidebar_content = elgg_extract('sidebar', $vars, '');
+$params = $vars;
+$params['content'] = $sidebar_content;
+$sidebar = elgg_view('page/layouts/content/sidebar', $params);
+
+// allow page handlers to override the default header
+if (isset($vars['header'])) {
+ $vars['header_override'] = $vars['header'];
+}
+$header = elgg_view('page/layouts/content/header', $vars);
+
+// allow page handlers to override the default filter
+if (isset($vars['filter'])) {
+ $vars['filter_override'] = $vars['filter'];
+}
+$filter = elgg_view('page/layouts/content/filter', $vars);
+
+// the all important content
+$content = elgg_extract('content', $vars, '');
+
+// optional footer for main content area
+$footer_content = elgg_extract('footer', $vars, '');
+$params = $vars;
+$params['content'] = $footer_content;
+$footer = elgg_view('page/layouts/content/footer', $params);
+
+$body = $header . $filter . $content . $footer;
+
+$params = array(
+ 'content' => $body,
+ 'sidebar' => $sidebar,
+);
+if (isset($vars['class'])) {
+ $params['class'] = $vars['class'];
+}
+echo elgg_view_layout('one_sidebar', $params);
diff --git a/views/default/page/layouts/content/filter.php b/views/default/page/layouts/content/filter.php
new file mode 100644
index 000000000..701c6418a
--- /dev/null
+++ b/views/default/page/layouts/content/filter.php
@@ -0,0 +1,52 @@
+<?php
+/**
+ * Main content filter
+ *
+ * Select between user, friends, and all content
+ *
+ * @uses $vars['filter_context'] Filter context: all, friends, mine
+ * @uses $vars['filter_override'] HTML for overriding the default filter (override)
+ * @uses $vars['context'] Page context (override)
+ */
+
+if (isset($vars['filter_override'])) {
+ echo $vars['filter_override'];
+ return true;
+}
+
+$context = elgg_extract('context', $vars, elgg_get_context());
+
+if (elgg_is_logged_in() && $context) {
+ $username = elgg_get_logged_in_user_entity()->username;
+ $filter_context = elgg_extract('filter_context', $vars, 'all');
+
+ // generate a list of default tabs
+ $tabs = array(
+ 'all' => array(
+ 'text' => elgg_echo('all'),
+ 'href' => (isset($vars['all_link'])) ? $vars['all_link'] : "$context/all",
+ 'selected' => ($filter_context == 'all'),
+ 'priority' => 200,
+ ),
+ 'mine' => array(
+ 'text' => elgg_echo('mine'),
+ 'href' => (isset($vars['mine_link'])) ? $vars['mine_link'] : "$context/owner/$username",
+ 'selected' => ($filter_context == 'mine'),
+ 'priority' => 300,
+ ),
+ 'friend' => array(
+ 'text' => elgg_echo('friends'),
+ 'href' => (isset($vars['friend_link'])) ? $vars['friend_link'] : "$context/friends/$username",
+ 'selected' => ($filter_context == 'friends'),
+ 'priority' => 400,
+ ),
+ );
+
+ foreach ($tabs as $name => $tab) {
+ $tab['name'] = $name;
+
+ elgg_register_menu_item('filter', $tab);
+ }
+
+ echo elgg_view_menu('filter', array('sort_by' => 'priority', 'class' => 'elgg-menu-hz'));
+}
diff --git a/views/default/page/layouts/content/footer.php b/views/default/page/layouts/content/footer.php
new file mode 100644
index 000000000..66f5d3ff8
--- /dev/null
+++ b/views/default/page/layouts/content/footer.php
@@ -0,0 +1,8 @@
+<?php
+/**
+ * Main content footer
+ *
+ * @uses $vars['content'] The content for the footer
+ */
+
+echo $vars['content'];
diff --git a/views/default/page/layouts/content/header.php b/views/default/page/layouts/content/header.php
new file mode 100644
index 000000000..1e66e52db
--- /dev/null
+++ b/views/default/page/layouts/content/header.php
@@ -0,0 +1,43 @@
+<?php
+/**
+ * Main content header
+ *
+ * Title and title menu
+ *
+ * @uses $vars['header_override'] HTML for overriding the default header (override)
+ * @uses $vars['title'] Title text (override)
+ * @uses $vars['context'] Page context (override)
+ */
+
+if (isset($vars['buttons'])) {
+ // it was a bad idea to implement buttons with a pass through
+ elgg_deprecated_notice("Use elgg_register_menu_item() to register for the title menu", 1.0);
+}
+
+if (isset($vars['header_override'])) {
+ echo $vars['header_override'];
+ return true;
+}
+
+$context = elgg_extract('context', $vars, elgg_get_context());
+
+$title = elgg_extract('title', $vars, '');
+if (!$title) {
+ $title = elgg_echo($context);
+}
+$title = elgg_view_title($title, array('class' => 'elgg-heading-main'));
+
+if (isset($vars['buttons']) && $vars['buttons']) {
+ $buttons = $vars['buttons'];
+} else {
+ $buttons = elgg_view_menu('title', array(
+ 'sort_by' => 'priority',
+ 'class' => 'elgg-menu-hz',
+ ));
+}
+
+echo <<<HTML
+<div class="elgg-head clearfix">
+ $title$buttons
+</div>
+HTML;
diff --git a/views/default/page/layouts/content/sidebar.php b/views/default/page/layouts/content/sidebar.php
new file mode 100644
index 000000000..86ca8435f
--- /dev/null
+++ b/views/default/page/layouts/content/sidebar.php
@@ -0,0 +1,8 @@
+<?php
+/**
+ * Main content sidebar
+ *
+ * @uses $vars['content] The content for the sidebar
+ */
+
+echo $vars['content'];
diff --git a/views/default/page/layouts/default.php b/views/default/page/layouts/default.php
new file mode 100644
index 000000000..60dc90b0d
--- /dev/null
+++ b/views/default/page/layouts/default.php
@@ -0,0 +1,18 @@
+<?php
+/**
+ * Elgg default layout
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['content'] Content string
+ */
+
+// @todo deprecated so remove in Elgg 2.0
+if (isset($vars['area1'])) {
+ echo $vars['area1'];
+}
+
+if (isset($vars['content'])) {
+ echo $vars['content'];
+}
diff --git a/views/default/page/layouts/error.php b/views/default/page/layouts/error.php
new file mode 100644
index 000000000..cdce28a8e
--- /dev/null
+++ b/views/default/page/layouts/error.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * Error layout
+ */
+
+$class = 'elgg-layout-error';
+if (isset($vars['class'])) {
+ $class = "$class {$vars['class']}";
+}
+$vars['class'] = $class;
+
+echo elgg_view('page/layouts/one_column', $vars);
diff --git a/views/default/page/layouts/one_column.php b/views/default/page/layouts/one_column.php
new file mode 100644
index 000000000..491d5b459
--- /dev/null
+++ b/views/default/page/layouts/one_column.php
@@ -0,0 +1,38 @@
+<?php
+/**
+ * Elgg one-column layout
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['content'] Content string
+ * @uses $vars['class'] Additional class to apply to layout
+ */
+
+$class = 'elgg-layout elgg-layout-one-column clearfix';
+if (isset($vars['class'])) {
+ $class = "$class {$vars['class']}";
+}
+
+// navigation defaults to breadcrumbs
+$nav = elgg_extract('nav', $vars, elgg_view('navigation/breadcrumbs'));
+
+?>
+<div class="<?php echo $class; ?>">
+ <div class="elgg-body elgg-main">
+ <?php
+ echo $nav;
+
+ if (isset($vars['title'])) {
+ echo elgg_view_title($vars['title']);
+ }
+
+ echo $vars['content'];
+
+ // @deprecated 1.8
+ if (isset($vars['area1'])) {
+ echo $vars['area1'];
+ }
+ ?>
+ </div>
+</div> \ No newline at end of file
diff --git a/views/default/page/layouts/one_sidebar.php b/views/default/page/layouts/one_sidebar.php
new file mode 100644
index 000000000..d74dad53d
--- /dev/null
+++ b/views/default/page/layouts/one_sidebar.php
@@ -0,0 +1,48 @@
+<?php
+/**
+ * Layout for main column with one sidebar
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['content'] Content HTML for the main column
+ * @uses $vars['sidebar'] Optional content that is displayed in the sidebar
+ * @uses $vars['title'] Optional title for main content area
+ * @uses $vars['class'] Additional class to apply to layout
+ * @uses $vars['nav'] HTML of the page nav (override) (default: breadcrumbs)
+ */
+
+$class = 'elgg-layout elgg-layout-one-sidebar clearfix';
+if (isset($vars['class'])) {
+ $class = "$class {$vars['class']}";
+}
+
+// navigation defaults to breadcrumbs
+$nav = elgg_extract('nav', $vars, elgg_view('navigation/breadcrumbs'));
+
+?>
+
+<div class="<?php echo $class; ?>">
+ <div class="elgg-sidebar">
+ <?php
+ echo elgg_view('page/elements/sidebar', $vars);
+ ?>
+ </div>
+
+ <div class="elgg-main elgg-body">
+ <?php
+ echo $nav;
+
+ if (isset($vars['title'])) {
+ echo elgg_view_title($vars['title']);
+ }
+ // @todo deprecated so remove in Elgg 2.0
+ if (isset($vars['area1'])) {
+ echo $vars['area1'];
+ }
+ if (isset($vars['content'])) {
+ echo $vars['content'];
+ }
+ ?>
+ </div>
+</div>
diff --git a/views/default/page/layouts/two_column_left_sidebar.php b/views/default/page/layouts/two_column_left_sidebar.php
new file mode 100644
index 000000000..e395a5053
--- /dev/null
+++ b/views/default/page/layouts/two_column_left_sidebar.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Deprecated layout from 1.0-1.7
+ *
+ * Use one_sidebar instead
+ */
+
+if (!isset($vars['content'])) {
+ $vars['content'] = $vars['area2'];
+}
+if (!isset($vars['content'])) {
+ $vars['sidebar'] = $vars['area1'] . $vars['area3'];
+}
+
+unset($vars['area1']);
+unset($vars['area2']);
+unset($vars['area3']);
+
+// backward compatability support for plugins that are not using the new approach
+// of routing through 'admin'
+if (elgg_get_context() == 'admin') {
+ echo elgg_view('page/layouts/admin', $vars);
+ return true;
+}
+
+echo elgg_view('page/layouts/one_sidebar', $vars);
diff --git a/views/default/page/layouts/two_sidebar.php b/views/default/page/layouts/two_sidebar.php
new file mode 100644
index 000000000..7521dd44f
--- /dev/null
+++ b/views/default/page/layouts/two_sidebar.php
@@ -0,0 +1,43 @@
+<?php
+/**
+ * Elgg 2 sidebar layout
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['content'] The content string for the main column
+ * @uses $vars['sidebar'] Optional content that is displayed in the sidebar
+ * @uses $vars['sidebar_alt'] Optional content that is displayed in the alternate sidebar
+ * @uses $vars['class'] Additional class to apply to layout
+ */
+
+$class = 'elgg-layout elgg-layout-two-sidebar clearfix';
+if (isset($vars['class'])) {
+ $class = "$class {$vars['class']}";
+}
+?>
+
+<div class="<?php echo $class; ?>">
+ <div class="elgg-sidebar">
+ <?php
+ echo elgg_view('page/elements/sidebar', $vars);
+ ?>
+ </div>
+ <div class="elgg-sidebar-alt">
+ <?php
+ echo elgg_view('page/elements/sidebar_alt', $vars);
+ ?>
+ </div>
+
+ <div class="elgg-main elgg-body">
+ <?php
+ // @todo deprecated so remove in Elgg 2.0
+ if (isset($vars['area1'])) {
+ echo $vars['area1'];
+ }
+ if (isset($vars['content'])) {
+ echo $vars['content'];
+ }
+ ?>
+ </div>
+</div>
diff --git a/views/default/page/layouts/walled_garden.php b/views/default/page/layouts/walled_garden.php
new file mode 100644
index 000000000..6ecd941ef
--- /dev/null
+++ b/views/default/page/layouts/walled_garden.php
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Walled Garden layout
+ *
+ * @uses $vars['content'] Main content
+ * @uses $vars['class'] CSS classes
+ * @uses $vars['id'] CSS id
+ */
+
+$class = elgg_extract('class', $vars, 'elgg-walledgarden-single');
+echo elgg_view_module('walledgarden', '', $vars['content'], array(
+ 'class' => $class,
+ 'id' => elgg_extract('id', $vars, ''),
+ 'header' => ' ',
+ 'footer' => ' ',
+));
diff --git a/views/default/page/layouts/widgets.php b/views/default/page/layouts/widgets.php
new file mode 100644
index 000000000..c6b162516
--- /dev/null
+++ b/views/default/page/layouts/widgets.php
@@ -0,0 +1,62 @@
+<?php
+/**
+ * Elgg widgets layout
+ *
+ * @uses $vars['content'] Optional display box at the top of layout
+ * @uses $vars['num_columns'] Number of widget columns for this layout (3)
+ * @uses $vars['show_add_widgets'] Display the add widgets button and panel (true)
+ * @uses $vars['exact_match'] Widgets must match the current context (false)
+ * @uses $vars['show_access'] Show the access control (true)
+ */
+
+$num_columns = elgg_extract('num_columns', $vars, 3);
+$show_add_widgets = elgg_extract('show_add_widgets', $vars, true);
+$exact_match = elgg_extract('exact_match', $vars, false);
+$show_access = elgg_extract('show_access', $vars, true);
+
+$owner = elgg_get_page_owner_entity();
+
+$widget_types = elgg_get_widget_types();
+
+$context = elgg_get_context();
+elgg_push_context('widgets');
+
+$widgets = elgg_get_widgets($owner->guid, $context);
+
+if (elgg_can_edit_widget_layout($context)) {
+ if ($show_add_widgets) {
+ echo elgg_view('page/layouts/widgets/add_button');
+ }
+ $params = array(
+ 'widgets' => $widgets,
+ 'context' => $context,
+ 'exact_match' => $exact_match,
+ 'show_access' => $show_access,
+ );
+ echo elgg_view('page/layouts/widgets/add_panel', $params);
+}
+
+echo $vars['content'];
+
+$widget_class = "elgg-col-1of{$num_columns}";
+for ($column_index = 1; $column_index <= $num_columns; $column_index++) {
+ if (isset($widgets[$column_index])) {
+ $column_widgets = $widgets[$column_index];
+ } else {
+ $column_widgets = array();
+ }
+
+ echo "<div class=\"$widget_class elgg-widgets\" id=\"elgg-widget-col-$column_index\">";
+ if (sizeof($column_widgets) > 0) {
+ foreach ($column_widgets as $widget) {
+ if (array_key_exists($widget->handler, $widget_types)) {
+ echo elgg_view_entity($widget, array('show_access' => $show_access));
+ }
+ }
+ }
+ echo '</div>';
+}
+
+elgg_pop_context();
+
+echo elgg_view('graphics/ajax_loader', array('id' => 'elgg-widget-loader'));
diff --git a/views/default/page/layouts/widgets/add_button.php b/views/default/page/layouts/widgets/add_button.php
new file mode 100644
index 000000000..c33a45f99
--- /dev/null
+++ b/views/default/page/layouts/widgets/add_button.php
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Button area for showing the add widgets panel
+ */
+?>
+<div class="elgg-widget-add-control">
+<?php
+ echo elgg_view('output/url', array(
+ 'href' => '#widgets-add-panel',
+ 'text' => elgg_echo('widgets:add'),
+ 'class' => 'elgg-button elgg-button-action',
+ 'rel' => 'toggle',
+ 'is_trusted' => true,
+ ));
+?>
+</div>
diff --git a/views/default/page/layouts/widgets/add_panel.php b/views/default/page/layouts/widgets/add_panel.php
new file mode 100644
index 000000000..d9b11342a
--- /dev/null
+++ b/views/default/page/layouts/widgets/add_panel.php
@@ -0,0 +1,62 @@
+<?php
+/**
+ * Widget add panel
+ *
+ * @uses $vars['widgets'] Array of current widgets
+ * @uses $vars['context'] The context for this widget layout
+ * @uses $vars['exact_match'] Only use widgets that match the context
+ */
+
+$widgets = $vars['widgets'];
+$context = $vars['context'];
+$exact = elgg_extract('exact_match', $vars, false);
+
+$widget_types = elgg_get_widget_types($context, $exact);
+uasort($widget_types, create_function('$a,$b', 'return strcmp($a->name,$b->name);'));
+
+$current_handlers = array();
+foreach ($widgets as $column_widgets) {
+ foreach ($column_widgets as $widget) {
+ $current_handlers[] = $widget->handler;
+ }
+}
+
+?>
+<div class="elgg-widgets-add-panel hidden clearfix" id="widgets-add-panel">
+ <p>
+ <?php echo elgg_echo('widgets:add:description'); ?>
+ </p>
+ <ul>
+<?php
+ foreach ($widget_types as $handler => $widget_type) {
+ $id = "elgg-widget-type-$handler";
+ // check if widget added and only one instance allowed
+ if ($widget_type->multiple == false && in_array($handler, $current_handlers)) {
+ $class = 'elgg-state-unavailable';
+ $tooltip = elgg_echo('widget:unavailable');
+ } else {
+ $class = 'elgg-state-available';
+ $tooltip = $widget_type->description;
+ }
+
+ if ($widget_type->multiple) {
+ $class .= ' elgg-widget-multiple';
+ } else {
+ $class .= ' elgg-widget-single';
+ }
+
+ echo "<li title=\"$tooltip\" id=\"$id\" class=\"$class\">$widget_type->name</li>";
+ }
+?>
+ </ul>
+<?php
+ echo elgg_view('input/hidden', array(
+ 'name' => 'widget_context',
+ 'value' => $context
+ ));
+ echo elgg_view('input/hidden', array(
+ 'name' => 'show_access',
+ 'value' => (int)$vars['show_access']
+ ));
+?>
+</div>
diff --git a/views/default/page/shells/admin.php b/views/default/page/shells/admin.php
deleted file mode 100644
index 11bc4ab70..000000000
--- a/views/default/page/shells/admin.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-/**
- * Elgg pageshell for the admin area
- *
- * @package Elgg
- * @subpackage Core
- *
- * @uses $vars['title'] The page title
- * @uses $vars['body'] The main content of the page
- * @uses $vars['sysmessages'] A 2d array of various message registers, passed from system_messages()
- */
-
-// Set the content type
-header("Content-type: text/html; charset=UTF-8");
-
-echo elgg_view('page/elements/html_begin', $vars);
-echo elgg_view('page/elements/messages', array('object' => $vars['sysmessages']));
-echo elgg_view('page/elements/content', $vars);
-echo elgg_view('page/elements/html_end', $vars); \ No newline at end of file
diff --git a/views/default/page/shells/default.php b/views/default/page/shells/default.php
deleted file mode 100644
index 8b53bc16d..000000000
--- a/views/default/page/shells/default.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-/**
- * Elgg pageshell
- * The standard HTML page shell that everything else fits into
- *
- * @package Elgg
- * @subpackage Core
- *
- * @uses $vars['title'] The page title
- * @uses $vars['body'] The main content of the page
- * @uses $vars['sysmessages'] A 2d array of various message registers, passed from system_messages()
- */
-
-// Set the content type
-header("Content-type: text/html; charset=UTF-8");
-
-echo elgg_view('page/elements/html_begin', $vars);
-
-echo '<div class="elgg-page elgg-classic">';
-echo elgg_view('page/elements/messages', array('object' => $vars['sysmessages']));
-echo elgg_view('page/elements/topbar', $vars);
-echo elgg_view('page/elements/header', $vars);
-echo elgg_view('page/elements/body', $vars);
-echo elgg_view('page/elements/footer', $vars);
-echo '</div>';
-
-echo elgg_view('page/elements/html_end', $vars);
diff --git a/views/default/page/shells/upgrade.php b/views/default/page/shells/upgrade.php
deleted file mode 100644
index b598c3c6a..000000000
--- a/views/default/page/shells/upgrade.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-/**
- * Page shell for upgrade script
- *
- * Displays an ajax loader until upgrade is complete
- */
-?>
-<html>
- <head>
- <title><?php echo elgg_echo('upgrading'); ?></title>
- <meta http-equiv="refresh" content="1;url=<?php echo elgg_get_site_url(); ?>upgrade.php?upgrade=upgrade"/>
- </head>
- <body bgcolor="white">
- <table width="100%" height="100%" border="0" style="margin: 0px; padding: 0px">
- <tr>
- <td width="100%" height="100%" valign="middle" align="center">
- <img src="<?php echo elgg_get_site_url(); ?>_graphics/ajax_loader_bw.gif" alt="upgrading" />
- </td>
- </tr>
- </table>
- </body>
-</html> \ No newline at end of file
diff --git a/views/default/page/shells/walled_garden.php b/views/default/page/shells/walled_garden.php
deleted file mode 100644
index 4e64276c1..000000000
--- a/views/default/page/shells/walled_garden.php
+++ /dev/null
@@ -1,281 +0,0 @@
-<?php
-/**
- *
- */
-
-// Set the content type
-header("Content-type: text/html; charset=UTF-8");
-
-// Set title
-$site_title = elgg_get_config('sitename');
-if (empty($vars['title'])) {
- $title = $site_title;
-} else if (empty($site_title)) {
- $title = $vars['title'];
-} else {
- $title = $site_title . ": " . $vars['title'];
-}
-
-echo elgg_view('page/elements/html_begin', $vars);
-// @todo - move the css below into it's own style-sheet
-// that is called when running as a private network
-?>
-<style type="text/css">
-body {background: white;}
-/* ***************************************
- WalledGarden
-*************************************** */
-#walledgarden_container {
- margin:100px auto 0 auto;
- position:relative;
- padding:0;
- width:563px;
- background: url(<?php echo elgg_get_site_url(); ?>_graphics/walled_garden_background_extend.gif) repeat-y left top;
- text-align: left;
- word-wrap:break-word;
-}
-#walledgarden {
- position: relative;
- padding:0;
- width:563px;
- min-height:230px;
- background: url(<?php echo elgg_get_site_url(); ?>_graphics/walled_garden_background_top.gif) no-repeat left top;
-}
-#walledgarden_bottom {
- margin:0 auto;
- background: url(<?php echo elgg_get_site_url(); ?>_graphics/walled_garden_background_bottom.gif) no-repeat left bottom;
- width:563px;
- height:54px;
- /* position: relative; */
-}
-.walledgardenintro {
- float:left;
- min-height:200px;
- width:223px;
- padding:15px;
- margin:19px 0 0 23px;
-}
-.walledgardenlogin {
- float:left;
- min-height:200px;
- width:223px;
- padding:15px 15px 0 15px;
- margin:19px 0 0 11px;
-}
-.walledgardenintro h1 {
- color:#666666;
- margin-top:80px;
- line-height: 1.1em;
-}
-.walledgardenlogin h2 {
- color:#666666;
- border-bottom:1px solid #CCCCCC;
- margin-bottom:5px;
- padding-bottom:5px;
-}
-.walledgardenlogin form input.login-textarea {
- margin:0 0 10px 0;
- width:210px;
-}
-.walledgardenlogin form label {
- color:#666666;
-}
-.walledgardenlogin .remember_me label {
- font-size:1em;
- font-weight:normal;
-}
-.walledgardenlogin .remember_me {
- display:block;
- float:right;
- margin-left:0;
- margin-top:-34px;
- text-align:right;
- width:100%;
-}
-.walledgardenlogin .lost_password {
- margin-bottom: 10px;
- color:#999999;
-}
-.walledgardenlogin a.forgotten_password_link,
-.walledgardenlogin a.registration_link {
- color:#999999;
-}
-
-/* override default form styles (for when a theme is running) */
-.walledgardenlogin input {
- font: 120% Arial, Helvetica, sans-serif;
- padding: 5px;
- border: 1px solid #cccccc;
- color:#666666;
- background-color: white;
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
-}
-.walledgardenlogin textarea {
- font: 120% Arial, Helvetica, sans-serif;
- border: solid 1px #cccccc;
- padding: 5px;
- color:#666666;
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
-}
-.walledgardenlogin textarea:focus,
-.walledgardenlogin input[type="text"]:focus {
- border: solid 1px #4690d6;
- background: #e4ecf5;
- color:#333333;
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
-}
-.walledgardenlogin .input-password {
- width:200px;
-}
-.walledgardenlogin input.input-password:focus {
- border: solid 1px #4690d6;
- background-color: #e4ecf5;
- color:#333333;
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
-}
-.walledgardenlogin input[type="password"]:focus {
- border: solid 1px #4690d6;
- background-color: #e4ecf5;
- color:#333333;
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
-}
-.walledgardenlogin .submit_button {
- font-size: 14px;
- font-weight: bold;
- color: white;
- text-shadow:1px 1px 0px black;
- text-decoration:none;
- border: 1px solid #4690d6;
- background-color:#4690d6;
- background-image: url(<?php echo elgg_get_site_url(); ?>_graphics/button_graduation.png);
- background-repeat: repeat-x;
- background-position: left 10px;
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- width: auto;
- padding: 2px 4px;
- margin:0 10px 10px 0;
- cursor: pointer;
- -webkit-box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.40);
- -moz-box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.40);
-}
-.walledgardenlogin .submit_button:hover {
- color: white;
- border-color: #0054a7;
- text-decoration:none;
- background-color:#0054a7;
- background-image: url(<?php echo elgg_get_site_url(); ?>_graphics/button_graduation.png);
- background-repeat: repeat-x;
- background-position: left 10px;
-}
-.walledgardenlogin input.action_button {
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- background-color:#cccccc;
- background-image: url(<?php echo elgg_get_site_url(); ?>_graphics/button_background.gif);
- background-repeat: repeat-x;
- background-position: 0 0;
- border:1px solid #999999;
- color:#333333;
- padding:2px 15px 2px 15px;
- text-align:center;
- font-weight:bold;
- text-decoration:none;
- text-shadow:0 1px 0 white;
- cursor:pointer;
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
-}
-.walledgardenlogin input.action_button:hover,
-.walledgardenlogin input.action_button:focus {
- background-position:0 -15px;
- background-image: url(<?php echo elgg_get_site_url(); ?>_graphics/button_background.gif);
- background-repeat: repeat-x;
- color:#111111;
- text-decoration: none;
- background-color:#cccccc;
- border:1px solid #999999;
-}
-.walledgardenlogin .action_button.disabled {
- color:#999999;
- padding:2px 7px;
-}
-
-/* override some elgg system message styles */
-#walledgarden_sysmessages {
- position: absolute;
- width:100%;
- text-align: center;
- margin:0 auto;
- top:0;
- z-index:9600;
-}
-#walledgarden_sysmessages #elgg-system-message {
- width: 515px;
- max-width: 515px;
- right:auto;
- margin:30px auto 0 auto;
- position: relative;
-}
-
-
-#lostpassword_form,
-#registration_form {
- right:0;
- position:absolute;
- top:0;
- width:260px;
- background-color: white;
- padding:0;
- background: url(<?php echo elgg_get_site_url(); ?>_graphics/walled_garden_backgroundfull_top.gif) no-repeat left top;
- height:auto;
-}
-#hiddenform_body {
- padding:30px 40px 0 40px;
- height:auto;
-}
-#hiddenform_bottom {
- margin:0 auto;
- background: url(<?php echo elgg_get_site_url(); ?>_graphics/walled_garden_backgroundfull_bottom.gif) no-repeat left bottom;
- width:563px;
- height:54px;
- position: relative;
-}
-
-#hiddenform_body .cancel_request {
- margin-left:15px;
-}
-
-/* override some visual_captcha styles */
-.walledgardenlogin .visual_captcha_choices {
- margin:10px 0 0 0;
- padding:0;
- height:60px;
-}
-.walledgardenlogin ul.visual_captcha_choices li img {
- width:50px;
- height:auto;
-}
-
-</style>
-
-<?php
-$view = elgg_view('page/elements/messages', array('object' => $vars['sysmessages']));
-
-echo "<div id='walledgarden_sysmessages' class='clearfix'>$view</div>";
-echo '<div id="walledgarden_container"><div id="walledgarden" class="clearfix">';
-echo "<div class=\"walledgardenintro clearfix\"><h1>Welcome to:<br />$title</h1></div>";
-echo "<div class=\"walledgardenlogin clearfix\">{$vars['body']}</div>";
-echo '</div>';
-echo '<div id="walledgarden_bottom"></div>';
-echo '</div>';
-
-echo elgg_view('page/elements/html_end', $vars);
diff --git a/views/default/page/upgrade.php b/views/default/page/upgrade.php
new file mode 100644
index 000000000..1a92042be
--- /dev/null
+++ b/views/default/page/upgrade.php
@@ -0,0 +1,18 @@
+<?php
+/**
+ * Page shell for upgrade script
+ *
+ * Displays an ajax loader until upgrade is complete
+ */
+?>
+<html>
+ <head>
+ <?php echo elgg_view('page/elements/head', $vars); ?>
+ <meta http-equiv="refresh" content="1;url=<?php echo elgg_get_site_url(); ?>upgrade.php?upgrade=upgrade"/>
+ </head>
+ <body>
+ <div style="margin-top:200px">
+ <?php echo elgg_view('graphics/ajax_loader', array('hidden' => false)); ?>
+ </div>
+ </body>
+</html> \ No newline at end of file
diff --git a/views/default/page/walled_garden.php b/views/default/page/walled_garden.php
new file mode 100644
index 000000000..b280cf6b2
--- /dev/null
+++ b/views/default/page/walled_garden.php
@@ -0,0 +1,40 @@
+<?php
+/**
+ * Walled garden page shell
+ *
+ * Used for the walled garden index page
+ */
+
+$is_sticky_register = elgg_is_sticky_form('register');
+$wg_body_class = 'elgg-body-walledgarden';
+if ($is_sticky_register) {
+ $wg_body_class .= ' hidden';
+}
+
+// Set the content type
+header("Content-type: text/html; charset=UTF-8");
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<?php echo elgg_view('page/elements/head', $vars); ?>
+</head>
+<body>
+<div class="elgg-page elgg-page-walledgarden">
+ <div class="elgg-page-messages">
+ <?php echo elgg_view('page/elements/messages', array('object' => $vars['sysmessages'])); ?>
+ </div>
+ <div class="<?php echo $wg_body_class; ?>">
+ <?php echo $vars['body']; ?>
+ </div>
+</div>
+<?php if ($is_sticky_register): ?>
+<script type="text/javascript">
+elgg.register_hook_handler('init', 'system', function() {
+ $('.registration_link').trigger('click');
+});
+</script>
+<?php endif; ?>
+<?php echo elgg_view('page/elements/foot'); ?>
+</body>
+</html> \ No newline at end of file