]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Refs #2895: Content header now emits a "title" menu
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 1 Mar 2011 05:52:58 +0000 (05:52 +0000)
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 1 Mar 2011 05:52:58 +0000 (05:52 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8530 36083f99-b078-4883-b0ff-0f9b5a30f544

views/default/css/elements/navigation.php
views/default/page/layouts/content/header.php

index c1a6b019b7711d0a5c9cda7fa5dbf0e0eb3aa0f1..d0bb4a6309a4b657dcf5538c58171201529d7499 100644 (file)
        background: white;
 }
 
-/* ***************************************
-       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
  *
        -webkit-border-radius: 0 0 4px 4px;
 }
 
+/* ***************************************
+       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
 *************************************** */
 /* 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
index 2a694c28fa87f48938f739cd61e9d978e173403f..c5f78bd06e49a4609e5dd30b4fb10090581b334a 100644 (file)
@@ -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">