aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/classes/ElggMenuBuilder.php5
-rw-r--r--engine/classes/ElggMenuItem.php16
-rw-r--r--engine/lib/admin.php17
-rw-r--r--engine/lib/elgglib.php4
-rw-r--r--engine/lib/users.php8
-rw-r--r--mod/embed/start.php2
-rw-r--r--mod/messages/start.php2
-rw-r--r--mod/reportedcontent/start.php2
-rw-r--r--views/default/admin/footer.php5
-rw-r--r--views/default/admin/sidebar.php2
-rw-r--r--views/default/css/admin.php13
-rw-r--r--views/default/css/elements/navigation.php9
-rw-r--r--views/default/input/longtext.php2
-rw-r--r--views/default/page/elements/footer.php2
-rw-r--r--views/default/page/elements/topbar.php2
-rw-r--r--views/default/page/layouts/content/filter.php2
-rw-r--r--views/default/page/layouts/content/header.php2
-rw-r--r--views/default/river/item/controls.php2
18 files changed, 63 insertions, 34 deletions
diff --git a/engine/classes/ElggMenuBuilder.php b/engine/classes/ElggMenuBuilder.php
index 9112c9535..bafed2cea 100644
--- a/engine/classes/ElggMenuBuilder.php
+++ b/engine/classes/ElggMenuBuilder.php
@@ -66,6 +66,7 @@ class ElggMenuBuilder {
// get menu items for this context
$selected_menu = array();
foreach ($this->menu as $menu_item) {
+ //var_dump($menu_item);
if ($menu_item->inContext()) {
$selected_menu[] = $menu_item;
}
@@ -182,7 +183,7 @@ class ElggMenuBuilder {
case 'name':
$sort_callback = array('ElggMenuBuilder', 'compareByName');
break;
- case 'weight':
+ case 'priority':
$sort_callback = array('ElggMenuBuilder', 'compareByWeight');
break;
case 'order':
@@ -249,7 +250,7 @@ class ElggMenuBuilder {
}
/**
- * Compare two menu items by their weight
+ * Compare two menu items by their priority
*
* @param ElggMenuItem $a
* @param ElggMenuItem $b
diff --git a/engine/classes/ElggMenuItem.php b/engine/classes/ElggMenuItem.php
index 1e1981ab9..0204a85c7 100644
--- a/engine/classes/ElggMenuItem.php
+++ b/engine/classes/ElggMenuItem.php
@@ -49,9 +49,9 @@ class ElggMenuItem {
protected $title = '';
/**
- * @var int Menu weight - smaller weights float to the top
+ * @var int Menu priority - smaller prioritys float to the top
*/
- protected $weight = 100;
+ protected $priority = 100;
/**
* @var bool Is this the currently selected menu item
@@ -297,23 +297,23 @@ class ElggMenuItem {
}
/**
- * Set the weight of the menu item
+ * Set the priority of the menu item
*
- * @param int $weight The lower weight items float to the top of the menu
+ * @param int $priority The smaller numbers mean higher priority (1 before 100)
*
* @return void
*/
- public function setWeight($weight) {
- $this->weight = $weight;
+ public function setWeight($priority) {
+ $this->priority = $priority;
}
/**
- * Get the weight of the menu item
+ * Get the priority of the menu item
*
* @return int
*/
public function getWeight() {
- return $this->weight;
+ return $this->priority;
}
/**
diff --git a/engine/lib/admin.php b/engine/lib/admin.php
index e14dc7826..176ef21e5 100644
--- a/engine/lib/admin.php
+++ b/engine/lib/admin.php
@@ -119,12 +119,12 @@ function elgg_admin_notice_exists($id) {
*
* @param string $menu_id The Unique ID of section
* @param string $parent_id If a child section, the parent section id.
- * @param int $weight The menu item weight
+ * @param int $priority The menu item priority
*
* @return bool
* @since 1.8.0
*/
-function elgg_register_admin_menu_item($menu_id, $parent_id = NULL, $weight = 100) {
+function elgg_register_admin_menu_item($menu_id, $parent_id = NULL, $priority = 100) {
// make sure parent is registered
if ($parent_id && !elgg_is_menu_item_registered('page', $parent_id)) {
@@ -149,7 +149,7 @@ function elgg_register_admin_menu_item($menu_id, $parent_id = NULL, $weight = 10
'text' => elgg_echo("admin:$name"),
'context' => 'admin',
'parent_name' => $parent_id,
- 'weight' => $weight,
+ 'priority' => $priority,
));
}
@@ -212,14 +212,14 @@ function admin_init() {
'href' => 'pg/admin/dashboard',
'text' => elgg_echo('admin:dashboard'),
'context' => 'admin',
- 'weight' => 10,
+ 'priority' => 10,
));
elgg_register_menu_item('topbar', array(
'name' => 'administration',
'href' => 'pg/admin',
'text' => elgg_view_icon('settings') . elgg_echo('admin'),
- 'weight' => 100,
+ 'priority' => 100,
'section' => 'alt',
));
@@ -280,6 +280,13 @@ function admin_pagesetup() {
$url = elgg_get_simplecache_url('css', 'admin');
elgg_register_css($url, 'admin');
elgg_unregister_css('elgg');
+
+ // setup footer menu
+ elgg_register_menu_item('admin_footer', array(
+ 'name' => 'faq',
+ 'text' => elgg_echo('admin:faq'),
+ 'href' => 'http://docs.elgg.org/wiki/Category:Administration_FAQ',
+ ));
}
}
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index b27a71b08..24227e0e8 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -1818,7 +1818,7 @@ function elgg_init() {
'name' => 'elgg_logo',
'href' => 'http://www.elgg.org/',
'text' => "<img src=\"$logo_url\" alt=\"Elgg logo\" />",
- 'weight' => 1,
+ 'priority' => 1,
));
$powered_url = elgg_get_site_url() . "_graphics/powered_by_elgg_badge_drk_bckgnd.gif";
@@ -1828,7 +1828,7 @@ function elgg_init() {
'href' => 'http://elgg.org',
'text' => "<img src=\"$powered_url\" alt=\"Powered by Elgg\" width=\"106\" height=\"15\" />",
'section' => 'alt',
- 'weight' => 1000,
+ 'priority' => 1000,
));
// Sets a blacklist of words in the current language.
diff --git a/engine/lib/users.php b/engine/lib/users.php
index 99466bf73..0b620e578 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -1506,7 +1506,7 @@ function users_pagesetup() {
'name' => 'profile',
'href' => $user->getURL(),
'text' => "<img src=\"{$user->getIconURL('topbar')}\" alt=\"$user->name\" />",
- 'weight' => 100,
+ 'priority' => 100,
));
elgg_register_menu_item('topbar', array(
@@ -1514,14 +1514,14 @@ function users_pagesetup() {
'href' => "pg/friends/{$user->username}",
'text' => elgg_view_icon('friends'),
'title' => elgg_echo('friends'),
- 'weight' => 300,
+ 'priority' => 300,
));
elgg_register_menu_item('topbar', array(
'name' => 'usersettings',
'href' => "pg/settings/user/{$user->username}",
'text' => elgg_view_icon('settings') . elgg_echo('settings'),
- 'weight' => 500,
+ 'priority' => 500,
'section' => 'alt',
));
@@ -1530,7 +1530,7 @@ function users_pagesetup() {
'href' => "action/logout",
'text' => elgg_echo('logout'),
'is_action' => TRUE,
- 'weight' => 1000,
+ 'priority' => 1000,
'section' => 'alt',
));
diff --git a/mod/embed/start.php b/mod/embed/start.php
index edfcfdd3c..1a6cfce94 100644
--- a/mod/embed/start.php
+++ b/mod/embed/start.php
@@ -36,7 +36,7 @@ function embed_longtext_menu($hook, $type, $items, $vars) {
'text' => elgg_echo('media:insert'),
'rel' => 'facebox',
'class' => 'elgg-longtext-control',
- 'weight' => 1,
+ 'priority' => 1,
));
return $items;
diff --git a/mod/messages/start.php b/mod/messages/start.php
index 5e258824f..27b6252eb 100644
--- a/mod/messages/start.php
+++ b/mod/messages/start.php
@@ -45,7 +45,7 @@ function messages_init() {
'name' => 'messages',
'href' => 'pg/messages/inbox/' . elgg_get_logged_in_user_entity()->username,
'text' => $text,
- 'weight' => 600,
+ 'priority' => 600,
));
}
diff --git a/mod/reportedcontent/start.php b/mod/reportedcontent/start.php
index bd5931bd1..b92ab0f30 100644
--- a/mod/reportedcontent/start.php
+++ b/mod/reportedcontent/start.php
@@ -31,7 +31,7 @@ function reportedcontent_init() {
'title' => elgg_echo('reportedcontent:this:tooltip'),
'text' => elgg_view_icon('report-this') . elgg_echo('reportedcontent:this'),
'section' => 'alt',
- 'weight' => 500,
+ 'priority' => 500,
));
}
diff --git a/views/default/admin/footer.php b/views/default/admin/footer.php
index 3b773bda7..72f00fc55 100644
--- a/views/default/admin/footer.php
+++ b/views/default/admin/footer.php
@@ -1,4 +1,7 @@
<?php
/**
* Elgg admin footer. Extend this view to add content to the admin footer
- */ \ No newline at end of file
+ */
+
+echo elgg_view_menu('admin_footer');
+echo 'test'; \ No newline at end of file
diff --git a/views/default/admin/sidebar.php b/views/default/admin/sidebar.php
index ef3c6a359..b2c520705 100644
--- a/views/default/admin/sidebar.php
+++ b/views/default/admin/sidebar.php
@@ -3,6 +3,6 @@
* Admin sidebar -- just outputs the page menu
*/
-$content = elgg_view_menu('page', array('sort_by' => 'weight'));
+$content = elgg_view_menu('page', array('sort_by' => 'priority'));
echo elgg_view_module('main', '', $content); \ No newline at end of file
diff --git a/views/default/css/admin.php b/views/default/css/admin.php
index b32e1382b..8639af5ea 100644
--- a/views/default/css/admin.php
+++ b/views/default/css/admin.php
@@ -217,7 +217,6 @@ table.mceLayout {
border: 2px solid #dddddd;
}
-
/* ***************************************
BODY
*************************************** */
@@ -247,6 +246,18 @@ table.mceLayout {
}
/* ***************************************
+ FOOTER
+*************************************** */
+.elgg-page-footer {
+ background-color: black;
+ height: 100%;
+}
+.elgg-page-footer > .elgg-inner {
+ margin: 0 auto;
+ padding: 10px 40px;
+}
+
+/* ***************************************
SIDEBAR MENU
*************************************** */
.elgg-menu-page a {
diff --git a/views/default/css/elements/navigation.php b/views/default/css/elements/navigation.php
index 210ff4cbe..d8c857b8c 100644
--- a/views/default/css/elements/navigation.php
+++ b/views/default/css/elements/navigation.php
@@ -428,4 +428,11 @@
/* Ick. Allows the horizontal menu to hold image blocks without breaking */
.elgg-menu-metadata .elgg-body:after {
content: '.';
-} \ No newline at end of file
+}
+
+/* ***************************************
+ LONGTEXT
+*************************************** */
+.elgg-menu-longtext {
+ float: right;
+}
diff --git a/views/default/input/longtext.php b/views/default/input/longtext.php
index edff2da87..b4f621f92 100644
--- a/views/default/input/longtext.php
+++ b/views/default/input/longtext.php
@@ -21,5 +21,5 @@ unset($vars['internalid']);
$vars = array_merge($defaults, $vars);
-echo elgg_view_menu('longtext', array('sort_by' => 'weight'));
+echo elgg_view_menu('longtext', array('sort_by' => 'priority'));
echo elgg_view('input/plaintext', $vars);
diff --git a/views/default/page/elements/footer.php b/views/default/page/elements/footer.php
index e818c0eff..5c8caf2de 100644
--- a/views/default/page/elements/footer.php
+++ b/views/default/page/elements/footer.php
@@ -8,4 +8,4 @@
*
*/
-echo elgg_view_menu('footer', array('sort_by' => 'weight', 'class' => 'elgg-menu-hz')); \ No newline at end of file
+echo elgg_view_menu('footer', array('sort_by' => 'priority', 'class' => 'elgg-menu-hz')); \ No newline at end of file
diff --git a/views/default/page/elements/topbar.php b/views/default/page/elements/topbar.php
index 849b1fdcd..b69c101a2 100644
--- a/views/default/page/elements/topbar.php
+++ b/views/default/page/elements/topbar.php
@@ -7,7 +7,7 @@
// Elgg logo
-echo elgg_view_menu('topbar', array('sort_by' => 'weight', array('elgg-menu-hz')));
+echo elgg_view_menu('topbar', array('sort_by' => 'priority', array('elgg-menu-hz')));
// elgg tools menu
// need to echo this empty view for backward compatibility.
diff --git a/views/default/page/layouts/content/filter.php b/views/default/page/layouts/content/filter.php
index 7577f2839..649113f5f 100644
--- a/views/default/page/layouts/content/filter.php
+++ b/views/default/page/layouts/content/filter.php
@@ -45,5 +45,5 @@ if (elgg_is_logged_in() && $context) {
elgg_register_menu_item('filter', $tab);
}
- echo elgg_view_menu('filter', array('sort_by' => 'weight', 'class' => 'elgg-menu-hz'));
+ echo elgg_view_menu('filter', array('sort_by' => 'priority', 'class' => 'elgg-menu-hz'));
}
diff --git a/views/default/page/layouts/content/header.php b/views/default/page/layouts/content/header.php
index cbdd1071a..830c33885 100644
--- a/views/default/page/layouts/content/header.php
+++ b/views/default/page/layouts/content/header.php
@@ -41,7 +41,7 @@ if ($context) {
));
}
- $buttons = elgg_view_menu('title', array('sort_by' => 'weight', 'class' => 'elgg-menu-hz'));
+ $buttons = elgg_view_menu('title', array('sort_by' => 'priority', 'class' => 'elgg-menu-hz'));
}
echo <<<HTML
<div class="elgg-head clearfix">
diff --git a/views/default/river/item/controls.php b/views/default/river/item/controls.php
index 96979f2c5..50c1ae09e 100644
--- a/views/default/river/item/controls.php
+++ b/views/default/river/item/controls.php
@@ -47,5 +47,5 @@ if (elgg_is_logged_in()) {
}
}
- echo elgg_view_menu('river', array('sort_by' => 'weight', 'item' => $vars['item']));
+ echo elgg_view_menu('river', array('sort_by' => 'priority', 'item' => $vars['item']));
} \ No newline at end of file