mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 00:32:42 +01:00
Display committed date in audits
Summary: Our auditors requested displaying this field and I can image that it can be useful. Test Plan: /audit/ Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3044
This commit is contained in:
parent
d07934474e
commit
7d9960e522
3 changed files with 11 additions and 0 deletions
|
@ -389,6 +389,7 @@ final class PhabricatorAuditListController extends PhabricatorAuditController {
|
|||
$view = new PhabricatorAuditListView();
|
||||
$view->setAudits($audits);
|
||||
$view->setCommits($query->getCommits());
|
||||
$view->setUser($request->getUser());
|
||||
$view->setNoDataString($nodata);
|
||||
|
||||
$phids = $view->getRequiredHandlePHIDs();
|
||||
|
|
|
@ -136,12 +136,17 @@ final class PhabricatorAuditListView extends AphrontView {
|
|||
$rows = array();
|
||||
foreach ($this->audits as $audit) {
|
||||
$commit_phid = $audit->getCommitPHID();
|
||||
$committed = null;
|
||||
if ($last == $commit_phid) {
|
||||
$commit_name = null;
|
||||
$commit_desc = null;
|
||||
} else {
|
||||
$commit_name = $this->getHandle($commit_phid)->renderLink();
|
||||
$commit_desc = $this->getCommitDescription($commit_phid);
|
||||
$commit = idx($this->commits, $commit_phid);
|
||||
if ($commit && $this->user) {
|
||||
$committed = phabricator_datetime($commit->getEpoch(), $this->user);
|
||||
}
|
||||
$last = $commit_phid;
|
||||
}
|
||||
|
||||
|
@ -158,6 +163,7 @@ final class PhabricatorAuditListView extends AphrontView {
|
|||
$rows[] = array(
|
||||
$commit_name,
|
||||
phutil_escape_html($commit_desc),
|
||||
$committed,
|
||||
$auditor_handle->renderLink(),
|
||||
phutil_escape_html($status),
|
||||
$reasons,
|
||||
|
@ -175,6 +181,7 @@ final class PhabricatorAuditListView extends AphrontView {
|
|||
array(
|
||||
'Commit',
|
||||
'Description',
|
||||
'Committed',
|
||||
'Auditor',
|
||||
'Status',
|
||||
'Details',
|
||||
|
@ -185,11 +192,13 @@ final class PhabricatorAuditListView extends AphrontView {
|
|||
($this->showDescriptions ? 'wide' : ''),
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
($this->showDescriptions ? '' : 'wide'),
|
||||
));
|
||||
$table->setRowClasses($rowc);
|
||||
$table->setColumnVisibility(
|
||||
array(
|
||||
$this->showDescriptions,
|
||||
$this->showDescriptions,
|
||||
$this->showDescriptions,
|
||||
true,
|
||||
|
|
|
@ -619,6 +619,7 @@ final class PhabricatorDirectoryMainController
|
|||
$view = new PhabricatorAuditListView();
|
||||
$view->setAudits($audits);
|
||||
$view->setCommits($commits);
|
||||
$view->setUser($user);
|
||||
|
||||
$phids = $view->getRequiredHandlePHIDs();
|
||||
$handles = id(new PhabricatorObjectHandleData($phids))->loadHandles();
|
||||
|
|
Loading…
Reference in a new issue