/**
*/
public function menu($menu)
{
global $browser, $conf, $notification, $page_output, $registry, $session;
/* Check here for guest calendars so that we don't get multiple
* messages after redirects, etc. */
if (!$registry->getAuth() && !count(Kronolith::listCalendars())) {
$notification->push(_("No calendars are available to guests."));
}
if ($browser->hasFeature('dom')) {
Horde_Core_Ui_JsCalendar::init(array('click_month' => true, 'click_week' => true, 'click_year' => true, 'full_weekdays' => true));
$page_output->addScriptFile('goto.js');
$page_output->addInlineJsVars(array('KronolithGoto.dayurl' => strval(Horde::url('day.php')), 'KronolithGoto.monthurl' => strval(Horde::url('month.php')), 'KronolithGoto.weekurl' => strval(Horde::url('week.php')), 'KronolithGoto.yearurl' => strval(Horde::url('year.php'))));
$menu->add(new Horde_Url(''), _("_Goto"), 'kronolith-icon-goto', null, '', null, 'kgotomenu');
}
$menu->add(Horde::url('search.php'), _("_Search"), 'kronolith-icon-search');
/* Import/Export. */
if ($conf['menu']['import_export'] && !Kronolith::showAjaxView()) {
$menu->add(Horde::url('data.php'), _("_Import/Export"), 'horde-data');
}
if (strlen($session->get('kronolith', 'display_cal'))) {
$menu->add(Horde::selfUrl(true)->add('display_cal', ''), $registry->getAuth() ? _("Return to my calendars") : _("Return to calendars"), 'kronolith-icon-back', null, null, null, '__noselection');
}
}