@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add a "View Task" button to HTML mail from Maniphest

Summary:
See downstream <https://phabricator.wikimedia.org/T1050>. Some time ago, we added a "View Revision" button to Differential mail. This hasn't created any problems and generally seems good / desirable.

It isn't trivial to just add everywhere since we need a translation string in each case, but at least add it to Maniphest for now. Going forward, we can fill in more applications as they come up.

Test Plan:
Used `bin/mail show-outbound --id <x> --dump-html`:

{F6470461}

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D20561

+19 -2
+4
src/applications/audit/editor/PhabricatorAuditEditor.php
··· 485 485 return $phids; 486 486 } 487 487 488 + protected function getObjectLinkButtonLabelForMail() { 489 + return pht('View Commit'); 490 + } 491 + 488 492 protected function buildMailBody( 489 493 PhabricatorLiskDAO $object, 490 494 array $xactions) {
+5 -1
src/applications/differential/editor/DifferentialTransactionEditor.php
··· 601 601 return $xactions; 602 602 } 603 603 604 + protected function getObjectLinkButtonLabelForMail() { 605 + return pht('View Revision'); 606 + } 607 + 604 608 protected function buildMailBody( 605 609 PhabricatorLiskDAO $object, 606 610 array $xactions) { ··· 617 621 $this->addHeadersAndCommentsToMailBody( 618 622 $body, 619 623 $xactions, 620 - pht('View Revision'), 624 + $this->getObjectLinkButtonLabelForMail($object), 621 625 $revision_uri); 622 626 623 627 $type_inline = DifferentialTransaction::TYPE_INLINE;
+4
src/applications/maniphest/editor/ManiphestTransactionEditor.php
··· 206 206 ->setSubject("T{$id}: {$title}"); 207 207 } 208 208 209 + protected function getObjectLinkButtonLabelForMail() { 210 + return pht('View Task'); 211 + } 212 + 209 213 protected function buildMailBody( 210 214 PhabricatorLiskDAO $object, 211 215 array $xactions) {
+6 -1
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
··· 3417 3417 ->setViewer($this->requireActor()) 3418 3418 ->setContextObject($object); 3419 3419 3420 - $this->addHeadersAndCommentsToMailBody($body, $xactions); 3420 + $button_label = $this->getObjectLinkButtonLabelForMail($object); 3421 + 3422 + $this->addHeadersAndCommentsToMailBody($body, $xactions, $button_label); 3421 3423 $this->addCustomFieldsToMailBody($body, $object, $xactions); 3422 3424 3423 3425 return $body; 3424 3426 } 3425 3427 3428 + protected function getObjectLinkButtonLabelForMail() { 3429 + return null; 3430 + } 3426 3431 3427 3432 /** 3428 3433 * @task mail