aboutsummaryrefslogtreecommitdiff
path: root/views/default/page_elements
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/page_elements')
-rw-r--r--views/default/page_elements/elgg_topbar.php90
-rw-r--r--views/default/page_elements/header.php48
2 files changed, 114 insertions, 24 deletions
diff --git a/views/default/page_elements/elgg_topbar.php b/views/default/page_elements/elgg_topbar.php
new file mode 100644
index 000000000..728de79c7
--- /dev/null
+++ b/views/default/page_elements/elgg_topbar.php
@@ -0,0 +1,90 @@
+<?php
+
+ /**
+ * Elgg top toolbar
+ * The standard elgg top toolbar
+ *
+ * @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/
+ *
+ */
+?>
+
+<?php
+ if (isloggedin()) {
+?>
+
+<div id="elgg_topbar">
+
+<div id="elgg_topbar_container_left">
+ <div class="toolbarimages">
+ <a href=""><img src="<?php echo $vars['url']; ?>_graphics/elgg_toolbar_logo.gif" /></a>
+ <a href=""><img src="<?php echo $vars['url']; ?>_graphics/avatar_mini.gif" /></a>
+
+ <!-- new icon size needed 16px square - mini -->
+ <!--
+ <?php
+ echo elgg_view("profile/icon",array('entity' => $vars['user'], 'size' => 'mini'));
+ ?>
+ -->
+
+
+ </div>
+ <div class="toolbarlinks">
+ <a href="" class="loggedinuser">Pete</a>
+ <a href="<?php echo $vars['url']; ?>pg/dashboard/" class="pagelinks"><?php echo elgg_echo('dashboard'); ?></a>
+ <a href="" class="usersettings"><?php echo elgg_echo('settings'); ?></a>
+
+ <?php
+
+ // The administration link is for admin or site admin users only
+ if ($vars['user']->admin || $vars['user']->siteadmin) {
+
+ ?>
+
+ <a href="<?php echo $vars['url']; ?>pg/admin/" class="usersettings"><?php echo elgg_echo("admin"); ?></a>
+
+ <?php
+
+ }
+
+ ?>
+
+
+
+
+ </div>
+</div>
+
+
+<div id="elgg_topbar_container_right">
+ <img src="<?php echo $vars['url']; ?>_graphics/elgg_toolbar_logout.gif" /><a href="<?php echo $vars['url']; ?>action/logout"><small><?php echo elgg_echo('logout'); ?></small></a>
+</div>
+
+<div id="elgg_topbar_container_search">
+<form id="searchform" action="<?php echo $vars['url']; ?>search/" method="get">
+ <input type="text" size="21" name="tag" value="Search" onclick="if (this.value=='Search') { this.value='' }" class="search_input" />
+ <input type="submit" value="Go" class="search_submit_button" />
+</form>
+</div>
+
+</div><!-- /#elgg_topbar -->
+
+
+<!-- elgg user settings panel -->
+<div id="elgg_topbar_panel">
+
+<p>user settings here</p>
+
+</div>
+<!-- /#elgg_topbar_panel -->
+<div style="clear:both;"></div>
+
+<?php
+ }
+?>
+
diff --git a/views/default/page_elements/header.php b/views/default/page_elements/header.php
index 498f26d97..53f6285fb 100644
--- a/views/default/page_elements/header.php
+++ b/views/default/page_elements/header.php
@@ -24,23 +24,23 @@
$title = $vars['title'];
} else {
$title = $vars['config']->sitename . ": " . $vars['title'];
- }
-
- global $autofeed;
- if (isset($autofeed) && $autofeed == true) {
- $url = full_url();
- if (substr_count($url,'?')) {
- $url .= "&view=rss";
- } else {
- $url .= "?view=rss";
- }
- $feedref = <<<END
-
- <link rel="alternate" type="application/rss+xml" title="RSS" href="{$url}" />
-
-END;
- } else {
- $feedref = "";
+ }
+
+ global $autofeed;
+ if (isset($autofeed) && $autofeed == true) {
+ $url = full_url();
+ if (substr_count($url,'?')) {
+ $url .= "&view=rss";
+ } else {
+ $url .= "?view=rss";
+ }
+ $feedref = <<<END
+
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="{$url}" />
+
+END;
+ } else {
+ $feedref = "";
}
?>
@@ -55,15 +55,17 @@ END;
<script type="text/javascript" src="<?php echo $vars['url']; ?>javascript/initialise_elgg.js"></script>
<!-- include the default css file -->
<link rel="stylesheet" href="<?php echo $vars['url']; ?>_css/css.css" type="text/css" />
- <?php
-
- echo $feedref;
- echo elgg_view('metatags',$vars);
-
+ <?php
+
+ echo $feedref;
+ echo elgg_view('metatags',$vars);
+
?>
</head>
<body>
+
+<?php echo elgg_view('page_elements/elgg_topbar', $vars); ?>
<div id="page_container">
<div id="page_wrapper">
@@ -72,7 +74,5 @@ END;
<div id="wrapper_header">
<!-- display the page title -->
<h1><a href="<?php echo $vars['url']; ?>"><?php echo $vars['config']->sitename; ?></a></h1>
- <!-- display top level navigation -->
- <?php echo elgg_view('navigation/topmenu'); ?>
</div><!-- /#wrapper_header -->
</div><!-- /#layout_header -->