From d6a287be57876b42dec0ba50ff309f8565fc0509 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 11 Dec 2006 03:40:07 +0000 Subject: [PATCH] r1362: Use ListSorter to construct the column heads and rows --- favorite.php | 10 ++++++++-- templates/favorites.tpl | 7 +------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/favorite.php b/favorite.php index 05da601..ec7e384 100644 --- a/favorite.php +++ b/favorite.php @@ -30,10 +30,12 @@ $focus[ ($_REQUEST['do'] == 'handle' ? 'showreport' : 'favorites') ] = 'focus'; $fetchtemplates = array( 'favorites', - 'trackerhome_bits' + 'trackerhome_bits', + 'list_head' ); require_once('./global.php'); +require_once('./includes/class_sort.php'); // ################################################################### @@ -85,11 +87,15 @@ if ($_REQUEST['do'] == 'manage') $message->error(_('You do not have any favorites in your list. To add a bug to your list, while viewing the report, click the [Add to Favorites] link next to the bug\'s ID.')); } + $sort = new ListSorter('favorite'); + + $headers = $sort->constructColumnHeaders(false); + while ($bug = $db->fetch_array($favorites)) { $funct->exec_swap_bg($stylevar['alt_color'], ''); ProcessBugDataForDisplay(&$bug, $funct->bgcolour); - eval('$bugs .= "' . $template->fetch('trackerhome_bits') . '";'); + $bugs .= $sort->constructRow($bug); } eval('$template->flush("' . $template->fetch('favorites') . '");'); diff --git a/templates/favorites.tpl b/templates/favorites.tpl index 4b5f41a..17abe8e 100644 --- a/templates/favorites.tpl +++ b/templates/favorites.tpl @@ -11,12 +11,7 @@ $header - - - - - - +$headers $bugs
{@"ID"}{@"Summary/Reporter"}{@"Product/Version"}{@"Status/Resolution"}{@"Priority/Severity"}{@"Last Post"}
-- 2.22.5