Notes on converting apps from Horde 4 to Horde 5.
These are by far not complete.
++ Mandatory
+++ Use Horde_PageOutput
horde/templates/common-header.inc does not exist anymore
@@---require $registry->get('templates', 'horde') . '/common-header.inc';
echo Horde::menu();@@
@@+++ $page_output->header(array(
'title' => _("List")
));
@@
++++ Page Footer
@@---require $registry->get('templates', 'horde') . '/common-footer.inc';@@
$page_output->footer();
++++ Adding Javascript
@@---Horde::addScriptFile('jquery-ui/jquery-1.7.min.js', 'insysgui');@@
@@+++$page_output->addScriptFile('jquery-ui/jquery-1.7.min.js');@@
+++ New parameter format for entries in menu
In Application.php's menu function, entries now go like this
$menu->add(Horde::url('data.php'), _("_Import/Export"), 'horde-data');
It's link, caption, css class. The Icon now has to be defined in css:
.turba-edit, #tabEditContact a {
background-image: url("graphics/edit.png");
}
++
++ UI
+++ Topbar search bar
$topbar = $injector->getInstance('Horde_View_Topbar');
/* Make topbar visible */
$topbar->search = true;
/* Define where to redirect when the button is clicked */
$topbar->searchAction = new Horde_Url('list.php');
/* Define the grayed-out hint text in the search field */
$topbar->searchLabel = $session->get('sesha', 'search') ?: _("Stock Id");
/* Define a search icon. Leave away if you want the default */
$topbar->searchIcon = Horde_Themes::img('search-topbar.png');
+++ Custom apps handling
If your conf.xml had such a section
Menu Settings
drop it. It won't work anymore now that the app-specific menu lives in the sidebar.