From: Chuck Hagenbuch Date: Wed, 24 Nov 2010 15:37:42 +0000 (-0500) Subject: Use a partial for showing log messages - this can be re-used in other places soon X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=0b64887365add765c40f966555ef4a3c9e16b744;p=horde.git Use a partial for showing log messages - this can be re-used in other places soon --- diff --git a/chora/app/views/_logMessage.html.php b/chora/app/views/_logMessage.html.php new file mode 100644 index 000000000..71fdcbaa5 --- /dev/null +++ b/chora/app/views/_logMessage.html.php @@ -0,0 +1,41 @@ + +
+
+ +
    +
  • +
+ + queryBranch()): ?> +

+ + + + queryTags()): ?> +

+
    + +
  • escape($tag) ?>
  • + +
+ +
+ +
queryLog()) ?>
+ +
+ queryAuthor(), true) ?>
+ queryDate()) ?> +
+ +
 
+
diff --git a/chora/diff.php b/chora/diff.php index 7d890b2f6..9304b5617 100644 --- a/chora/diff.php +++ b/chora/diff.php @@ -62,19 +62,7 @@ $log_messages = array(); foreach ($VC->getRevisionRange($fl, $r1, $r2) as $val) { $clog = $fl->queryLogs($val); if (!is_null($clog)) { - $fileinfo = $clog->queryFiles($where); - $stats = ($fileinfo && isset($fileinfo['added'])) - ? array('added' => $fileinfo['added'], 'deleted' => $fileinfo['deleted']) - : array(); - - $log_messages[] = array_merge(array( - 'rev' => $val, - 'msg' => Chora::formatLogMessage($clog->queryLog()), - 'author' => Chora::showAuthorName($clog->queryAuthor(), true), - 'branchinfo' => $clog->queryBranch(), - 'date' => Chora::formatDate($clog->queryDate()), - 'tags' => Chora::getTags($clog, $where), - ), $stats); + $log_messages[] = $clog; } } @@ -93,7 +81,7 @@ if (substr($mime_type, 0, 6) == 'image/') { echo "\""' . "\""'; } else { - $view = $injector->createInstance('Horde_View_Base'); + $view = $injector->createInstance('Horde_View'); $view->addHelper('Chora_Diff_Helper'); echo $view->diff($VC->diff($fl, $r1, $r2, array('human' => true, 'num' => $num, 'ws' => $ws))); echo $view->diffCaption(); diff --git a/chora/templates/diff/header.inc b/chora/templates/diff/header.inc index 2ebe29da1..a5005d5ae 100644 --- a/chora/templates/diff/header.inc +++ b/chora/templates/diff/header.inc @@ -15,26 +15,10 @@ -

-
- -
-
    -
  • -
  • - -
  • - - - -
  • - -
  • -
  • +, -
  • -
- abbrev($val['rev'])) ?>: -
-
- +
+createInstance('Horde_View'); +echo $view->renderPartial('app/views/logMessage', array('collection' => $log_messages)); +?>
diff --git a/chora/themes/default/screen.css b/chora/themes/default/screen.css index cbbd1b968..ffd4342d5 100644 --- a/chora/themes/default/screen.css +++ b/chora/themes/default/screen.css @@ -75,11 +75,6 @@ table.history a { } /* Individual revision information. */ -div.revision_log { - margin: 2px 5px 8px 0; - border: 1px solid #ddd; - padding: 3px; -} ul.revision { padding: 2px; float: right; @@ -91,7 +86,7 @@ ul.revision li.tags { } /* Labels. */ -h3.revision_log, h3.checkout, h3.file-view-header { +h3.checkout, h3.file-view-header { background: #e9e9e9; display: inline; font-weight: bold; @@ -174,9 +169,41 @@ ul.singlepsfiles li { padding-bottom: 4px; } +.commit-list h3 { + font-size: 130%; + font-weight: bold; + margin-top: 1em; +} +.commit-summary { + border: 1px solid #ccc; + background: #eee; + padding: .5em; + font-size: 100%; + margin: .2em 0; +} +.commit-message { + font-size: 110%; + margin-bottom: .5em; +} +.commit-info { + width: 33%; + float: right; + border-left: 1px solid #ccc; + padding: 0 1em 1em 1em; + font-family: Menlo,Consolas,"Lucida Console","DejaVu Sans Mono",monospace; + font-size: 90%; +} +.commit-info ul { + list-style: none; + margin-bottom: .5em; +} +.commit-author { + font-size: 90%; +} + /* Diff stat information. */ .diffadd { - color: blue; + color: green; } .diffdel { color: red; @@ -292,15 +319,6 @@ div.diff-right { vertical-align: baseline; } -div.difflog { - padding: 2px; - margin: 0; - border: 1px solid #ddd; -} -div.diffclear { - clear: both; -} - /* Browsefile definitions. */ td.browseLocation em { display: block; diff --git a/chora/themes/hordeweb/screen.css b/chora/themes/hordeweb/screen.css index bd2b91cbe..e2a85ab13 100644 --- a/chora/themes/hordeweb/screen.css +++ b/chora/themes/hordeweb/screen.css @@ -26,12 +26,12 @@ table.headerbar td.text { border-bottom: 5px solid #cfc; } -div.revision_log, h3.revision_log, h3.checkout, #revlog tr.hover, #revlog tr:hover, div.checkout, table.hrdiff, table.history, p.history { +h3.checkout, #revlog tr.hover, #revlog tr:hover, div.checkout, table.hrdiff, table.history, p.history { margin-left: 0; margin-right: 0; border-color: #cfc; } -h3.revision_log, h3.checkout { +h3.checkout { background: #cfc; color: #063; font-size: 100%; diff --git a/chora/themes/tango-blue/screen.css b/chora/themes/tango-blue/screen.css index 80c67ce6b..193804da9 100644 --- a/chora/themes/tango-blue/screen.css +++ b/chora/themes/tango-blue/screen.css @@ -1,3 +1,3 @@ -div.revision_log, div.checkout { +div.checkout { background: #fff; }