[Kolab-devel] [issue3848] display "Basic Search" and "Advanced Search" as tabs in place of a small table header.

issues at kolab.org issues at kolab.org
Thu Sep 10 10:14:35 CEST 2009


New submission from Sönke Schwardt-Krummrich <schwardt at univention.de>:

In kronolith currently the clickable headlines "Basic Search" and "Advanced
Search" are displayed in a small header line. One on the left side, one on the
right side.
This patch displays these links as tabs side by side.

----------
files: t_kronolith_HK_UV_searchTabs.diff
keyword: web client
messages: 21581
nosy: schwardt
priority: feature
status: unread
title: display "Basic Search" and "Advanced Search" as tabs in place of a small table header.

______________________________________
Kolab issue tracker <issues at kolab.org>
<https://issues.kolab.org/issue3848>
______________________________________
-------------- next part --------------
Patch by schwardt at univention.de (Tue Sep 8 17:34:44 2009 +0200):

kronolith: display "Basic Search" and "Advanced Search" as tabs in place of a small table header.

--- a/horde-webmail/kronolith/templates/search/search.inc
+++ b/horde-webmail/kronolith/templates/search/search.inc
@@ -4,13 +4,17 @@
 <input type="hidden" name="search_mode" value="basic" />
 <table cellspacing="0" width="100%">
 
-<br /><br />
-<h1 class="header">
- <span class="rightFloat" class="smallheader">
-  <?php echo Horde::widget(Util::addParameter(Horde::applicationUrl('search.php'), 'search_mode', 'advanced'), _("Advanced Search"), 'smallheader', '', '', _("Ad_vanced Search")) ?>
- </span>
- <?php echo _("Basic Search") ?>
-</h1>
+<?php
+/* build search mode tabs. */
+require_once 'Horde/UI/Tabs.php';
+require_once 'Horde/Variables.php';
+$sUrl = Horde::applicationUrl('search.php');
+$vars = Variables::getDefaultVariables();
+$tabs = new Horde_UI_Tabs('search_mode', $vars);
+$tabs->addTab(_("Basic Search"), $sUrl, 'basic');
+$tabs->addTab(_("Advanced Search"), $sUrl, 'advanced');
+echo $tabs->render('basic');
+?>
 
 <table cellspacing="0" class="striped">
 <!-- search pattern -->
--- a/horde-webmail/kronolith/templates/search/search_advanced.inc
+++ b/horde-webmail/kronolith/templates/search/search_advanced.inc
@@ -3,14 +3,17 @@
 <input type="hidden" name="actionID" value="search_calendar" />
 <input type="hidden" name="search_mode" value="advanced" />
 
-<br /><br />
-<h1 class="header">
- <span class="rightFloat" class="smallheader">
-  <?php echo Horde::widget(Util::addParameter(Horde::applicationUrl('search.php'), 'search_mode', 'basic'), _("Basic Search"), 'smallheader', '', '', _("_Basic Search")) ?>
- </span>
- <?php echo _("Advanced Search") ?>
-</h1>
-
+<?php
+/* build search mode tabs. */
+require_once 'Horde/UI/Tabs.php';
+require_once 'Horde/Variables.php';
+$sUrl = Horde::applicationUrl('search.php');
+$vars = Variables::getDefaultVariables();
+$tabs = new Horde_UI_Tabs('search_mode', $vars);
+$tabs->addTab(_("Basic Search"), $sUrl, 'basic');
+$tabs->addTab(_("Advanced Search"), $sUrl, 'advanced');
+echo $tabs->render('advanced');
+?>
 <table cellspacing="0" class="striped">
 
 <!-- general header -->


More information about the devel mailing list