--- /dev/null
+<!-- <h3><?php /*echo date('Y-m-d', $logMessage->queryDate()) */?></h3> -->
+<div class="commit-summary">
+ <div class="commit-info">
+ <ul>
+ <li>
+ <a href="<?php echo Chora::url('co', $GLOBALS['where'], array('r' => $logMessage->queryRevision())) ?>" title="<?php echo $this->escape($logMessage->queryRevision()) ?>"><?php echo $this->escape($logMessage->queryRevision()) ?></a>
+ <span class="diffadd">+<?php echo $this->escape($logMessage->getAddedLines()) ?></span>, <span class="diffdel">-<?php echo $this->escape($logMessage->getDeletedLines()) ?></span>
+ </li>
+ </ul>
+ <ul>
+ <li></li>
+ </ul>
+
+ <?php if ($branchinfo = $logMessage->queryBranch()): ?>
+ <h4><?php echo _("Branches") ?></h4>
+ <ul>
+ <?php foreach ($branchinfo as $branchname): ?>
+ <li><a href="<?php echo Chora::url('browsefile', $GLOBALS['where'], array('onb' => $branchname)) ?>"><?php echo $this->escape($branchname) ?></a></li>
+ <?php endforeach; ?>
+ </ul>
+ <?php endif; ?>
+
+ <?php if ($tags = $logMessage->queryTags()): ?>
+ <h4><?php echo _("Tags") ?></h4>
+ <ul>
+ <?php foreach ($tags as $tag): ?>
+ <li><?php echo $this->escape($tag) ?></li>
+ <?php endforeach; ?>
+ </ul>
+ <?php endif; ?>
+ </div>
+
+ <div class="commit-message"><?php echo Chora::formatLogMessage($logMessage->queryLog()) ?></div>
+
+ <div class="commit-author">
+ <?php echo Chora::showAuthorName($logMessage->queryAuthor(), true) ?><br>
+ <?php echo Chora::formatDate($logMessage->queryDate()) ?>
+ </div>
+
+ <div class="clear"> </div>
+</div>
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;
}
}
echo "<tr><td><img src=\"$url1\" alt=\"" . htmlspecialchars($r1) . '" /></td>' .
"<td><img src=\"$url2\" alt=\"" . htmlspecialchars($r2) . '" /></td></tr>';
} 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();
</div>
<?php if (!empty($log_messages)): ?>
-<h3 class="revision_log"><?php echo _("Log Message") ?></h3>
-<div class="revision_log">
-<?php foreach ($log_messages as $val): ?>
- <div class="difflog">
- <ul class="revision striped">
- <?php if (!empty($val['author'])): ?><li><?php echo _("Author:") ?> <?php echo $val['author'] ?></li><?php endif; ?>
- <?php if (!empty($val['date'])): ?><li><?php echo _("Date:") ?> <?php echo $val['date'] ?></li><?php endif; ?>
-<?php if (!empty($val['branchinfo'])): ?>
- <li><?php echo _("Branch:") ?>
-<?php foreach ($val['branchinfo'] as $branchname): ?>
- <strong><a href="<?php echo Chora::url('browsefile', $where, array('onb' => $branchname)) ?>"><?php echo $branchname ?></a></strong>
-<?php endforeach; ?>
- </li>
-<?php endif; ?>
- <?php if (!empty($val['tags'])): ?><li class="tags"><?php echo _("Tags:") ?> <?php echo implode(', ', $val['tags']) ?></li><?php endif; ?>
- <?php if (isset($val['added'])): ?><li><?php echo _("Changes:") ?> <span class="diffadd">+<?php echo htmlspecialchars($val['added']) ?></span>, <span class="diffdel">-<?php echo htmlspecialchars($val['deleted']) ?></span> <?php echo _("lines") ?></li><?php endif; ?>
- </ul>
- <a href="<?php echo Chora::url('co', $where, array('r' => $val['rev'])) ?>" title="<?php echo htmlspecialchars($val['rev']) ?>"><?php echo htmlspecialchars($VC->abbrev($val['rev'])) ?></a>: <?php echo $val['msg'] ?>
- <div class="diffclear"></div>
- </div>
-<?php endforeach; ?>
+<div class="commitList">
+<?php
+$view = $injector->createInstance('Horde_View');
+echo $view->renderPartial('app/views/logMessage', array('collection' => $log_messages));
+?>
</div>
<?php endif; ?>
}
/* Individual revision information. */
-div.revision_log {
- margin: 2px 5px 8px 0;
- border: 1px solid #ddd;
- padding: 3px;
-}
ul.revision {
padding: 2px;
float: right;
}
/* Labels. */
-h3.revision_log, h3.checkout, h3.file-view-header {
+h3.checkout, h3.file-view-header {
background: #e9e9e9;
display: inline;
font-weight: bold;
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;
vertical-align: baseline;
}
-div.difflog {
- padding: 2px;
- margin: 0;
- border: 1px solid #ddd;
-}
-div.diffclear {
- clear: both;
-}
-
/* Browsefile definitions. */
td.browseLocation em {
display: block;
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%;
-div.revision_log, div.checkout {
+div.checkout {
background: #fff;
}