Display time of revision in blame
Test Plan: Hover revision in blame Reviewers: epriestley Reviewed By: epriestley CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D1907
This commit is contained in:
@@ -337,10 +337,14 @@ final class DiffusionBrowseFileController extends DiffusionController {
|
||||
'<th style="background: '.$color.'"></th>';
|
||||
} else {
|
||||
|
||||
$revision_time = null;
|
||||
if ($blame_dict) {
|
||||
$color_number = (int)(0xEE -
|
||||
0xEE * ($blame_dict[$rev]['epoch'] - $epoch_min) / $epoch_range);
|
||||
$color = sprintf('#%02xee%02x', $color_number, $color_number);
|
||||
$revision_time = phabricator_datetime(
|
||||
$blame_dict[$rev]['epoch'],
|
||||
$this->getRequest()->getUser());
|
||||
}
|
||||
|
||||
$revision_link = self::renderRevision(
|
||||
@@ -376,8 +380,8 @@ final class DiffusionBrowseFileController extends DiffusionController {
|
||||
}
|
||||
$blame_info =
|
||||
$prev_link .
|
||||
'<th style="background: '.$color.
|
||||
'; width: 12em;">'.$revision_link.'</th>'.
|
||||
'<th style="background: '.$color.'; width: 12em;" title="'.
|
||||
phutil_escape_html($revision_time).'">'.$revision_link.'</th>'.
|
||||
'<th style="background: '.$color.'; width: 12em'.
|
||||
'; font-weight: normal; color: #333;">'.$author_link.'</th>';
|
||||
$last_rev = $rev;
|
||||
|
||||
@@ -13,6 +13,7 @@ phutil_require_module('phabricator', 'applications/markup/syntax');
|
||||
phutil_require_module('phabricator', 'infrastructure/celerity/api');
|
||||
phutil_require_module('phabricator', 'infrastructure/javelin/api');
|
||||
phutil_require_module('phabricator', 'view/layout/panel');
|
||||
phutil_require_module('phabricator', 'view/utils');
|
||||
|
||||
phutil_require_module('phutil', 'markup');
|
||||
phutil_require_module('phutil', 'utils');
|
||||
|
||||
Reference in New Issue
Block a user