From c89550a864475ef369823e1d6326e7bd0e2517cd Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 12 Oct 2005 03:56:52 +0000 Subject: [PATCH] r545: Styled and cleaned up showhistory.php --- showhistory.php | 23 ++++++----------------- templates/history.tpl | 9 +++++++++ templates/history_bit.tpl | 8 +++++--- templates/history_group.tpl | 23 ----------------------- 4 files changed, 20 insertions(+), 43 deletions(-) delete mode 100644 templates/history_group.tpl diff --git a/showhistory.php b/showhistory.php index 623433e..05ef0f4 100644 --- a/showhistory.php +++ b/showhistory.php @@ -12,7 +12,6 @@ $fetchtemplates = array( 'history', - 'history_group', 'history_bit' ); @@ -71,31 +70,21 @@ ksort($logs); foreach ($logs AS $dateline => $logitems) { - $rowspan = 1; - $changes = ''; - $show['changes'] = false; - $messages = array(); + $show['group'] = true; + foreach ($logitems AS $log) { - $hasvalues = ((empty($log['original']) AND (empty($log['changed']) AND $log['changed'] != '0')) ? false : true); + $funct->exec_swap_bg('', $stylevar['alt_colour']); + $bgcolour = $funct->bgcolour; if ($newlog = $fieldlist["$log[field]"]) { $log['field'] = $newlog; } - $show['changes'] = (($hasvalues) ? true : $show['changes']); - - if ($hasvalues) - { - $rowspan++; - eval('$changes .= "' . $template->fetch('history_bit') . '";'); - } + eval('$history .= "' . $template->fetch('history_bit') . '";'); + $show['group'] = false; } - - $log['messages'] = implode("
\n", $messages); - - eval('$history .= "' . $template->fetch('history_group') . '";'); } eval('$template->flush("' . $template->fetch('history') . '");'); diff --git a/templates/history.tpl b/templates/history.tpl index 087c188..5ab20f0 100644 --- a/templates/history.tpl +++ b/templates/history.tpl @@ -11,6 +11,15 @@ $header

{@"History for %1$s (bugid: %2$s)"}

+ + + + + + + + $history +
{@"User"}{@"Date"}{@"Field"}{@"Old Value"}{@"New Value"}
$footer \ No newline at end of file diff --git a/templates/history_bit.tpl b/templates/history_bit.tpl index e497075..a85a08a 100644 --- a/templates/history_bit.tpl +++ b/templates/history_bit.tpl @@ -1,5 +1,7 @@ - +; background-color: $bgcolour"> + $log[user] + $log[date] $log[field] - $log[original] - $log[changed] + $log[original] + $log[changed] diff --git a/templates/history_group.tpl b/templates/history_group.tpl deleted file mode 100644 index 7e889d1..0000000 --- a/templates/history_group.tpl +++ /dev/null @@ -1,23 +0,0 @@ -
-
- $log[date] - $log[user] -
-
- - - - - - - - - -$changes -
{@"Field"}{@"Old Value"}{@"New Value"}
-
-
-
- -
- -- 2.43.5