aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'views/default')
-rw-r--r--views/default/output/friendlytime.php3
-rw-r--r--views/default/page/admin.php66
-rw-r--r--views/default/page/default.php74
-rw-r--r--views/default/page/elements/doctype.php1
-rw-r--r--views/default/page/elements/foot.php11
-rw-r--r--views/default/page/elements/footer.php22
-rw-r--r--views/default/page/elements/head.php79
-rw-r--r--views/default/page/elements/owner_block.php31
-rw-r--r--views/default/page/layouts/admin.php40
-rw-r--r--views/default/page/layouts/one_sidebar.php48
-rw-r--r--views/default/page/layouts/two_sidebar.php43
-rw-r--r--views/default/page/walled_garden.php27
12 files changed, 443 insertions, 2 deletions
diff --git a/views/default/output/friendlytime.php b/views/default/output/friendlytime.php
index 3618e7f56..c9c74e880 100644
--- a/views/default/output/friendlytime.php
+++ b/views/default/output/friendlytime.php
@@ -8,5 +8,6 @@
$friendly_time = elgg_get_friendly_time($vars['time']);
$timestamp = htmlentities(date(elgg_echo('friendlytime:date_format'), $vars['time']));
+$datetime = htmlentities(date("Y-m-d h:m", $vars['time']));
-echo "<time title=\"$timestamp\" class=\"timestamp\">$friendly_time</time>";
+echo "<time title=\"$timestamp\" datetime=\"$datetime\" class=\"timestamp\">$friendly_time</time>";
diff --git a/views/default/page/admin.php b/views/default/page/admin.php
new file mode 100644
index 000000000..7d0449096
--- /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>
+<html 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/default.php b/views/default/page/default.php
new file mode 100644
index 000000000..f75fa1908
--- /dev/null
+++ b/views/default/page/default.php
@@ -0,0 +1,74 @@
+<?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");
+
+?>
+<!DOCTYPE html>
+<html lang="en">
+<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()): ?>
+ <header class="elgg-page-topbar">
+ <div class="elgg-inner">
+ <?php echo $topbar; ?>
+ </div>
+ </header>
+ <?php endif; ?>
+
+ <header class="elgg-page-header">
+ <div class="elgg-inner">
+ <?php echo $header; ?>
+ </div>
+ </header>
+ <div class="elgg-page-body">
+ <div class="elgg-inner">
+ <?php echo $body; ?>
+ </div>
+ </div>
+ <footer class="elgg-page-footer">
+ <div class="elgg-inner">
+ <?php echo $footer; ?>
+ </div>
+ </footer>
+</div>
+<?php echo elgg_view('page/elements/foot'); ?>
+</body>
+</html> \ No newline at end of file
diff --git a/views/default/page/elements/doctype.php b/views/default/page/elements/doctype.php
deleted file mode 100644
index 763b0739b..000000000
--- a/views/default/page/elements/doctype.php
+++ /dev/null
@@ -1 +0,0 @@
-<!DOCTYPE html> \ No newline at end of file
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
new file mode 100644
index 000000000..ded2cea9a
--- /dev/null
+++ b/views/default/page/elements/footer.php
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Elgg footer
+ * The standard HTML footer that displays across the site
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ */
+
+echo elgg_view_menu('footer', array('sort_by' => 'priority', 'class' => 'elgg-menu-hz'));
+
+$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..b1556b547
--- /dev/null
+++ b/views/default/page/elements/head.php
@@ -0,0 +1,79 @@
+<?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 = 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_loaded_js('head');
+$css = elgg_get_loaded_css();
+
+$version = get_version();
+$release = get_version(true);
+?>
+ <meta 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">
+ <?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;
+} \ No newline at end of file
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/layouts/admin.php b/views/default/page/layouts/admin.php
new file mode 100644
index 000000000..f9975d3e4
--- /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">
+ <aside class="elgg-sidebar clearfix">
+ <?php
+ echo elgg_view('admin/sidebar', $vars);
+ ?>
+ </aside>
+ <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/one_sidebar.php b/views/default/page/layouts/one_sidebar.php
new file mode 100644
index 000000000..61d6fed0e
--- /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; ?>">
+ <aside class="elgg-sidebar">
+ <?php
+ echo elgg_view('page/elements/sidebar', $vars);
+ ?>
+ </aside>
+
+ <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_sidebar.php b/views/default/page/layouts/two_sidebar.php
new file mode 100644
index 000000000..b2660a155
--- /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; ?>">
+ <aside class="elgg-sidebar">
+ <?php
+ echo elgg_view('page/elements/sidebar', $vars);
+ ?>
+ </aside>
+ <aside class="elgg-sidebar-alt">
+ <?php
+ echo elgg_view('page/elements/sidebar_alt', $vars);
+ ?>
+ </aside>
+
+ <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/walled_garden.php b/views/default/page/walled_garden.php
new file mode 100644
index 000000000..e1d57dac8
--- /dev/null
+++ b/views/default/page/walled_garden.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Walled garden page shell
+ *
+ * Used for the walled garden index page
+ */
+
+// Set the content type
+header("Content-type: text/html; charset=UTF-8");
+?>
+<!DOCTYPE html>
+<html 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="elgg-body-walledgarden">
+ <?php echo $vars['body']; ?>
+ </div>
+</div>
+<?php echo elgg_view('page/elements/foot'); ?>
+</body>
+</html> \ No newline at end of file