aboutsummaryrefslogtreecommitdiff
path: root/views/default/layout
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/layout')
-rw-r--r--views/default/layout/elements/comments.php20
-rw-r--r--views/default/layout/elements/owner_block.php77
-rw-r--r--views/default/layout/elements/sidebar.php27
-rw-r--r--views/default/layout/elements/title.php22
-rw-r--r--views/default/layout/objects/list.php75
-rw-r--r--views/default/layout/objects/media.php52
-rw-r--r--views/default/layout/objects/module.php52
-rw-r--r--views/default/layout/objects/widget.php52
-rw-r--r--views/default/layout/objects/widget/controls.php44
-rw-r--r--views/default/layout/objects/widget/settings.php44
-rw-r--r--views/default/layout/shells/administration.php36
-rw-r--r--views/default/layout/shells/content.php57
-rw-r--r--views/default/layout/shells/content/filter.php43
-rw-r--r--views/default/layout/shells/content/footer.php8
-rw-r--r--views/default/layout/shells/content/header.php44
-rw-r--r--views/default/layout/shells/content/sidebar.php8
-rw-r--r--views/default/layout/shells/default.php18
-rw-r--r--views/default/layout/shells/one_column.php25
-rw-r--r--views/default/layout/shells/one_column_with_sidebar.php31
-rw-r--r--views/default/layout/shells/one_sidebar.php42
-rw-r--r--views/default/layout/shells/two_sidebar.php48
-rw-r--r--views/default/layout/shells/widgets.php46
-rw-r--r--views/default/layout/shells/widgets/add_button.php13
-rw-r--r--views/default/layout/shells/widgets/add_panel.php51
24 files changed, 0 insertions, 935 deletions
diff --git a/views/default/layout/elements/comments.php b/views/default/layout/elements/comments.php
deleted file mode 100644
index 6dbe51483..000000000
--- a/views/default/layout/elements/comments.php
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-/**
- * List comments with optional add form
- *
- * @uses $vars['entity'] ElggEntity
- * @uses $vars['show_add_form'] Display add form or not
- */
-
-$show_add_form = elgg_get_array_value('show_add_form', $vars, true);
-
-echo '<div class="elgg-comments">';
-
-echo list_annotations($vars['entity']->getGUID(), 'generic_comment');
-
-if ($show_add_form) {
- $form_vars = array('name' => 'elgg_add_comment');
- echo elgg_view_form('comments/add', $form_vars, $vars);
-}
-
-echo '</div>';
diff --git a/views/default/layout/elements/owner_block.php b/views/default/layout/elements/owner_block.php
deleted file mode 100644
index 66fc180dd..000000000
--- a/views/default/layout/elements/owner_block.php
+++ /dev/null
@@ -1,77 +0,0 @@
-<?php
-/**
- * Elgg owner block
- * Displays page ownership information
- *
- * @package Elgg
- * @subpackage Core
- *
- */
-
-$contents = "";
-
-// Are there feeds to display?
-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);
- $label = elgg_echo('feed:rss');
- $contents .= <<<END
- <div class="rss-link clearfix"><a href="{$url}" rel="nofollow" title="{$label}">{$label}</a></div>
-END;
-}
-
-if(is_plugin_enabled('profile')) {
- // Is there a page owner?
- $owner = elgg_get_page_owner();
- if ($owner instanceof ElggGroup ||
- ($owner instanceof ElggUser && $owner->getGUID() != get_loggedin_userid())
- ) {
- $icon = elgg_view('profile/icon', array('entity' => $owner, 'size' => 'tiny'));
- $owner_url = $owner->getURL();
- $display = "<div class='owner_block_icon'>$icon</div>";
- $display .= '<div class="owner_block_contents clearfix">';
- $display .= "<h3><a href=\"$owner_url\">{$owner->name}</a></h3>";
-
- if ($owner->briefdescription) {
- $display .= "<p class=\"profile_info briefdescription\">{$owner->briefdescription}</p>";
- }
-
- $location = elgg_view('output/tags', array('value' => $owner->location));
- $display .= "<p class=\"profile_info location\">$location</p>";
-
- $display .= '</div>';
-
- // Trigger owner block menu
- $params = array('owner' => $owner);
- $links = elgg_trigger_plugin_hook('profile_menu', 'profile', $params, array());
- if (is_array($links) && !empty($links)) {
- // sort the links by name
- usort($links, create_function(
- '$a, $b',
- 'return strnatcasecmp($a[\'text\'], $b[\'text\']);'
- ));
-
- $display .= '<div class="owners_content_links"><ul>';
- foreach ($links as $link) {
- $display .= "<li><a href=\"{$link['href']}\">{$link['text']}</a></li>";
- }
- $display .= '</ul></div>';
- }
-
- // Allow plugins to extend the owner block contents
- $display .= elgg_view('owner_block/profile_extend');
-
- $contents .= "<div id='owner_block' class='clearfix'>$display</div>";
- }
-}
-
-$contents .= elgg_view('owner_block/extend');
-
-
-echo $contents;
diff --git a/views/default/layout/elements/sidebar.php b/views/default/layout/elements/sidebar.php
deleted file mode 100644
index d1323f2cd..000000000
--- a/views/default/layout/elements/sidebar.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-/**
- * Elgg sidebar contents
- *
- * @uses $vars['sidebar'] Optional content that is displayed at the bottom of sidebar
- */
-
-echo elgg_view('layout/elements/owner_block');
-
-echo elgg_view('navigation/sidebar_menu');
-
-// 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/layout/elements/title.php b/views/default/layout/elements/title.php
deleted file mode 100644
index c5eeb9e0e..000000000
--- a/views/default/layout/elements/title.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-/**
- * Elgg title element
- * @uses $vars['title'] The page title
- */
-
-$page_owner = elgg_get_page_owner_guid();
-$page_owner_entity = get_entity($page_owner);
-
-$display = "<h2>" . $vars['title'] . "</h2>";
-
-$submenu = elgg_get_submenu();
-if (!empty($submenu)) {
- $submenu = "<ul class='submenu extended'>" . $submenu . "</ul>";
-}
-
-if (!empty($submenu) && $vars['submenu'] == true) {
- // plugins can extend this to add menu options
- $display .= $submenu;
-}
-
-echo $display; \ No newline at end of file
diff --git a/views/default/layout/objects/list.php b/views/default/layout/objects/list.php
deleted file mode 100644
index 84ba1414c..000000000
--- a/views/default/layout/objects/list.php
+++ /dev/null
@@ -1,75 +0,0 @@
-<?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
- * @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 = $vars['offset'];
-$limit = $vars['limit'];
-$count = $vars['count'];
-$base_url = $vars['base_url'];
-$pagination = elgg_get_array_value('pagination', $vars, true);
-$full_view = elgg_get_array_value('full_view', $vars, false);
-$offset_key = elgg_get_array_value('offset_key', $vars, 'offset');
-$position = elgg_get_array_value('position', $vars, 'after');
-
-$list_class = 'elgg-list';
-if (isset($vars['list_class'])) {
- $list_class = "{$vars['list_class']} $list_class";
-}
-
-$item_class = 'elgg-list-item';
-if (isset($vars['item_class'])) {
- $item_class = "{$vars['item_class']} $item_class";
-}
-
-$html = "";
-$nav = "";
-
-if ($pagination && $count) {
- $nav .= elgg_view('navigation/pagination', array(
- 'baseurl' => $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) {
- if (elgg_instanceof($item)) {
- $id = "elgg-{$item->getType()}-{$item->getGUID()}";
- } else {
- $id = "item-{$item->getType()}-{$item->id}";
- }
- $html .= "<li id=\"$id\" class=\"$item_class\">";
- $html .= elgg_view_list_item($item, $full_view);
- $html .= '</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/layout/objects/media.php b/views/default/layout/objects/media.php
deleted file mode 100644
index 2b015bd05..000000000
--- a/views/default/layout/objects/media.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-/**
- * Elgg media element
- *
- * Common pattern where there is an image, icon, media object to the left
- * and a descriptive block of text to the right.
- *
- * ---------------------------------------------------------------
- * | | | alt |
- * | picture | body | picture |
- * | block | block | block |
- * | | | (optional)|
- * ---------------------------------------------------------------
- *
- * @uses $vars['body'] HTML content of the body block
- * @uses $vars['pict'] HTML content of the picture block
- * @uses $vars['pict_alt'] HTML content of the alternate picture block
- * @uses $vars['class'] Optional additional class for media element
- * @uses $vars['id'] Optional id for the media element
- */
-
-$body = elgg_get_array_value('body', $vars, '');
-$pict_block = elgg_get_array_value('pict', $vars, '');
-$alt_pict_block = elgg_get_array_value('pict_alt', $vars, '');
-
-$class = 'elgg-media';
-$additional_class = elgg_get_array_value('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 ($pict_block) {
- $pict_block = "<div class=\"elgg-pict\">$pict_block</div>";
-}
-
-if ($alt_pict_block) {
- $alt_pict_block = "<div class=\"elgg-pict-alt\">$alt_pict_block</div>";
-}
-
-echo <<<HTML
-<div class="$class clearfix" $id>
- $pict_block$alt_pict_block$body
-</div>
-HTML;
diff --git a/views/default/layout/objects/module.php b/views/default/layout/objects/module.php
deleted file mode 100644
index 48fa79553..000000000
--- a/views/default/layout/objects/module.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-/**
- * Elgg module element
- *
- * @uses $vars['title'] Title text
- * @uses $vars['header'] HTML content of the header
- * @uses $vars['body'] HTML content of the body
- * @uses $vars['footer'] 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 (true)
- */
-
-$title = elgg_get_array_value('title', $vars, '');
-$header = elgg_get_array_value('header', $vars, '');
-$body = elgg_get_array_value('body', $vars, '');
-$footer = elgg_get_array_value('footer', $vars, '');
-$show_inner = elgg_get_array_value('show_inner', $vars, true);
-
-$class = 'elgg-module';
-$additional_class = elgg_get_array_value('class', $vars, '');
-if ($additional_class) {
- $class = "$class $additional_class";
-}
-
-$id = '';
-if (isset($vars['id'])) {
- $id = "id=\"{$vars['id']}\"";
-}
-
-if (isset($vars['header'])) {
- if ($vars['header']) {
- $header = "<div class=\"elgg-head\">$header</div>";
- }
-} else {
- $header = "<div class=\"elgg-head\"><h3>$title</h3></div>";
-}
-
-$body = "<div class=\"elgg-body\">$body</div>";
-
-if (isset($vars['footer'])) {
- if ($vars['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/layout/objects/widget.php b/views/default/layout/objects/widget.php
deleted file mode 100644
index d109693e1..000000000
--- a/views/default/layout/objects/widget.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-/**
- * Widget object
- *
- * @uses $vars['entity']
- */
-
-$widget = $vars['entity'];
-if (!elgg_instanceof($widget, 'object', 'widget')) {
- return true;
-}
-
-// @todo catch for disabled plugins
-$widgettypes = elgg_get_widget_types('all');
-
-$handler = $widget->handler;
-
-$title = $widget->getTitle();
-
-$can_edit = $widget->canEdit();
-
-$widget_id = "widget-$widget->guid";
-$widget_instance = "widget-instance-$handler";
-
-?>
-<div class="widget draggable <?php echo $widget_instance?>" id="<?php echo $widget_id; ?>">
- <div class="widget-title drag-handle">
- <h3><?php echo $title; ?></h3>
- </div>
- <?php
- if ($can_edit) {
- echo elgg_view('layout/objects/widget/controls', array('widget' => $widget));
- }
- ?>
- <div class="widget-container">
- <?php
- if ($can_edit) {
- echo elgg_view('layout/objects/widget/settings', array('widget' => $widget));
- }
- ?>
- <div class="widget-content">
- <?php
- if (elgg_view_exists("widgets/$handler/content")) {
- echo elgg_view("widgets/$handler/content", $vars);
- } else {
- elgg_deprecated_notice("widgets use content as the display view", 1.8);
- echo elgg_view("widgets/$handler/view", $vars);
- }
- ?>
- </div>
- </div>
-</div>
diff --git a/views/default/layout/objects/widget/controls.php b/views/default/layout/objects/widget/controls.php
deleted file mode 100644
index 5e6aaf193..000000000
--- a/views/default/layout/objects/widget/controls.php
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-/**
- * Elgg widget controls
- *
- * @package Elgg
- * @subpackage Core
- */
-
-$widget = $vars['widget'];
-
-$params = array(
- 'text' => ' ',
- 'href' => "#",
- 'class' => 'widget-collapse-button',
- 'internalid' => "widget-collapse-button_$widget->guid"
-);
-$collapse_link = elgg_view('output/url', $params);
-
-$params = array(
- 'text' => ' ',
- 'title' => elgg_echo('widget:delete', array($widget->getTitle())),
- 'href' => elgg_get_site_url() . "action/widgets/delete?guid=$widget->guid",
- 'is_action' => true,
- 'class' => 'widget-delete-button',
- 'internalid' => "widget-delete-button_$widget->guid"
-);
-$delete_link = elgg_view('output/url', $params);
-
-$params = array(
- 'text' => ' ',
- 'title' => elgg_echo('widget:edit'),
- 'href' => "#",
- 'class' => 'widget-edit-button',
- 'internalid' => "widget-edit-button_$widget->guid"
-);
-$edit_link = elgg_view('output/url', $params);
-
-echo <<<___END
-<div class="widget-controls">
- $collapse_link
- $delete_link
- $edit_link
-</div>
-___END;
diff --git a/views/default/layout/objects/widget/settings.php b/views/default/layout/objects/widget/settings.php
deleted file mode 100644
index 5814e5821..000000000
--- a/views/default/layout/objects/widget/settings.php
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-/**
- * Elgg widget edit settings
- *
- * @package Elgg
- * @subpackage Core
- */
-
-$widget = $vars['widget'];
-
-$edit_view = "widgets/$widget->handler/edit";
-$custom_form_section = elgg_view($edit_view, array('entity' => $widget));
-
-$access_label = elgg_echo('access');
-$access = elgg_view('input/access', array('internalname' => 'params[access_id]','value' => $widget->access_id));
-$access_html = "<p><label>$access_label:</label> $access</p>";
-
-$hidden = elgg_view('input/hidden', array('internalname' => 'guid', 'value' => $widget->guid));
-$submit = elgg_view('input/submit', array('value' => elgg_echo('save')));
-
-// dashboard widgets do not get access controls
-if (elgg_in_context('dashboard')) {
- $access = '';
-}
-
-$body = <<<___END
- $custom_form_section
- $access
- <p>
- $hidden
- $submit
- </p>
-___END;
-
-?>
-<div class="widget-edit">
-<?php
-$params = array(
- 'body' => $body,
- 'action' => "action/widgets/save"
-);
-echo elgg_view('input/form', $params);
-?>
-</div>
diff --git a/views/default/layout/shells/administration.php b/views/default/layout/shells/administration.php
deleted file mode 100644
index f9f5e3caa..000000000
--- a/views/default/layout/shells/administration.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-/**
- * Elgg Admin Area Canvas
- *
- * @package Elgg
- * @subpackage Core
- *
- * @uses $vars['content'] Content string
- * @uses $vars['sidebar'] Optional sidebar content
- */
-?>
-
-<div id="admin_header">
- <span class="network-title"><h2>
- <a href="<?php echo elgg_get_site_url(); ?>">
- <?php echo $vars['config']->sitename; echo " ".elgg_echo('admin'); ?></a>
- <a class="return_to_network" href="<?php echo elgg_get_site_url(); ?>">&lt;&lt; Return to network</a>
- </h2></span>
-</div>
-
-<div id="elgg-content" class="clearfix admin_area">
-
- <div id="elgg-page-contents" class="clearfix">
- <?php
- if (isset($vars['content'])) {
- echo $vars['content'];
- }
- ?>
- </div>
- <div id="elgg-sidebar" class="clearfix">
- <?php
- echo elgg_view('layout/elements/sidebar', $vars);
- ?>
- </div>
-</div>
-<div id="admin_footer"></div> \ No newline at end of file
diff --git a/views/default/layout/shells/content.php b/views/default/layout/shells/content.php
deleted file mode 100644
index 87d314b2c..000000000
--- a/views/default/layout/shells/content.php
+++ /dev/null
@@ -1,57 +0,0 @@
-<?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['buttons'] Content header buttons (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_get_array_value('sidebar', $vars, '');
-$params = $vars;
-$params['content'] = $sidebar_content;
-$sidebar = elgg_view('layout/shells/content/sidebar', $params);
-
-// navigation defaults to breadcrumbs
-$nav = elgg_get_array_value('nav', $vars, elgg_view('navigation/breadcrumbs'));
-
-// allow page handlers to override the default header
-if (isset($vars['header'])) {
- $vars['header_override'] = $vars['header'];
-}
-$header = elgg_view('layout/shells/content/header', $vars);
-
-// allow page handlers to override the default filter
-if (isset($vars['filter'])) {
- $vars['filter_override'] = $vars['filter'];
-}
-$filter = elgg_view('layout/shells/content/filter', $vars);
-
-// the all important content
-$content = elgg_get_array_value('content', $vars, '');
-
-// optional footer for main content area
-$footer_content = elgg_get_array_value('footer', $vars, '');
-$params = $vars;
-$params['content'] = $footer_content;
-$footer = elgg_view('layout/shells/content/footer', $params);
-
-$body = $nav . $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/layout/shells/content/filter.php b/views/default/layout/shells/content/filter.php
deleted file mode 100644
index d84c27a63..000000000
--- a/views/default/layout/shells/content/filter.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?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_get_array_value('context', $vars, elgg_get_context());
-
-if (isloggedin() && $context) {
- $username = get_loggedin_user()->username;
- $filter_context = elgg_get_array_value('filter_context', $vars, 'everyone');
-
- // generate a list of default tabs
- $tabs = array(
- 'all' => array(
- 'title' => elgg_echo('all'),
- 'url' => (isset($vars['all_link'])) ? $vars['all_link'] : "pg/$context/all/",
- 'selected' => ($filter_context == 'all'),
- ),
- 'mine' => array(
- 'title' => elgg_echo('mine'),
- 'url' => (isset($vars['mine_link'])) ? $vars['mine_link'] : "pg/$context/owner/$username/",
- 'selected' => ($filter_context == 'mine'),
- ),
- 'friend' => array(
- 'title' => elgg_echo('friends'),
- 'url' => (isset($vars['friend_link'])) ? $vars['friend_link'] : "pg/$context/friends/$username/",
- 'selected' => ($filter_context == 'friends'),
- ),
- );
-
- echo elgg_view('navigation/tabs', array('tabs' => $tabs));
-}
diff --git a/views/default/layout/shells/content/footer.php b/views/default/layout/shells/content/footer.php
deleted file mode 100644
index 66f5d3ff8..000000000
--- a/views/default/layout/shells/content/footer.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-/**
- * Main content footer
- *
- * @uses $vars['content'] The content for the footer
- */
-
-echo $vars['content'];
diff --git a/views/default/layout/shells/content/header.php b/views/default/layout/shells/content/header.php
deleted file mode 100644
index a7c0d1389..000000000
--- a/views/default/layout/shells/content/header.php
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-/**
- * Main content header
- *
- * This includes a title and a new content button by default
- *
- * @uses $vars['header_override'] HTML for overriding the default header (override)
- * @uses $vars['title'] Title text (override)
- * @uses $vars['context'] Page context (override)
- * @uses $vars['buttons'] Content header buttons (override)
- */
-
-if (isset($vars['header_override'])) {
- echo $vars['header_override'];
- return true;
-}
-
-$context = elgg_get_array_value('context', $vars, elgg_get_context());
-if ($context) {
- $title = elgg_get_array_value('title', $vars, '');
- if (!$title) {
- $title = elgg_echo($context);
- }
-
- if (isset($vars['buttons'])) {
- $buttons = $vars['buttons'];
- } else {
- if (isloggedin() && $context) {
- $username = get_loggedin_user()->username;
- $new_link = elgg_get_array_value('new_link', $vars, "pg/$context/new/$username/");
- $params = array(
- 'href' => $new_link = elgg_normalize_url($new_link),
- 'text' => elgg_echo("$context:new"),
- 'class' => 'action-button right',
- );
- $buttons = elgg_view('output/url', $params);
- }
- }
- echo <<<HTML
-<div class="elgg-main-header clearfix">
- <h2 class="elgg-main-heading">$title</h2>$buttons
-</div>
-HTML;
-}
diff --git a/views/default/layout/shells/content/sidebar.php b/views/default/layout/shells/content/sidebar.php
deleted file mode 100644
index 86ca8435f..000000000
--- a/views/default/layout/shells/content/sidebar.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-/**
- * Main content sidebar
- *
- * @uses $vars['content] The content for the sidebar
- */
-
-echo $vars['content'];
diff --git a/views/default/layout/shells/default.php b/views/default/layout/shells/default.php
deleted file mode 100644
index 60dc90b0d..000000000
--- a/views/default/layout/shells/default.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?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/layout/shells/one_column.php b/views/default/layout/shells/one_column.php
deleted file mode 100644
index ab6a24878..000000000
--- a/views/default/layout/shells/one_column.php
+++ /dev/null
@@ -1,25 +0,0 @@
-<?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-inner clearfix';
-if (isset($vars['class'])) {
- $class = "$class {$vars['class']}";
-}
-?>
-<div class="<?php echo $class; ?>" id="elgg-layout-one-column">
- <div class="elgg-body">
- <?php echo $vars['content']; ?>
- <?php
- // @deprecated 1.8
- echo $vars['area1'];
- ?>
- </div>
-</div> \ No newline at end of file
diff --git a/views/default/layout/shells/one_column_with_sidebar.php b/views/default/layout/shells/one_column_with_sidebar.php
deleted file mode 100644
index 6698b7372..000000000
--- a/views/default/layout/shells/one_column_with_sidebar.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-/**
- * Elgg 1 column with 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
- */
-?>
-
-<div class="elgg-layout-sidebar elgg-center elgg-width-classic clearfix">
- <div class="elgg-sidebar elgg-aside">
- <?php
- echo elgg_view('layout/elements/sidebar', $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/layout/shells/one_sidebar.php b/views/default/layout/shells/one_sidebar.php
deleted file mode 100644
index 00c661e2f..000000000
--- a/views/default/layout/shells/one_sidebar.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?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
- */
-
-$class = 'elgg-inner clearfix';
-if (isset($vars['class'])) {
- $class = "$class {$vars['class']}";
-}
-
-?>
-
-<div class="<?php echo $class; ?>" id="elgg-layout-sidebar">
- <div class="elgg-sidebar elgg-aside">
- <?php
- echo elgg_view('layout/elements/sidebar', $vars);
- ?>
- </div>
-
- <div class="elgg-main elgg-body">
- <?php
- 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/layout/shells/two_sidebar.php b/views/default/layout/shells/two_sidebar.php
deleted file mode 100644
index 5a033e091..000000000
--- a/views/default/layout/shells/two_sidebar.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?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-inner clearfix';
-if (isset($vars['class'])) {
- $class = "$class {$vars['class']}";
-}
-?>
-
-<div class="<?php echo $class; ?>" id="elgg-layout-two-sidebar">
- <div class="elgg-sidebar elgg-aside">
- <?php
- echo elgg_view('layout/elements/sidebar', $vars);
- ?>
- </div>
- <div class="elgg-sidebar-alt elgg-aside">
- <?php
- //$params = $vars;
- //$params['sidebar'] = $vars['sidebar-alt'];
- $params = array(
- 'sidebar' => elgg_view('layout/objects/module', array('title' => 'Testing', 'body' => 'Hello, world!'))
- );
- echo elgg_view('layout/elements/sidebar', $params);
- ?>
- </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/layout/shells/widgets.php b/views/default/layout/shells/widgets.php
deleted file mode 100644
index e5b63114b..000000000
--- a/views/default/layout/shells/widgets.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-/**
- * Elgg widgets layout
- *
- * @uses $vars['box'] Optional display box at the top of layout
- * @uses $vars['num_columns'] Number of widget columns for this layout
- * @uses $vars['show_add_widgets'] Display the add widgets button and panel
- */
-
-$box = elgg_get_array_value('box', $vars, '');
-$num_columns = elgg_get_array_value('num_columns', $vars, 3);
-$show_add_widgets = elgg_get_array_value('show_add_widgets', $vars, true);
-
-$owner = elgg_get_page_owner();
-$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('layout/shells/widgets/add_button');
- }
- $params = array(
- 'widgets' => $widgets,
- 'context' => $context,
- );
- echo elgg_view('layout/shells/widgets/add_panel', $params);
-}
-
-echo $vars['box'];
-
-$widget_class = "widget-{$num_columns}-columns";
-for ($column_index = 1; $column_index <= $num_columns; $column_index++) {
- $column_widgets = $widgets[$column_index];
-
- echo "<div class=\"widget-column $widget_class\" id=\"widget-col-$column_index\">";
- if (is_array($column_widgets) && sizeof($column_widgets) > 0) {
- foreach ($column_widgets as $widget) {
- echo elgg_view_entity($widget);
- }
- }
- echo '</div>';
-}
-
-elgg_pop_context(); \ No newline at end of file
diff --git a/views/default/layout/shells/widgets/add_button.php b/views/default/layout/shells/widgets/add_button.php
deleted file mode 100644
index 92de8a99f..000000000
--- a/views/default/layout/shells/widgets/add_button.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-
-?>
-<div id="widget-add-button">
-<?php
-$options = array(
- 'href' => '#',
- 'text' => elgg_echo('widgets:add'),
- 'class' => 'action-button',
-);
-echo elgg_view('output/url', $options);
-?>
-</div>
diff --git a/views/default/layout/shells/widgets/add_panel.php b/views/default/layout/shells/widgets/add_panel.php
deleted file mode 100644
index d9acc5518..000000000
--- a/views/default/layout/shells/widgets/add_panel.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-
-$widgets = $vars['widgets'];
-$context = $vars['context'];
-
-$widget_types = elgg_get_widget_types($context);
-
-$current_handlers = array();
-foreach ($widgets as $column_widgets) {
- foreach ($column_widgets as $widget) {
- $current_handlers[] = $widget->handler;
- }
-}
-
-?>
-<div class="widgets-add-panel hidden">
- <p>
- <?php echo elgg_echo('widgets:add:description'); ?>
- </p>
- <ul>
-<?php
- foreach ($widget_types as $handler => $widget_type) {
- $id = "widget-type-$handler";
- // check if widget added and only one instance allowed
- if ($widget_type->multiple == false && in_array($handler, $current_handlers)) {
- $class = 'widget-unavailable';
- $tooltip = elgg_echo('widget:unavailable');
- } else {
- $class = 'widget-available';
- $tooltip = $widget_type->description;
- }
-
- if ($widget_type->multiple) {
- $class .= ' widget-multiple';
- } else {
- $class .= ' widget-single';
- }
-
- echo "<li title=\"$tooltip\" id=\"$id\" class=\"$class\">$widget_type->name</li>";
- }
-?>
- </ul>
-<?php
- $params = array(
- 'internalname' => 'widget-context',
- 'value' => $context
- );
- echo elgg_view('input/hidden', $params);
-?>
- <div class="clearfloat"></div>
-</div>