mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-30 01:10:58 +01:00
Update MetaMTA to new UI
Summary: Swaps over to new hotness Test Plan: Pull up mail view, see new UI Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D15616
This commit is contained in:
parent
57ed6b749a
commit
4d9bbc539e
1 changed files with 15 additions and 12 deletions
|
@ -23,7 +23,8 @@ final class PhabricatorMetaMTAMailViewController
|
||||||
$header = id(new PHUIHeaderView())
|
$header = id(new PHUIHeaderView())
|
||||||
->setHeader($title)
|
->setHeader($title)
|
||||||
->setUser($viewer)
|
->setUser($viewer)
|
||||||
->setPolicyObject($mail);
|
->setPolicyObject($mail)
|
||||||
|
->setHeaderIcon('fa-envelope');
|
||||||
|
|
||||||
$status = $mail->getStatus();
|
$status = $mail->getStatus();
|
||||||
$name = PhabricatorMailOutboundStatus::getStatusName($status);
|
$name = PhabricatorMailOutboundStatus::getStatusName($status);
|
||||||
|
@ -32,24 +33,26 @@ final class PhabricatorMetaMTAMailViewController
|
||||||
$header->setStatus($icon, $color, $name);
|
$header->setStatus($icon, $color, $name);
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs()
|
$crumbs = $this->buildApplicationCrumbs()
|
||||||
->addTextCrumb(pht('Mail %d', $mail->getID()));
|
->addTextCrumb(pht('Mail %d', $mail->getID()))
|
||||||
|
->setBorder(true);
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeaderText(pht('Mail'))
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->addPropertyList($this->buildMessageProperties($mail), pht('Message'))
|
->addPropertyList($this->buildMessageProperties($mail), pht('Message'))
|
||||||
->addPropertyList($this->buildHeaderProperties($mail), pht('Headers'))
|
->addPropertyList($this->buildHeaderProperties($mail), pht('Headers'))
|
||||||
->addPropertyList($this->buildDeliveryProperties($mail), pht('Delivery'))
|
->addPropertyList($this->buildDeliveryProperties($mail), pht('Delivery'))
|
||||||
->addPropertyList($this->buildMetadataProperties($mail), pht('Metadata'));
|
->addPropertyList($this->buildMetadataProperties($mail), pht('Metadata'));
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
$view = id(new PHUITwoColumnView())
|
||||||
array(
|
->setHeader($header)
|
||||||
$crumbs,
|
->setFooter($object_box);
|
||||||
$object_box,
|
|
||||||
),
|
return $this->newPage()
|
||||||
array(
|
->setTitle($title)
|
||||||
'title' => $title,
|
->setCrumbs($crumbs)
|
||||||
'pageObjects' => array($mail->getPHID()),
|
->setPageObjectPHIDs(array($mail->getPHID()))
|
||||||
));
|
->appendChild($view);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildMessageProperties(PhabricatorMetaMTAMail $mail) {
|
private function buildMessageProperties(PhabricatorMetaMTAMail $mail) {
|
||||||
|
|
Loading…
Reference in a new issue