aboutsummaryrefslogtreecommitdiff
path: root/views/default/layout
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/layout')
-rw-r--r--views/default/layout/objects/media.php55
-rw-r--r--views/default/layout/objects/module.php74
-rw-r--r--views/default/layout/shells/administration.php36
-rw-r--r--views/default/layout/shells/content.php53
-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.php16
-rw-r--r--views/default/layout/shells/one_column_with_sidebar.php31
-rw-r--r--views/default/layout/shells/one_sidebar.php31
-rw-r--r--views/default/layout/shells/two_sidebar.php42
-rw-r--r--views/default/layout/shells/widgets.php46
14 files changed, 0 insertions, 505 deletions
diff --git a/views/default/layout/objects/media.php b/views/default/layout/objects/media.php
deleted file mode 100644
index 232acc8f1..000000000
--- a/views/default/layout/objects/media.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-/**
- * Elgg media element
- *
- * ---------------------------------------------------
- * | | |
- * | icon | body |
- * | block | block |
- * | | |
- * ---------------------------------------------------
- *
- * @uses $vars['body'] HTML content of the body block
- * @uses $vars['icon'] HTML content of the icon block
- * @uses $vars['class'] Optional additional class for media element
- * @uses $vars['id'] Optional id for the media element
- * @uses $vars['body_class'] Optional additional class for body block
- * @uses $vars['icon_class'] Optional additional class for icon block
- */
-
-$body = elgg_get_array_value('body', $vars, '');
-$icon_block = elgg_get_array_value('icon', $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_class = 'elgg-body';
-$additional_class = elgg_get_array_value('body_class', $vars, '');
-if ($additional_class) {
- $body_class = "$body_class $additional_class";
-}
-$body = "<div class=\"$body_class\">$body</div>";
-
-$icon_class = 'elgg-icon';
-$additional_class = elgg_get_array_value('icon_class', $vars, '');
-if ($additional_class) {
- $icon_class = "$icon_class $additional_class";
-}
-if ($icon_block) {
- $icon_block = "<div class=\"$icon_class\">$icon_block</div>";
-}
-
-echo <<<HTML
-<div class="$class clearfix" $id>
- $icon_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 ffce583ff..000000000
--- a/views/default/layout/objects/module.php
+++ /dev/null
@@ -1,74 +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['header_class'] Optional additional class for header
- * @uses $vars['body_class'] Optional additional class for body
- * @uses $vars['footer_class'] Optional additional class for footer
- * @uses $vars['skip_inner'] Optional flag to leave out inner div
- */
-
-$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, '');
-$skip_inner = elgg_get_array_value('skip_inner', $vars, false);
-
-$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']}\"";
-}
-
-
-$header_class = 'elgg-header';
-$additional_class = elgg_get_array_value('header_class', $vars, '');
-if ($additional_class) {
- $header_class = "$header_class $additional_class";
-}
-
-if (isset($vars['header'])) {
- if ($vars['header']) {
- $header = "<div class=\"$header_class\">$header</div>";
- }
-} else {
- $header = "<div class=\"$header_class\"><h3>$title</h3></div>";
-}
-
-$body_class = 'elgg-body';
-$additional_class = elgg_get_array_value('body_class', $vars, '');
-if ($additional_class) {
- $body_class = "$body_class $additional_class";
-}
-$body = "<div class=\"$body_class\">$body</div>";
-
-
-$footer_class = 'elgg-footer';
-$additional_class = elgg_get_array_value('footer_class', $vars, '');
-if ($additional_class) {
- $body_class = "$footer_class $additional_class";
-}
-
-if (isset($vars['footer'])) {
- if ($vars['footer']) {
- $header = "<div class=\"$footer_class\">$footer</div>";
- }
-}
-
-$contents = $header . $body . $footer;
-if (!$skip_inner) {
- $contents = "<div class=\"elgg-inner\">$contents</div>";
-}
-
-echo "<div class=\"$class\" $id>$contents</div>";
diff --git a/views/default/layout/shells/administration.php b/views/default/layout/shells/administration.php
deleted file mode 100644
index f7ed84935..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('page_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 b46f09ac1..000000000
--- a/views/default/layout/shells/content.php
+++ /dev/null
@@ -1,53 +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
- */
-
-// 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(
- 'body' => $body,
- 'sidebar' => $sidebar,
-);
-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 0b2562450..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: everyone, 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 == 'everyone'),
- ),
- '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 84a304e14..000000000
--- a/views/default/layout/shells/one_column.php
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-/**
- * Elgg one-column layout
- *
- * @package Elgg
- * @subpackage Core
- *
- * @uses $vars['content'] Content string
- */
-?>
-<div class="elgg-layout-one_column elgg-center elgg-width-classic clearfix">
- <div class="elgg-body">
- <?php echo $vars['content']; ?>
- <?php 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 e408c6c1c..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('page_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 d0bb3879f..000000000
--- a/views/default/layout/shells/one_sidebar.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-/**
- * Elgg main column with one sidebar layout
- *
- * @package Elgg
- * @subpackage Core
- *
- * @uses $vars['body'] Content HTML 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('page_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['body'])) {
- echo $vars['body'];
- }
- ?>
- </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 26fb64920..000000000
--- a/views/default/layout/shells/two_sidebar.php
+++ /dev/null
@@ -1,42 +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
- */
-?>
-
-<div class="elgg-layout-two-sidebar elgg-center elgg-width-classic clearfix">
- <div class="elgg-sidebar elgg-aside">
- <?php
- echo elgg_view('page_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_elements/module', array('title' => 'Testing', 'body' => 'Hello, world!'))
- );
- echo elgg_view('page_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 130b2eaad..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('widgets/add-button');
- }
- $params = array(
- 'widgets' => $widgets,
- 'context' => $context,
- );
- echo elgg_view('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