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

/* Nag menu items. */
Menu::printItem(Horde::applicationUrl('list.php'), _("List Tasks"), 'nag.gif');
//if (count(Nag::listTasklists(false, _PERMS_EDIT))) {
    Menu::printItem(Horde::applicationUrl(Horde::addParameter('task.php', 'actionID=' . NAG_ADD_TASK)), _("New Task"), 'nag.gif');
//}
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('nag')) {
    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_tasklist') && (count($tasklists) > 1 || !count($GLOBALS['display_tasklists']))): ?>
<?php Menu::printItem('#', _("Show"), 'nag.gif', null, null, 'return listTasklistsSubmit();', '__noselection'); ?>
<td class="light" align="left">
<form action="<?php echo Horde::applicationUrl('list.php') ?>" method="post" name="tasklistsmenu">
<?php Horde::pformInput() ?>
<select name="display_tasklist" onchange="listTasklistsSubmit();">
  <option value=""><?php echo _("Show Tasklists:") ?></option>
<?php foreach ($tasklists as $id => $tasklist): ?>
  <option value="<?php echo $id ?>"><?php echo (in_array($id, $GLOBALS['display_tasklists']) ? '* ' : '') . $tasklist->getShareName() ?></option>
<?php endforeach; ?>
</select>
</form>
<script language="JavaScript" type="text/javascript">
<!--
var loading;
function listTasklistsSubmit()
{
    document.tasklistsmenu.submit();
    return false;
}
// -->
</script>
</td>
<?php endif; ?>

</tr></table></td></tr></table><br />
