From 20a2c3695a3f32e82ce487efda48fc304ca19bd2 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Tue, 4 Oct 2005 02:56:04 +0000 Subject: [PATCH] r486: Switching search.tpl to use
s --- search.php | 22 ++-- templates/search.tpl | 252 +++++++++++++++++++++++-------------------- 2 files changed, 144 insertions(+), 130 deletions(-) diff --git a/search.php b/search.php index 0881ed5..a2fbacd 100644 --- a/search.php +++ b/search.php @@ -14,8 +14,7 @@ $fetchtemplates = array( 'search', 'pcv_select_row', 'search_results', - 'trackerhome_bits', - 'customfield_bit' + 'trackerhome_bits' ); define('SVN', '$Id$'); @@ -309,33 +308,26 @@ if ($_REQUEST['do'] == 'search') // ------------------------------------------------------------------- // custom fields - $fields = construct_custom_fields($bug, true, true); - - $bugsys->debug(count($fields) % 2); + $fields = construct_custom_fields($bug); + $show['customfields'] = ($fields ? true : false); + + $bugsys->debug('fields modulo: ' . count($fields) % 2); $i = 1; foreach ($fields AS $field) { $bugsys->debug("i = $i"); if ($i == 1) { - $left = $field; + $customfields['right'] .= $field; } else if ($i == 2) { - $right = $field; - eval('$customfields .= "' . $template->fetch('customfield_bit') . '";'); + $customfields['left'] .= $field; $i = 0; } $i++; } - if ((count($fields) % 2) != 0) - { - $bugsys->debug('no modulo for you'); - $right = ''; - eval('$customfields .= "' . $template->fetch('customfield_bit') . '";'); - } - // ------------------------------------------------------------------- // built-in fields $select['severity'] = construct_datastore_select('severity', 'severity', 'severityid', 0, true); diff --git a/templates/search.tpl b/templates/search.tpl index 8381895..274eb8e 100644 --- a/templates/search.tpl +++ b/templates/search.tpl @@ -2,133 +2,155 @@ $doctype $headinclude + {$bugsys->options['trackertitle']} - {@"Search"} $header -
{@"Any fields left blank or unselected will be excluded from the search query"}
+

{@"Any fields left blank or unselected will be excluded from the search query"}

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +
+ {@"Keywords"} +
+
+ + + +
+ {@"Reporter"} +
+
+ + + +
+ {@"Status"} +
+
+ + + +
+ {@"Priority"} +
+
+ + + +
+ {@"Date (submitted since)"} + +
+ +
+
+ + + + +
+ {@"Favourite"} +
{@"Yes, search for favourites only"}
+
+ +
+ + + - - - - - - - - - - - -$customfields + +
+ + +
+ {@"Search Mode"} + +
+ +
+
+ + + +
+ {@"Sort By"} + +
+ + + +
+
+ + + +
+ {@"Resolution"} +
+
+ + + +
+ {@"Severity"} +
+
+ + + +
+ {@"Assignment"} +
+
+ + + +
+ {@"Product / Version"} +
+
+ + +
+ + - - - - - -
{@"Keywords"}{@"Search Mode"} - -
{@"Reporter"}{@"Sort By"} - +
+ +
- -
{@"Status"}{@"Resolution"}
{@"Severity"}{@"Priority"}
{@"Assigned To"}{@"Date (submitted since)"} - -
{@"Product / Version"} -
{@"Favourite"}:
-
- - -
+
+ + +
-- 2.43.5