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>';
|
'<th style="background: '.$color.'"></th>';
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
$revision_time = null;
|
||||||
if ($blame_dict) {
|
if ($blame_dict) {
|
||||||
$color_number = (int)(0xEE -
|
$color_number = (int)(0xEE -
|
||||||
0xEE * ($blame_dict[$rev]['epoch'] - $epoch_min) / $epoch_range);
|
0xEE * ($blame_dict[$rev]['epoch'] - $epoch_min) / $epoch_range);
|
||||||
$color = sprintf('#%02xee%02x', $color_number, $color_number);
|
$color = sprintf('#%02xee%02x', $color_number, $color_number);
|
||||||
|
$revision_time = phabricator_datetime(
|
||||||
|
$blame_dict[$rev]['epoch'],
|
||||||
|
$this->getRequest()->getUser());
|
||||||
}
|
}
|
||||||
|
|
||||||
$revision_link = self::renderRevision(
|
$revision_link = self::renderRevision(
|
||||||
@@ -376,8 +380,8 @@ final class DiffusionBrowseFileController extends DiffusionController {
|
|||||||
}
|
}
|
||||||
$blame_info =
|
$blame_info =
|
||||||
$prev_link .
|
$prev_link .
|
||||||
'<th style="background: '.$color.
|
'<th style="background: '.$color.'; width: 12em;" title="'.
|
||||||
'; width: 12em;">'.$revision_link.'</th>'.
|
phutil_escape_html($revision_time).'">'.$revision_link.'</th>'.
|
||||||
'<th style="background: '.$color.'; width: 12em'.
|
'<th style="background: '.$color.'; width: 12em'.
|
||||||
'; font-weight: normal; color: #333;">'.$author_link.'</th>';
|
'; font-weight: normal; color: #333;">'.$author_link.'</th>';
|
||||||
$last_rev = $rev;
|
$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/celerity/api');
|
||||||
phutil_require_module('phabricator', 'infrastructure/javelin/api');
|
phutil_require_module('phabricator', 'infrastructure/javelin/api');
|
||||||
phutil_require_module('phabricator', 'view/layout/panel');
|
phutil_require_module('phabricator', 'view/layout/panel');
|
||||||
|
phutil_require_module('phabricator', 'view/utils');
|
||||||
|
|
||||||
phutil_require_module('phutil', 'markup');
|
phutil_require_module('phutil', 'markup');
|
||||||
phutil_require_module('phutil', 'utils');
|
phutil_require_module('phutil', 'utils');
|
||||||
|
|||||||
Reference in New Issue
Block a user