mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-20 13:52:40 +01:00
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:
parent
1c9a8ccb7c
commit
af260c38cb
2 changed files with 7 additions and 2 deletions
|
@ -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');
|
||||
|
|
Loading…
Reference in a new issue