Differential D20966 Diff 49960 src/applications/maniphest/controller/ManiphestTaskDetailController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/controller/ManiphestTaskDetailController.php
Show First 20 Lines • Show All 334 Lines • ▼ Show 20 Lines | private function buildCurtain( | ||||
if ($relationship_submenu) { | if ($relationship_submenu) { | ||||
$curtain->addAction($relationship_submenu); | $curtain->addAction($relationship_submenu); | ||||
} | } | ||||
$owner_phid = $task->getOwnerPHID(); | $owner_phid = $task->getOwnerPHID(); | ||||
$author_phid = $task->getAuthorPHID(); | $author_phid = $task->getAuthorPHID(); | ||||
$handles = $viewer->loadHandles(array($owner_phid, $author_phid)); | $handles = $viewer->loadHandles(array($owner_phid, $author_phid)); | ||||
$assigned_refs = id(new PHUICurtainObjectRefListView()) | |||||
->setViewer($viewer) | |||||
->setEmptyMessage(pht('None')); | |||||
if ($owner_phid) { | if ($owner_phid) { | ||||
$image_uri = $handles[$owner_phid]->getImageURI(); | $assigned_ref = $assigned_refs->newObjectRefView() | ||||
$image_href = $handles[$owner_phid]->getURI(); | ->setHandle($handles[$owner_phid]); | ||||
$owner = $viewer->renderHandle($owner_phid)->render(); | |||||
$content = phutil_tag('strong', array(), $owner); | |||||
$assigned_to = id(new PHUIHeadThingView()) | |||||
->setImage($image_uri) | |||||
->setImageHref($image_href) | |||||
->setContent($content); | |||||
} else { | |||||
$assigned_to = phutil_tag('em', array(), pht('None')); | |||||
} | } | ||||
$curtain->newPanel() | $curtain->newPanel() | ||||
->setHeaderText(pht('Assigned To')) | ->setHeaderText(pht('Assigned To')) | ||||
->appendChild($assigned_to); | ->appendChild($assigned_refs); | ||||
$author_refs = id(new PHUICurtainObjectRefListView()) | |||||
->setViewer($viewer); | |||||
$author_uri = $handles[$author_phid]->getImageURI(); | $author_ref = $author_refs->newObjectRefView() | ||||
$author_href = $handles[$author_phid]->getURI(); | ->setHandle($handles[$author_phid]) | ||||
$author = $viewer->renderHandle($author_phid)->render(); | ->setEpoch($task->getDateCreated()); | ||||
$content = phutil_tag('strong', array(), $author); | |||||
$date = phabricator_date($task->getDateCreated(), $viewer); | |||||
$content = pht('%s, %s', $content, $date); | |||||
$authored_by = id(new PHUIHeadThingView()) | |||||
->setImage($author_uri) | |||||
->setImageHref($author_href) | |||||
->setContent($content); | |||||
$curtain->newPanel() | $curtain->newPanel() | ||||
->setHeaderText(pht('Authored By')) | ->setHeaderText(pht('Authored By')) | ||||
->appendChild($authored_by); | ->appendChild($author_refs); | ||||
return $curtain; | return $curtain; | ||||
} | } | ||||
private function buildPropertyView( | private function buildPropertyView( | ||||
ManiphestTask $task, | ManiphestTask $task, | ||||
PhabricatorCustomFieldList $field_list, | PhabricatorCustomFieldList $field_list, | ||||
array $edges, | array $edges, | ||||
▲ Show 20 Lines • Show All 456 Lines • Show Last 20 Lines |