aboutsummaryrefslogtreecommitdiff
path: root/views/default/page/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/page/layouts')
-rw-r--r--views/default/page/layouts/admin.php5
-rw-r--r--views/default/page/layouts/content.php1
-rw-r--r--views/default/page/layouts/content/header.php55
-rw-r--r--views/default/page/layouts/one_column.php15
-rw-r--r--views/default/page/layouts/widgets/add_button.php11
5 files changed, 49 insertions, 38 deletions
diff --git a/views/default/page/layouts/admin.php b/views/default/page/layouts/admin.php
index 890c8a06e..8dbdc27e6 100644
--- a/views/default/page/layouts/admin.php
+++ b/views/default/page/layouts/admin.php
@@ -21,6 +21,11 @@
<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']);
}
diff --git a/views/default/page/layouts/content.php b/views/default/page/layouts/content.php
index 35d695f0a..c406c9faf 100644
--- a/views/default/page/layouts/content.php
+++ b/views/default/page/layouts/content.php
@@ -10,7 +10,6 @@
* @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
*/
diff --git a/views/default/page/layouts/content/header.php b/views/default/page/layouts/content/header.php
index 403da8a0a..1e66e52db 100644
--- a/views/default/page/layouts/content/header.php
+++ b/views/default/page/layouts/content/header.php
@@ -2,51 +2,42 @@
/**
* Main content header
*
- * This includes a title and a new content button by default
+ * 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)
- * @uses $vars['buttons'] Content header buttons (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());
-if ($context) {
- $title = elgg_extract('title', $vars, '');
- if (!$title) {
- $title = elgg_echo($context);
- }
- if (isset($vars['buttons'])) {
- $buttons = $vars['buttons'];
- } else {
- if (elgg_is_logged_in() && $context) {
- $owner = elgg_get_page_owner_entity();
- if (!$owner) {
- // this is probably an all page
- $owner = elgg_get_logged_in_user_entity();
- }
- if ($owner && $owner->canWriteToContainer()) {
- $guid = $owner->getGUID();
- elgg_register_menu_item('title', array(
- 'name' => 'add',
- 'href' => elgg_extract('new_link', $vars, "$context/add/$guid"),
- 'text' => elgg_echo("$context:add"),
- 'link_class' => 'elgg-button elgg-button-action',
- ));
- }
- }
-
- $buttons = elgg_view_menu('title', array('sort_by' => 'priority', 'class' => 'elgg-menu-hz'));
- }
- echo <<<HTML
+$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">
- <h2 class="elgg-heading-main">$title</h2>$buttons
+ $title$buttons
</div>
HTML;
-}
diff --git a/views/default/page/layouts/one_column.php b/views/default/page/layouts/one_column.php
index c59a574e7..7546a4cdf 100644
--- a/views/default/page/layouts/one_column.php
+++ b/views/default/page/layouts/one_column.php
@@ -13,11 +13,22 @@ $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">
- <?php echo $vars['content']; ?>
+ <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
echo $vars['area1'];
?>
diff --git a/views/default/page/layouts/widgets/add_button.php b/views/default/page/layouts/widgets/add_button.php
index a8670146b..89e83b096 100644
--- a/views/default/page/layouts/widgets/add_button.php
+++ b/views/default/page/layouts/widgets/add_button.php
@@ -4,7 +4,12 @@
*/
?>
<div class="elgg-widget-add-control">
- <a class="elgg-button elgg-button-action elgg-toggler" href="#widgets-add-panel">
- <?php echo elgg_echo('widgets:add'); ?>
- </a>
+<?php
+ echo elgg_view('output/url', array(
+ 'href' => '#widgets-add-panel',
+ 'text' => elgg_echo('widgets:add'),
+ 'class' => 'elgg-button elgg-button-action',
+ 'rel' => 'toggle',
+ ));
+?>
</div>