mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
Link to Herald transcripts from Herald transactions
Summary: See IRC. Some users are having difficulty figuring out why Herald is taking some actions. Make it easier to get to the transcript. Test Plan: {F144622} Reviewers: btrahan, chad Reviewed By: chad Subscribers: dctrwatson, epriestley Differential Revision: https://secure.phabricator.com/D8804
This commit is contained in:
parent
e49251ec98
commit
b5df5af04d
5 changed files with 52 additions and 2 deletions
|
@ -147,7 +147,7 @@ return array(
|
|||
'rsrc/css/phui/phui-status.css' => '2f562399',
|
||||
'rsrc/css/phui/phui-tag-view.css' => '295d81c4',
|
||||
'rsrc/css/phui/phui-text.css' => '23e9b4b7',
|
||||
'rsrc/css/phui/phui-timeline-view.css' => '23fe340a',
|
||||
'rsrc/css/phui/phui-timeline-view.css' => '17905388',
|
||||
'rsrc/css/phui/phui-workboard-view.css' => '84f2c272',
|
||||
'rsrc/css/phui/phui-workpanel-view.css' => '97b69459',
|
||||
'rsrc/css/sprite-actions.css' => '969ad0e5',
|
||||
|
@ -762,7 +762,7 @@ return array(
|
|||
'phui-status-list-view-css' => '2f562399',
|
||||
'phui-tag-view-css' => '295d81c4',
|
||||
'phui-text-css' => '23e9b4b7',
|
||||
'phui-timeline-view-css' => '23fe340a',
|
||||
'phui-timeline-view-css' => '17905388',
|
||||
'phui-workboard-view-css' => '84f2c272',
|
||||
'phui-workpanel-view-css' => '97b69459',
|
||||
'policy-css' => '957ea14c',
|
||||
|
|
|
@ -661,6 +661,11 @@ abstract class PhabricatorApplicationTransactionEditor
|
|||
$herald_xactions = $this->applyHeraldRules($object, $xactions);
|
||||
|
||||
if ($herald_xactions) {
|
||||
$xscript_id = $this->getHeraldTranscript()->getID();
|
||||
foreach ($herald_xactions as $herald_xaction) {
|
||||
$herald_xaction->setMetadataValue('herald:transcriptID', $xscript_id);
|
||||
}
|
||||
|
||||
// NOTE: We're acting as the omnipotent user because rules deal with
|
||||
// their own policy issues. We use a synthetic author PHID (the
|
||||
// Herald application) as the author of record, so that transactions
|
||||
|
|
|
@ -757,6 +757,21 @@ abstract class PhabricatorApplicationTransaction
|
|||
return true;
|
||||
}
|
||||
|
||||
public function renderExtraInformationLink() {
|
||||
$herald_xscript_id = $this->getMetadataValue('herald:transcriptID');
|
||||
|
||||
if ($herald_xscript_id) {
|
||||
return phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '/herald/transcript/'.$herald_xscript_id.'/',
|
||||
),
|
||||
pht('View Herald Transcript'));
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/* -( PhabricatorPolicyInterface Implementation )-------------------------- */
|
||||
|
||||
|
|
|
@ -190,6 +190,22 @@ class PhabricatorApplicationTransactionView extends AphrontView {
|
|||
pht('(Show Details)'));
|
||||
}
|
||||
|
||||
private function buildExtraInformationLink(
|
||||
PhabricatorApplicationTransaction $xaction) {
|
||||
|
||||
$link = $xaction->renderExtraInformationLink();
|
||||
if (!$link) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'class' => 'phui-timeline-extra-information',
|
||||
),
|
||||
array(" \xC2\xB7 ", $link));
|
||||
}
|
||||
|
||||
protected function shouldGroupTransactions(
|
||||
PhabricatorApplicationTransaction $u,
|
||||
PhabricatorApplicationTransaction $v) {
|
||||
|
@ -313,6 +329,14 @@ class PhabricatorApplicationTransactionView extends AphrontView {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (!$this->isPreview) {
|
||||
$more = $this->buildExtraInformationLink($xaction);
|
||||
if ($more) {
|
||||
$title = array($title, ' ', $more);
|
||||
}
|
||||
}
|
||||
|
||||
$event->setTitle($title);
|
||||
}
|
||||
|
||||
|
|
|
@ -307,3 +307,9 @@
|
|||
.device-phone .phui-timeline-older-transactions-are-hidden {
|
||||
margin: 0 8px;
|
||||
}
|
||||
|
||||
|
||||
.phui-timeline-title .phui-timeline-extra-information a {
|
||||
font-weight: normal;
|
||||
color: {$bluetext};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue