aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'views/default')
-rw-r--r--views/default/admin/footer.php4
-rw-r--r--views/default/admin/header.php25
-rw-r--r--views/default/page/admin.php31
-rw-r--r--views/default/page/layouts/admin.php48
4 files changed, 61 insertions, 47 deletions
diff --git a/views/default/admin/footer.php b/views/default/admin/footer.php
new file mode 100644
index 000000000..3b773bda7
--- /dev/null
+++ b/views/default/admin/footer.php
@@ -0,0 +1,4 @@
+<?php
+/**
+ * Elgg admin footer. Extend this view to add content to the admin footer
+ */ \ No newline at end of file
diff --git a/views/default/admin/header.php b/views/default/admin/header.php
new file mode 100644
index 000000000..826fbdb9a
--- /dev/null
+++ b/views/default/admin/header.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Elgg admin header
+ */
+$admin_title = elgg_get_site_entity()->name . ' ' . elgg_echo('admin');
+
+$view_site = elgg_view('output/url', array(
+ 'href' => elgg_get_site_url(),
+ 'text' => elgg_echo('admin:view_site'),
+));
+$logout = elgg_view('output/url', array(
+ 'href' => 'action/logout',
+ 'text' => elgg_echo('logout'),
+));
+?>
+<h1 class="elgg-heading-site">
+ <a href="<?php echo elgg_get_site_url(); ?>pg/admin/">
+ <?php echo $admin_title; ?>
+ </a>
+</h1>
+<ul class="elgg-menu-user">
+ <li><?php echo elgg_echo('admin:loggedin', array(elgg_get_logged_in_user_entity()->name)); ?></li>
+ <li><?php echo $view_site; ?></li>
+ <li><?php echo $logout; ?></li>
+</ul> \ No newline at end of file
diff --git a/views/default/page/admin.php b/views/default/page/admin.php
index 211bd4037..aa8581a74 100644
--- a/views/default/page/admin.php
+++ b/views/default/page/admin.php
@@ -12,6 +12,20 @@
// Set the content type
header("Content-type: text/html; charset=UTF-8");
+
+// @todo clean up system messages code
+$messages = null;
+if (count_messages()) {
+ // get messages - try for errors first
+ $messages = system_messages(NULL, "error");
+ if (count($messages["error"]) == 0) {
+ // no errors so grab rest of messages
+ $messages = system_messages(null, "");
+ } else {
+ // we have errors - clear out remaining messages
+ system_messages(null, "");
+ }
+}
?>
<!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">
@@ -20,7 +34,22 @@ header("Content-type: text/html; charset=UTF-8");
</head>
<body>
<div class="elgg-page elgg-page-admin">
- <?php echo $vars['body']; ?>
+ <div class="elgg-page-header">
+ <div class="elgg-inner clearfix">
+ <?php echo elgg_view('admin/header'); ?>
+ </div>
+ </div>
+ <div class="elgg-page-messages">
+ <?php echo elgg_view('page/elements/messages', array('object' => $messages)); ?>
+ </div>
+ <div class="elgg-page-body">
+ <?php echo $vars['body']; ?>
+ </div>
+ <div class="elgg-page-footer">
+ <div class="elgg-inner">
+ <?php echo elgg_view('admin/footer'); ?>
+ </div>
+ </div>
</div>
<?php echo elgg_view('footer/analytics'); ?>
</body>
diff --git a/views/default/page/layouts/admin.php b/views/default/page/layouts/admin.php
index 680f1b125..890c8a06e 100644
--- a/views/default/page/layouts/admin.php
+++ b/views/default/page/layouts/admin.php
@@ -10,51 +10,9 @@
* @uses $vars['title'] Title string
*/
-$admin_title = elgg_get_site_entity()->name . ' ' . elgg_echo('admin');
-
-$view_site = elgg_view('output/url', array(
- 'href' => elgg_get_site_url(),
- 'text' => elgg_echo('admin:view_site'),
-));
-$logout = elgg_view('output/url', array(
- 'href' => 'action/logout',
- 'text' => elgg_echo('logout'),
-));
-?>
-
-<div class="elgg-page-header">
- <div class="elgg-inner clearfix">
- <h1 class="elgg-heading-site">
- <a href="<?php echo elgg_get_site_url(); ?>pg/admin/">
- <?php echo $admin_title; ?>
- </a>
- </h1>
- <ul class="elgg-menu-user">
- <li><?php echo elgg_echo('admin:loggedin', array(elgg_get_logged_in_user_entity()->name)); ?></li>
- <li><?php echo $view_site; ?></li>
- <li><?php echo $logout; ?></li>
- </ul>
- </div>
-</div>
-
-<?php
-// @todo clean up system messages code
-$messages = null;
-if (count_messages()) {
- // get messages - try for errors first
- $messages = system_messages(NULL, "error");
- if (count($messages["error"]) == 0) {
- // no errors so grab rest of messages
- $messages = system_messages(null, "");
- } else {
- // we have errors - clear out remaining messages
- system_messages(null, "");
- }
-}
-echo elgg_view('page/elements/messages', array('object' => $messages));
?>
-<div class="elgg-page-body">
+<div class="elgg-layout elgg-layout-one-sidebar">
<div class="elgg-sidebar clearfix">
<?php
echo elgg_view('admin/sidebar', $vars);
@@ -74,6 +32,4 @@ echo elgg_view('page/elements/messages', array('object' => $messages));
}
?>
</div>
-</div>
-<div class="elgg-page-footer">
-</div>
+</div> \ No newline at end of file