<div id="menu">
<?php echo Ansel::getMenu()->render() ?>
</div>
+<?php require HORDE_BASE . '/services/portal/sidebar.php'; ?>
<?php
$GLOBALS['notification']->notify(array('listeners' => 'status'));
</span>
<?php echo Beatnik::getMenu('string') ?>
</div>
+<?php require HORDE_BASE . '/services/portal/sidebar.php'; ?>
<?php $GLOBALS['notification']->notify(array('listeners' => 'status')) ?>
</div>
<?php echo Chora::getMenu()->render() ?>
</div>
+<?php require HORDE_BASE . '/services/portal/sidebar.php'; ?>
<?php $GLOBALS['notification']->notify(array('listeners' => 'status')) ?>
<div id="menu">
<?php echo Crumb::getMenu()->render() ?>
</div>
+<?php require HORDE_BASE . '/services/portal/sidebar.php'; ?>
<?php $GLOBALS['notification']->notify(array('listeners' => 'status')) ?>
}
}
</script>
+<?php require HORDE_BASE . '/services/portal/sidebar.php'; ?>
<?php $GLOBALS['notification']->notify(array('listeners' => 'status')) ?>
<div id="menu">
<?php echo Folks::getMenu()->render() ?>
</div>
+<?php require HORDE_BASE . '/services/portal/sidebar.php'; ?>
<?php $GLOBALS['notification']->notify(array('listeners' => 'status')) ?>
$t->set('menu_string', Gollem::getMenu()->render());
echo $t->fetch(GOLLEM_TEMPLATES . '/menu.html');
+ require HORDE_BASE . '/services/portal/sidebar.php';
}
/**
<div id="menu">
<?php echo Hermes::getMenu('string') ?>
</div>
+<?php require HORDE_BASE . '/services/portal/sidebar.php'; ?>
<?php $GLOBALS['notification']->notify(array('listeners' => 'status')) ?>
}
}
-/* Sidebar display: only load sidebar if we are coming from login page and
- * 'horde_login_nosidebar' is set and not true; if this page is loaded,
- * there is no authenticated user, and conf->menu->always is true; or if
- * 'force_sidebar' GET parameter is set. */
-if ((Horde_Util::getFormData('force_sidebar') ||
- !Horde_Util::nonInputVar('horde_login_nosidebar', $registry->getAuth())) &&
- ($conf['menu']['always'] ||
- ($registry->getAuth() && $prefs->getValue('show_sidebar')))) {
- $scrollbar = $browser->hasQuirk('scrollbar_in_way') ? 'yes' : 'auto';
- require HORDE_TEMPLATES . '/index/frames_index.inc';
-} else {
- /* We always need to do a URL redirect here rather than directly
- * including the file. This is to ensure that the next page has a chance
- * to init a full Horde environment before anything else is done in the
- * session (needed for things like Horde LoginTasks to be run). */
- header('Location: ' . $main_page);
-}
+header('Location: ' . $main_page);
+exit;
require_once dirname(__FILE__) . '/../../lib/Application.php';
Horde_Registry::appInit('horde');
-// Get full name.
-$identity = $injector->getInstance('Horde_Prefs_Identity')->getIdentity();
-$fullname = $identity->getValue('fullname');
-if (empty($fullname)) {
- $fullname = $registry->convertUsername($registry->getAuth(), false);
-}
-
// Get refresh interval.
if (($r_time = $prefs->getValue('summary_refresh_time'))
&& !$browser->hasFeature('xmlhttpreq')) {
require HORDE_TEMPLATES . '/common-header.inc';
require HORDE_TEMPLATES . '/menu/menu.inc';
echo '<div id="menuBottom">';
-echo htmlspecialchars($fullname);
+echo htmlspecialchars($injector->getInstance('Horde_Prefs_Identity')->getIdentity()->getName());
if (!$prefs->isLocked('portal_layout')) {
echo ' | <a href="' . Horde::applicationUrl('services/portal/edit.php') . '">' . _("Add Content") . '</a>';
}
return $menu;
}
-require_once dirname(__FILE__) . '/../../lib/Application.php';
-Horde_Registry::appInit('horde', array('authentication' => 'none'));
-
-if (!$registry->getAuth() && !$conf['menu']['always']) {
- $registry->authenticateFailure();
-}
-
-$is_mozbar = (bool)Horde_Util::getFormData('mozbar');
-
-// Set up the tree.
-$tree = Horde_Tree::singleton('horde_menu', 'Javascript');
-$tree->setOption(array('target' => $is_mozbar ? '_content' : 'horde_main'));
-
-$menu = buildMenu();
-foreach ($menu as $app => $params) {
- if ($params['status'] == 'block') {
- if ($registry->get('status', $params['app']) == 'inactive') {
- continue;
- }
+function sidebar()
+{
+ global $registry, $conf, $language, $prefs;
+
+ // Set up the tree.
+ $tree = Horde_Tree::singleton('horde_menu', 'Javascript');
+ $menu = buildMenu();
+ foreach ($menu as $app => $params) {
+ if ($params['status'] == 'block') {
+ if ($registry->get('status', $params['app']) == 'inactive') {
+ continue;
+ }
- try {
- $block = Horde_Block_Collection::getBlock($params['app'], $params['blockname']);
- } catch (Horde_Exception $e) {
- Horde::logMessage($e, 'ERR');
- continue;
- }
+ try {
+ $block = Horde_Block_Collection::getBlock($params['app'], $params['blockname']);
+ } catch (Horde_Exception $e) {
+ Horde::logMessage($e, 'ERR');
+ continue;
+ }
- try {
- $block->buildTree($tree, 0, isset($params['menu_parent']) ? $params['menu_parent'] : null);
- } catch (Horde_Exception $e) {
- Horde::logMessage($e, 'ERR');
- continue;
- }
- } else {
- // Need to run the name through gettext since the user's
- // locale may not have been loaded when registry.php was
- // parsed.
- $name = _($params['name']);
-
- // Headings have no webroot; they're just containers for other
- // menu items.
- if (isset($params['url'])) {
- $url = $params['url'];
- } elseif ($params['status'] == 'heading' || !isset($params['webroot'])) {
- $url = null;
+ try {
+ $block->buildTree($tree, 0, isset($params['menu_parent']) ? $params['menu_parent'] : null);
+ } catch (Horde_Exception $e) {
+ Horde::logMessage($e, 'ERR');
+ continue;
+ }
} else {
- $url = Horde::url($params['webroot'] . '/' . (isset($params['initial_page']) ? $params['initial_page'] : ''));
+ // Need to run the name through gettext since the user's
+ // locale may not have been loaded when registry.php was
+ // parsed.
+ $name = _($params['name']);
+
+ // Headings have no webroot; they're just containers for other
+ // menu items.
+ if (isset($params['url'])) {
+ $url = $params['url'];
+ } elseif ($params['status'] == 'heading' || !isset($params['webroot'])) {
+ $url = null;
+ } else {
+ $url = Horde::url($params['webroot'] . '/' . (isset($params['initial_page']) ? $params['initial_page'] : ''));
+ }
+
+ $node_params = array('url' => $url,
+ 'target' => isset($params['target']) ? $params['target'] : null,
+ 'icon' => (string)(isset($params['icon']) ? $params['icon'] : $registry->get('icon', $app)),
+ 'icondir' => '',
+ );
+ $tree->addNode($app, !empty($params['menu_parent']) ? $params['menu_parent'] : null, $name, 0, false, $node_params);
}
+ }
- $node_params = array('url' => $url,
- 'target' => isset($params['target']) ? $params['target'] : null,
- 'icon' => (string)(isset($params['icon']) ? $params['icon'] : $registry->get('icon', $app)),
- 'icondir' => '',
- );
- $tree->addNode($app, !empty($params['menu_parent']) ? $params['menu_parent'] : null, $name, 0, false, $node_params);
+ // If we're serving a request to the JS update client, just render the
+ // updated node javascript.
+ if (Horde_Util::getFormData('httpclient')) {
+ header('Content-Type: application/json; charset=' . Horde_Nls::getCharset());
+ $scripts = array(
+ $tree->renderNodeDefinitions(),
+ '$(\'horde_menu\').setStyle({ width: \'auto\', height: \'auto\' });');
+ echo Horde::wrapInlineScript($scripts);
+ exit;
}
+
+ $rtl = isset(Horde_Nls::$config['rtl'][$language]);
+ Horde::addScriptFile('prototype.js', 'horde');
+ Horde::addScriptFile('sidebar.js', 'horde');
+ require $GLOBALS['registry']->get('templates', 'horde') . '/portal/sidebar.inc';
}
-// If we're serving a request to the JS update client, just render the
-// updated node javascript.
-if (Horde_Util::getFormData('httpclient')) {
- header('Content-Type: application/json; charset=' . Horde_Nls::getCharset());
- $scripts = array(
- $tree->renderNodeDefinitions(),
- '$(\'horde_menu\').setStyle({ width: \'auto\', height: \'auto\' });');
- echo Horde::wrapInlineScript($scripts);
- exit;
+if (!empty($_GET['httpclient'])) {
+ require_once dirname(__FILE__) . '/../../lib/Application.php';
+ Horde_Registry::appInit('horde', array('authentication' => 'none'));
}
-$rtl = isset(Horde_Nls::$config['rtl'][$language]);
-$htmlId = 'sidebar-frame';
-$bodyClass = 'sidebar';
-if ($browser->hasQuirk('scrollbar_in_way')) {
- $bodyClass .= ' scrollbar-quirk';
+if ($GLOBALS['conf']['menu']['always'] ||
+ ($GLOBALS['registry']->getAuth() && $GLOBALS['prefs']->getValue('show_sidebar'))) {
+ sidebar();
}
-Horde::addScriptFile('prototype.js', 'horde');
-Horde::addScriptFile('sidebar.js', 'horde');
-require HORDE_TEMPLATES . '/common-header.inc';
-require HORDE_TEMPLATES . '/portal/sidebar.inc';
+
+$GLOBALS['sidebarLoaded'] = true;
+echo '<div class="body" style="margin-left:' . $GLOBALS['prefs']->getValue('sidebar_width') . 'px">';
+$GLOBALS['notification']->notify(array('listeners' => 'status'));
?>
</div>
</div>
+<?php require HORDE_BASE . '/services/portal/sidebar.php'; ?>
<?php $notification->notify(array('listeners' => 'status'));
+<?php if (Horde_Util::nonInputVar('sidebarLoaded')): ?>
+</div>
+<?php endif; ?>
<?php if (!$GLOBALS['browser']->isMobile()): ?>
<script type="text/javascript">
if (document.title && parent.frames && parent.frames.horde_main) {
+++ /dev/null
-<?php
-$rtl = isset(Horde_Nls::$config['rtl'][$GLOBALS['language']]);
-$sidebar_width = isset($GLOBALS['prefs']) ? $GLOBALS['prefs']->getValue('sidebar_width') : 150;
-?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "DTD/xhtml1-frameset.dtd">
-<html>
-<head>
-<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
- <title><?php echo htmlspecialchars($GLOBALS['registry']->get('name')) ?></title>
-</head>
-
-<frameset id="hf" cols="<?php echo ($rtl ? '*,' : '') . $sidebar_width . ($rtl ? '' : ',*') ?>" framespacing="0" frameborder="0">
-<?php if ($rtl): ?>
- <frame name="horde_main" src="<?php echo htmlspecialchars($main_page) ?>" scrolling="<?php echo $scrollbar ?>" noresize="noresize" />
- <frame name="horde_menu" src="<?php echo Horde::applicationUrl('services/portal/sidebar.php', true) ?>" scrolling="auto" noresize="noresize" />
-<?php else: ?>
- <frame name="horde_menu" src="<?php echo Horde::applicationUrl('services/portal/sidebar.php', true) ?>" scrolling="auto" noresize="noresize" />
- <frame name="horde_main" src="<?php echo htmlspecialchars($main_page) ?>" scrolling="<?php echo $scrollbar ?>" noresize="noresize" />
-<?php endif; ?>
-</frameset>
-
-</html>
<div id="menu">
<div class="leftFloat"><?php echo $menu->render(); ?></div>
</div>
+<?php require HORDE_BASE . '/services/portal/sidebar.php'; ?>
-<div id="menu" style="overflow:hidden">
- <?php if (!empty($conf['logo']['image']) || !Horde_Util::getFormData('mozbar')): ?>
- <span class="leftFloat"<?php if (empty($conf['logo']['image'])) echo ' id="themelogo"' ?>>
- <?php
- if (!empty($conf['logo']['image'])) {
- if (!empty($conf['logo']['link'])) {
- echo Horde::link($conf['logo']['link'], null, null, '_top');
- }
- echo Horde::img($conf['logo']['image'], '', '', '');
- if (!empty($conf['logo']['link'])) {
- echo '</a>';
- }
- } else {
- echo ' ';
- }
- ?>
- </span>
- <div class="clear"> </div>
- <?php endif; ?>
-</div>
+<div class="sidebar" style="width:<?php echo (isset($prefs) ? $prefs->getValue('sidebar_width') : 150) ?>px">
<div id="expandedSidebar" style="overflow:hidden">
- <span id="expandButton" class="rightFloat"><?php if (!$is_mozbar) echo Horde::link('#', _("Collapse Sidebar"), '', '', 'HordeSidebar.toggleMenuFrame(); return false;', _("Collapse Sidebar")) . Horde::img('hide_panel.png') . '</a>' ?></span>
+ <span id="expandButton" class="rightFloat"><?php echo Horde::link('#', _("Collapse Sidebar"), '', '', 'HordeSidebar.toggleMenuFrame(); return false;', _("Collapse Sidebar")) . Horde::img('hide_panel.png') . '</a>' ?></span>
<div id="sidebarPanel">
<?php $tree->renderTree() ?>
</div>
horde_sidebar_domain = '<?php echo htmlspecialchars($GLOBALS['conf']['cookie']['domain']) ?>',
horde_sidebar_path = '<?php echo $GLOBALS['conf']['cookie']['path'] ?>',
horde_sidebar_refresh = <?php echo intval($prefs->getValue('menu_refresh_time')) ?>,
- horde_sidebar_url = '<?php echo Horde::applicationUrl('services/portal/sidebar.php') ?>';
+ horde_sidebar_url = '<?php echo Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/portal/sidebar.php') ?>';
</script>
-<?php if (isset($GLOBALS['notification'])) $GLOBALS['notification']->notify(array('listeners' => array('javascript'))) ?>
-
-</body>
-</html>
+</div>
text-decoration: underline;
}
#pageControls {
- top: 53px !important;
right: 8px !important;
background: #063 !important;
border: none !important;
}
/* Sidebar styles. */
+.sidebar {
+ float: right;
+}
#sidebarPanel {
-moz-border-radius-bottomright: 0;
-moz-border-radius-bottomleft: 15px;
#menu {
overflow: hidden;
min-height: 50px;
- margin-bottom: 8px;
padding-right: 8px;
}
#menu ul {
}
/* Sidebar styles. */
-.sidebar #menu {
- margin: 0;
+.sidebar {
+ float: left;
}
#sidebarPanel {
-moz-border-radius-bottomright: 15px;
color: #000;
}
+/* Main body. */
+.body {
+ position: absolute;
+ left: 0;
+ right: 0;
+ margin-top: 8px;
+}
+
/* Pager. */
.pager {
text-align: center;
{
self::prepareMenu();
echo self::$_menuTemplate->fetch(IMP_TEMPLATES . '/imp/menu/menu.html');
+ require HORDE_BASE . '/services/portal/sidebar.php';
}
/**
{
self::prepareMenu();
echo self::$_menuTemplate->fetch(INGO_TEMPLATES . '/menu/menu.html');
+ require HORDE_BASE . '/services/portal/sidebar.php';
}
/**
<div id="menu">
<?php echo Kastalia::getMenu()->render() ?>
</div>
+<?php require HORDE_BASE . '/services/portal/sidebar.php'; ?>
<?php $GLOBALS['notification']->notify(array('listeners' => 'status')) ?>
<div id="menu">
<?php echo Kronolith::getMenu()->render() ?>
</div>
+<?php require HORDE_BASE . '/services/portal/sidebar.php'; ?>
<?php $GLOBALS['notification']->notify(array('listeners' => 'status')) ?>
#pageControls {
position: absolute;
- top: 52px;
+ top: -8px;
right: 0;
background: #eee;
border: 1px solid #ccc;
background-image: url("graphics/minus.png");
}
#pageControls {
- top: 49px;
+ top: -9px;
background: #d7d7d7;
border-color: #999;
border-width: 0 0 1px 1px;
</div>
</form>
+<?php require HORDE_BASE . '/services/portal/sidebar.php'; ?>
<?php $GLOBALS['notification']->notify(array('listeners' => 'status')) ?>
<div id="menu">
<?php echo Mnemo::getMenu()->render() ?>
</div>
+<?php require HORDE_BASE . '/services/portal/sidebar.php'; ?>
#pageControls {
position: absolute;
- top: 52px;
+ top: -8px;
right: 0;
background: #eee;
border: 1px solid #ccc;
background-image: url("graphics/minus.png");
}
#pageControls {
- top: 49px;
+ top: -9px;
background: #d7d7d7;
border-color: #999;
border-width: 0 0 1px 1px;
<div id="menu">
<?php echo Nag::getMenu()->render() ?>
</div>
+<?php require HORDE_BASE . '/services/portal/sidebar.php'; ?>
<?php Nag::status();
#pageControls {
position: absolute;
- top: 52px;
+ top: -8px;
right: 0;
background: #eee;
border: 1px solid #ccc;
background-image: url("graphics/minus.png");
}
#pageControls {
- top: 49px;
+ top: -9px;
background: #d7d7d7;
border-color: #999;
border-width: 0 0 1px 1px;
</div>
<?php echo News::getMenu()->render() ?>
</div>
+<?php require HORDE_BASE . '/services/portal/sidebar.php'; ?>
<?php $GLOBALS['notification']->notify(array('listeners' => 'status')) ?>
<div id="menu">
<?php echo Operator::getMenu('string') ?>
</div>
+<?php require HORDE_BASE . '/services/portal/sidebar.php'; ?>
<?php $GLOBALS['notification']->notify(array('listeners' => 'status')) ?>
<div id="menu">
<?php echo Pastie::getMenu()->render() ?>
</div>
+<?php require HORDE_BASE . '/services/portal/sidebar.php'; ?>
<?php $GLOBALS['notification']->notify(array('listeners' => 'status')) ?>
<?php echo Shout::getMenu('string') ?>
</div>
+<?php require HORDE_BASE . '/services/portal/sidebar.php'; ?>
<div id="menu">
<?php echo Skeleton::getMenu()->render() ?>
</div>
+<?php require HORDE_BASE . '/services/portal/sidebar.php'; ?>
<?php $GLOBALS['notification']->notify(array('listeners' => 'status')) ?>
<div id="menu">
<?php echo Skoli::getMenu()->render() ?>
</div>
+<?php require HORDE_BASE . '/services/portal/sidebar.php'; ?>
<?php $GLOBALS['notification']->notify(array('listeners' => 'status')) ?>
#pageControls {
position: absolute;
- top: 52px;
+ top: -8px;
right: 0;
background: #eee;
border: 1px solid #ccc;
<div id="menu">
<?php echo Trean::getMenu('string') ?>
</div>
+<?php require HORDE_BASE . '/services/portal/sidebar.php'; ?>
<?php $GLOBALS['notification']->notify(array('listeners' => 'status')) ?>
</div>
</div>
</form>
+<?php require HORDE_BASE . '/services/portal/sidebar.php'; ?>
<?php $GLOBALS['notification']->notify(array('listeners' => 'status')) ?>
<br class="clear" />
</div>
</form>
-<?php echo Horde_Util::nonInputVar('menuBottom'); $GLOBALS['notification']->notify(array('listeners' => 'status')) ?>
+<?php echo Horde_Util::nonInputVar('menuBottom'); ?>
+<?php require HORDE_BASE . '/services/portal/sidebar.php'; ?>
+<?php $GLOBALS['notification']->notify(array('listeners' => 'status')) ?>
<br class="clear" />
</div>
</form>
+<?php require HORDE_BASE . '/services/portal/sidebar.php'; ?>
<?php $notification->notify(array('listeners' => 'status'));