From c2647cbe52e513239bb7b73332456338430bf13b Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 11 Sep 2005 00:09:47 +0000 Subject: [PATCH] - styled log page - no longer use print_r() in view.php - removed log_prop.tpl - added .subhead CSS --- log.php | 14 ++------------ templates/default/log.tpl | 9 ++------- templates/default/log_node.tpl | 14 ++++++++------ templates/default/log_prop.tpl | 1 - templates/default/main.css | 31 +++++++++++++++++++++++++++++++ templates/default/subhead.gif | Bin 0 -> 885 bytes templates/default/view.tpl | 23 +++++++++++++---------- view.php | 2 -- 8 files changed, 56 insertions(+), 38 deletions(-) delete mode 100644 templates/default/log_prop.tpl create mode 100644 templates/default/subhead.gif diff --git a/log.php b/log.php index 217d8fa..1a87650 100644 --- a/log.php +++ b/log.php @@ -11,7 +11,6 @@ \*=====================================================================*/ $fetchtemplates = array( - 'log_prop', 'log_node', 'log' ); @@ -31,8 +30,6 @@ $nodes = ''; foreach ($logs->fetch() AS $log) { - $props = ''; - $prev = $viewsvn->svn->common->fetch_prev_rev($path, $log['rev']); $link['view'] = (!$isdir ? $viewsvn->paths->out('view.php' . $viewsvn->paths->fetch_rev_str(false, $log['rev']), $path) : ''); @@ -49,16 +46,9 @@ foreach ($logs->fetch() AS $log) { $link['diffprev'] = $viewsvn->paths->out('diff.php' . $viewsvn->paths->fetch_rev_str(true, $log['rev'], $prev), $path); } - - foreach ($log AS $key => $val) - { - if ($key != 'files') - { - $val = $viewsvn->svn->format($val); - eval('$props .= "' . $template->fetch('log_prop') . '";'); - } - } + $log['message_clean'] = nl2br(htmlspecialchars($log['message'])); + eval('$nodes .= "' . $template->fetch('log_node') . '";'); } diff --git a/templates/default/log.tpl b/templates/default/log.tpl index 35276ca..b22428e 100644 --- a/templates/default/log.tpl +++ b/templates/default/log.tpl @@ -2,17 +2,12 @@ $doctype $headinclude - Log + ViewSVN - Log $header -$navbar - -
- - $footer \ No newline at end of file diff --git a/templates/default/log_node.tpl b/templates/default/log_node.tpl index a64dd55..19d2940 100644 --- a/templates/default/log_node.tpl +++ b/templates/default/log_node.tpl @@ -1,10 +1,12 @@ -
  • - r$log[rev] +
    + r$log[rev] ($log[author]) + $log[date] $log[timezone] - View - Blame - Diff to HEAD - Diff to PREV -
      -$props -
    -
  • + +
    +$log[message_clean] +
    + diff --git a/templates/default/log_prop.tpl b/templates/default/log_prop.tpl deleted file mode 100644 index 41e6e7b..0000000 --- a/templates/default/log_prop.tpl +++ /dev/null @@ -1 +0,0 @@ -
  • $key : $val
  • \ No newline at end of file diff --git a/templates/default/main.css b/templates/default/main.css index 7ad81a2..f13240c 100644 --- a/templates/default/main.css +++ b/templates/default/main.css @@ -44,6 +44,23 @@ a:hover padding: 5px; } +.subhead +{ + background-color: rgb(126, 144, 171); + background-image: url(subhead.gif); + background-repeat: repeat-x; + + font-weight: bold; + font-size: 12; + color: rgb(66, 66, 66); + + border-color: rgb(165, 165, 165); + border-width: 1px 1px 0px 1px; + border-style: solid; + + padding: 3px; +} + .content { background-color: rgb(232, 237, 247); @@ -55,6 +72,20 @@ a:hover padding: 2px; } +.code +{ + background-color: rgb(255, 255, 255); + + font-family: monospace; + font-size: 11px; + + border-color: rgb(165, 165, 165); + border-width: 1px 1px 1px 1px; + border-style: solid; + + padding: 2px; +} + .list li { list-style-image: url(bullet.gif); diff --git a/templates/default/subhead.gif b/templates/default/subhead.gif new file mode 100644 index 0000000000000000000000000000000000000000..c2ba7a2954b447f954d683a84d781618747c83db GIT binary patch literal 885 zcmV-*1B(1dNk%w1VKM+@0M!5hevqq#m9K-8u7;Pevc1iUnzEm)!IPr6j-Ixyxyq@v z$C; z;IMd1E}PF|l6uW41ejE#IivE#>(BTJtA*n#ECm@{kM%(-*s5THYg9!C>Yvs9w#wwd>cgW4HD|ySDAy zxO3~?eY=3~-@tn{}#N9CqlE;fElGDB_48LSW*FD5j|5iY&I6VgxY8DC3MY)@b96Gq#}P zjy(40NG7S|l1BpI0+o_zM{=bwNED(Iku7Ha6Bh$gD&qKr1` L=%bKA83X`3*LUrP literal 0 HcmV?d00001 diff --git a/templates/default/view.tpl b/templates/default/view.tpl index d4de0b4..5053383 100644 --- a/templates/default/view.tpl +++ b/templates/default/view.tpl @@ -7,9 +7,6 @@ $headinclude $header -$navbar - -
    View Log @@ -22,14 +19,20 @@ $navbar - Diff to PREV -
    $logmsg
    +
    Revision Information
    +
    +
    Revision: $logmsg[rev]
    +
    Author: $logmsg[author]
    +
    Date: $logmsg[date] $logmsg[timezone]
    +
    Message: $logmsg[message]
    +
    + +
    +$navbar +
    - - - - -
    +
    $catdata -
    + $footer \ No newline at end of file diff --git a/view.php b/view.php index e889a01..aa366aa 100644 --- a/view.php +++ b/view.php @@ -40,8 +40,6 @@ if ($show['prev']) $logmsg = $viewsvn->svn->common->fetch_log($path, $viewsvn->paths->fetch_rev_num()); unset($logmsg['files']); -$logmsg = print_r($logmsg, true); - $catdata = $viewsvn->svn->format(implode("\n", $viewsvn->svn->cat($repos, $relpath, $viewsvn->paths->fetch_rev_num()))); // ################################################################### -- 2.43.5