aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-01 05:52:58 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-01 05:52:58 +0000
commit9aefe356f87750d2a66f8e7f0dd3f0247dafd3e0 (patch)
tree9caf2b6256b391043ea874ad34550a7aefc96f1f /views
parent3504042929dc5b8b4d52c59d9f85611a6c44cdb6 (diff)
downloadelgg-9aefe356f87750d2a66f8e7f0dd3f0247dafd3e0.tar.gz
elgg-9aefe356f87750d2a66f8e7f0dd3f0247dafd3e0.tar.bz2
Refs #2895: Content header now emits a "title" menu
git-svn-id: http://code.elgg.org/elgg/trunk@8530 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views')
-rw-r--r--views/default/css/elements/navigation.php102
-rw-r--r--views/default/page/layouts/content/header.php12
2 files changed, 58 insertions, 56 deletions
diff --git a/views/default/css/elements/navigation.php b/views/default/css/elements/navigation.php
index c1a6b019b..d0bb4a630 100644
--- a/views/default/css/elements/navigation.php
+++ b/views/default/css/elements/navigation.php
@@ -83,46 +83,6 @@
}
/* ***************************************
- FILTER MENU
-*************************************** */
-.elgg-menu-filter {
- margin-bottom: 5px;
- border-bottom: 2px solid #cccccc;
- display: table;
- width: 100%;
-}
-.elgg-menu-filter > li {
- float: left;
- border: 2px solid #cccccc;
- border-bottom: 0;
- background: #eeeeee;
- margin: 0 0 0 10px;
- -moz-border-radius: 5px 5px 0 0;
- -webkit-border-radius: 5px 5px 0 0;
-}
-.elgg-menu-filter > li > a {
- text-decoration: none;
- display: block;
- padding: 3px 10px 0 10px;
- text-align: center;
- height: 21px;
- color: #999999;
-}
-.elgg-menu-filter > li > a:hover {
- background: #dedede;
- color:#4690D6;
-}
-.elgg-menu-filter > .elgg-state-selected {
- border-color: #cccccc;
- background: white;
-}
-.elgg-menu-filter > .elgg-state-selected > a {
- position: relative;
- top: 2px;
- background: white;
-}
-
-/* ***************************************
* MENUS
*
* .elgg-menu does two things:
@@ -289,6 +249,57 @@
}
/* ***************************************
+ TITLE
+*************************************** */
+.elgg-menu-title {
+ float:right;
+}
+
+.elgg-menu-title > li {
+ display:inline-block
+}
+
+/* ***************************************
+ FILTER MENU
+*************************************** */
+.elgg-menu-filter {
+ margin-bottom: 5px;
+ border-bottom: 2px solid #cccccc;
+ display: table;
+ width: 100%;
+}
+.elgg-menu-filter > li {
+ float: left;
+ border: 2px solid #cccccc;
+ border-bottom: 0;
+ background: #eeeeee;
+ margin: 0 0 0 10px;
+ -moz-border-radius: 5px 5px 0 0;
+ -webkit-border-radius: 5px 5px 0 0;
+}
+.elgg-menu-filter > li > a {
+ text-decoration: none;
+ display: block;
+ padding: 3px 10px 0 10px;
+ text-align: center;
+ height: 21px;
+ color: #999999;
+}
+.elgg-menu-filter > li > a:hover {
+ background: #dedede;
+ color:#4690D6;
+}
+.elgg-menu-filter > .elgg-state-selected {
+ border-color: #cccccc;
+ background: white;
+}
+.elgg-menu-filter > .elgg-state-selected > a {
+ position: relative;
+ top: 2px;
+ background: white;
+}
+
+/* ***************************************
PAGE MENU
*************************************** */
.elgg-menu-page a {
@@ -401,15 +412,4 @@
/* Ick. Allows the horizontal menu to hold image blocks without breaking */
.elgg-menu-metadata .elgg-body:after {
content: '.';
-}
-
-/* ***************************************
- TITLE
-*************************************** */
-.elgg-menu-title {
- float:right;
-}
-
-.elgg-menu-title > li {
- display:inline-block
} \ No newline at end of file
diff --git a/views/default/page/layouts/content/header.php b/views/default/page/layouts/content/header.php
index 2a694c28f..c5f78bd06 100644
--- a/views/default/page/layouts/content/header.php
+++ b/views/default/page/layouts/content/header.php
@@ -32,14 +32,16 @@ if ($context) {
} else {
$guid = elgg_get_logged_in_user_guid();
}
- $new_link = elgg_extract('new_link', $vars, "pg/$context/add/$guid/");
- $params = array(
- 'href' => $new_link = elgg_normalize_url($new_link),
+
+ elgg_register_menu_item('title', array(
+ 'name' => 'add',
+ 'href' => elgg_extract('new_link', $vars, "pg/$context/add/$guid"),
'text' => elgg_echo("$context:add"),
'class' => 'elgg-button elgg-button-action',
- );
- $buttons = elgg_view('output/url', $params);
+ ));
}
+
+ $buttons = elgg_view_menu('title', array('sort_by' => 'weight'));
}
echo <<<HTML
<div class="elgg-head clearfix">