aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-25 10:56:58 +0000
committerdave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-25 10:56:58 +0000
commit57f49dfda6a79b58b2721886684cee9ad2479708 (patch)
treeee5facbc3b763966bf5390e5a056c0863f7179cd
parent627060b324f43ebe63af4a705a70673096f33607 (diff)
downloadelgg-57f49dfda6a79b58b2721886684cee9ad2479708.tar.gz
elgg-57f49dfda6a79b58b2721886684cee9ad2479708.tar.bz2
added tools to the topbar
git-svn-id: https://code.elgg.org/elgg/trunk@1524 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--views/default/navigation/topbar_tools.php120
-rw-r--r--views/default/page_elements/elgg_topbar.php7
2 files changed, 126 insertions, 1 deletions
diff --git a/views/default/navigation/topbar_tools.php b/views/default/navigation/topbar_tools.php
new file mode 100644
index 000000000..eb8bbf652
--- /dev/null
+++ b/views/default/navigation/topbar_tools.php
@@ -0,0 +1,120 @@
+<?php
+
+ /**
+ * Elgg standard tools drop down
+ * This will be populated depending on the plugins active - only plugin navigation will appear here
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ *
+ */
+
+ $menu = get_register('menu');
+
+ //var_export($menu);
+
+ if (is_array($menu) && sizeof($menu) > 0) {
+
+?>
+<style type="text/css">
+
+#tools_menu, #tools_menu ul{
+ margin:0;
+ padding:0;
+ display:inline;
+ float:left;
+ list-style-type:none;
+ list-style-position:outside;
+ /*position:relative;
+ line-height:1.5em;*/
+
+}
+
+#tools_menu a {
+ display:block;
+ padding:3px;
+ color:white;
+ text-decoration:none;
+
+}
+
+#tools_menu a:hover {
+ background-color:#4690d6;
+}
+.tools_menu_on {
+ background:#4690d6;
+}
+
+#tools_menu li {
+ float:left;
+ position:relative;
+}
+
+#tools_menu ul {
+ position:absolute;
+ display:none;
+ top:24px;
+ border-top:1px solid #333;
+ border-bottom:1px solid #333;
+}
+
+#tools_menu ul a {
+ background:white;
+ border-left:1px solid #333;
+ border-right:1px solid #333;
+ color:#4690d6;
+ padding:6px;
+}
+
+#tools_menu ul a:hover {
+ color:white;
+}
+
+#tools_menu li ul a {
+ width:120px;
+ height:auto;
+ float:left;
+}
+
+#tools_menu ul ul{
+ top:auto;
+}
+
+#tools_menu li ul ul {
+ left:120px;
+ margin:0px 0 0 13px;
+}
+
+#tools_menu li:hover ul ul, #tools_menu li:hover ul ul ul, #tools_menu li:hover ul ul ul ul{
+ display:none;
+
+}
+#tools_menu li:hover ul, #tools_menu li li:hover ul, #tools_menu li li li:hover ul, #tools_menu li li li li:hover ul{
+ display:block;
+}
+</style>
+<ul id="tools_menu">
+ <li><a href="#">Tools</a>
+ <ul>
+ <?php
+
+ foreach($menu as $item) {
+
+ echo "<li><a href=\"" . $item->value . $_SESSION['user']->username . "\">" . $item->name . "</a></li>";
+
+ }
+
+ ?>
+ </ul>
+ </li>
+</ul>
+
+<?php
+
+ }
+
+?> \ No newline at end of file
diff --git a/views/default/page_elements/elgg_topbar.php b/views/default/page_elements/elgg_topbar.php
index 40d4242d7..23ec5b310 100644
--- a/views/default/page_elements/elgg_topbar.php
+++ b/views/default/page_elements/elgg_topbar.php
@@ -30,7 +30,12 @@
<div class="toolbarlinks">
<a href="<?php echo $_SESSION['user']->getURL(); ?>" class="pagelinks"><?php echo elgg_echo('profile'); ?></a> <!-- class="loggedinuser" <?php echo $_SESSION['user']->username; ?></a> -->
<a href="<?php echo $vars['url']; ?>pg/dashboard/" class="pagelinks"><?php echo elgg_echo('dashboard'); ?></a>
-
+
+ <?php
+
+ echo elgg_view("navigation/topbar_tools");
+
+ ?>
<?php
//allow people to extend this top menu
echo elgg_view('elgg_topbar/extend', $vars);