Changeset View
Changeset View
Standalone View
Standalone View
src/applications/pholio/controller/PholioMockViewController.php
Show First 20 Lines • Show All 144 Lines • ▼ Show 20 Lines | if ($mock->isClosed()) { | ||||
id(new PhabricatorActionView()) | id(new PhabricatorActionView()) | ||||
->setIcon('fa-ban') | ->setIcon('fa-ban') | ||||
->setName(pht('Close Mock')) | ->setName(pht('Close Mock')) | ||||
->setHref($this->getApplicationURI('/archive/'.$mock->getID().'/')) | ->setHref($this->getApplicationURI('/archive/'.$mock->getID().'/')) | ||||
->setDisabled(!$can_edit) | ->setDisabled(!$can_edit) | ||||
->setWorkflow(true)); | ->setWorkflow(true)); | ||||
} | } | ||||
$curtain->addAction( | $relationship_list = PhabricatorObjectRelationshipList::newForObject( | ||||
id(new PhabricatorActionView()) | $viewer, | ||||
->setIcon('fa-anchor') | $mock); | ||||
->setName(pht('Edit Maniphest Tasks')) | |||||
->setHref("/search/attach/{$mock->getPHID()}/TASK/edge/") | $relationship_submenu = $relationship_list->newActionMenu(); | ||||
->setDisabled(!$viewer->isLoggedIn()) | if ($relationship_submenu) { | ||||
->setWorkflow(true)); | $curtain->addAction($relationship_submenu); | ||||
} | |||||
if ($this->getManiphestTaskPHIDs()) { | if ($this->getManiphestTaskPHIDs()) { | ||||
$curtain->newPanel() | $curtain->newPanel() | ||||
->setHeaderText(pht('Maniphest Tasks')) | ->setHeaderText(pht('Maniphest Tasks')) | ||||
->appendChild( | ->appendChild( | ||||
$viewer->renderHandleList($this->getManiphestTaskPHIDs())); | $viewer->renderHandleList($this->getManiphestTaskPHIDs())); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 70 Lines • Show Last 20 Lines |