mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-02 09:58:24 +01:00
Add a "View Object" button on the web mail view page
Summary: Depends on D19015. Ref T13053. Currently, we don't link up hyperlinks in the body of mail viewed in the web UI. We should, but this is a little tricky (see T13053#235074). As a general improvement to make working with "Must Encrypt" mail less painful, add a big button to jump to the related object. Test Plan: {F5415990} Reviewers: amckinley Maniphest Tasks: T13053 Differential Revision: https://secure.phabricator.com/D19016
This commit is contained in:
parent
085221b0d6
commit
0986c7f673
1 changed files with 19 additions and 1 deletions
|
@ -75,8 +75,26 @@ final class PhabricatorMetaMTAMailViewController
|
|||
->setKey('metadata')
|
||||
->appendChild($this->buildMetadataProperties($mail)));
|
||||
|
||||
$header_view = id(new PHUIHeaderView())
|
||||
->setHeader(pht('Mail'));
|
||||
|
||||
$object_phid = $mail->getRelatedPHID();
|
||||
if ($object_phid) {
|
||||
$handles = $viewer->loadHandles(array($object_phid));
|
||||
$handle = $handles[$object_phid];
|
||||
if ($handle->isComplete() && $handle->getURI()) {
|
||||
$view_button = id(new PHUIButtonView())
|
||||
->setTag('a')
|
||||
->setText(pht('View Object'))
|
||||
->setIcon('fa-chevron-right')
|
||||
->setHref($handle->getURI());
|
||||
|
||||
$header_view->addActionLink($view_button);
|
||||
}
|
||||
}
|
||||
|
||||
$object_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Mail'))
|
||||
->setHeader($header_view)
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->addTabGroup($tab_group);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue