<table border="0" cellpadding="2" cellspacing="0" width="100%">
<tr><td class="menu"><table border="0" width="100%"><tr>
<?php

/* Mnemo menu items */
Menu::printItem(Horde::applicationUrl('list.php'), _("List Notes"), 'mnemo.gif');
//if (count(Mnemo::listNotepads(false, _PERMS_EDIT))) {
    Menu::printItem(Horde::applicationUrl(Horde::addParameter('memo.php', 'actionID', MNEMO_ADD_MEMO)), _("New Note"), 'add.gif');
//}
//if (count(Mnemo::listNotepads(false, _PERMS_READ))) {
    Menu::printItem(Horde::applicationUrl('search.php'), _("Search"), 'search.gif');
//}

/* Import/Export */
if ($conf['menu']['import_export']) {
    Menu::printItem(Horde::applicationUrl('data.php'), _("Import/Export"), 'data.gif', $registry->getParam('graphics', 'horde'));
}

/* Print */
if ($conf['menu']['print'] && isset($print_link) && $browser->hasFeature('javascript')) {
    Menu::printItem('#', _("Print"), 'print.gif', $registry->getParam('graphics', 'horde'), '', "open_print_win('$print_link'); return false;");
}

/* Additional site-specific menu items */
Menu::siteLinks();

/* Settings */

if (($conf['prefs']['driver'] != '') && ($conf['prefs']['driver'] != 'none')) {
    Menu::printItem(Horde::applicationUrl('prefs.php'), _("Options"), 'prefs.gif', $registry->getParam('graphics', 'horde'));
    }
    
/* Online Help */
if ($help_link = Help::listLink('mnemo')) {
    Menu::printItem($help_link, _("Help"), 'manual.gif', $registry->getParam('graphics', 'horde'));
}

/* Links to other Horde applications. */
Menu::appLinks();
?>

<td width="100%">&nbsp;</td><!-- spacer -->

<?php if (!$prefs->isLocked('default_notepad') && (count($notepads) > 1 || !count($GLOBALS['display_notepads']))): ?>
<?php Menu::printItem('#', _("Show"), 'mnemo.gif', null, null, 'return listNotepadsSubmit();', '__noselection'); ?>
<td class="light" align="left">
<form action="<?php echo Horde::applicationUrl('list.php') ?>" method="post" name="notepadsmenu">
<?php Horde::pformInput() ?>
<select name="display_notepad" onchange="listNotepadsSubmit();">
  <option value=""><?php echo _("Show Notepads:") ?></option>
<?php foreach ($notepads as $id => $notepad): ?>
  <option value="<?php echo $id ?>"><?php echo (in_array($id, $GLOBALS['display_notepads']) ? '* ' : '') . $notepad->getShareName() ?></option>
<?php endforeach; ?>
</select>
</form>
<script language="JavaScript" type="text/javascript">
<!--
var loading;
function listNotepadsSubmit()
{
    document.notepadsmenu.submit();
    return false;
}
// -->
</script>
</td>
<?php endif; ?>
</tr></table></td></tr></table><br />
