Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phame/controller/post/PhamePostViewController.php
Show First 20 Lines • Show All 112 Lines • ▼ Show 20 Lines | public function handleRequest(AphrontRequest $request) { | ||||
$user_icon = id(new PHUIIconView())->setIcon($user_icon); | $user_icon = id(new PHUIIconView())->setIcon($user_icon); | ||||
$about = id(new PhameDescriptionView()) | $about = id(new PhameDescriptionView()) | ||||
->setTitle($subtitle) | ->setTitle($subtitle) | ||||
->setDescription( | ->setDescription( | ||||
array( | array( | ||||
$user_icon, | $user_icon, | ||||
' ', | ' ', | ||||
$blogger_profile->getTitle(), | $blogger_profile->getDisplayTitle(), | ||||
)) | )) | ||||
->setImage($blogger->getProfileImageURI()) | ->setImage($blogger->getProfileImageURI()) | ||||
->setImageHref($author_uri); | ->setImageHref($author_uri); | ||||
$timeline = $this->buildTransactionTimeline( | $timeline = $this->buildTransactionTimeline( | ||||
$post, | $post, | ||||
id(new PhamePostTransactionQuery()) | id(new PhamePostTransactionQuery()) | ||||
->withTransactionTypes(array(PhabricatorTransactions::TYPE_COMMENT))); | ->withTransactionTypes(array(PhabricatorTransactions::TYPE_COMMENT))); | ||||
$timeline = phutil_tag_div('phui-document-view-pro-box', $timeline); | $timeline = phutil_tag_div('phui-document-view-pro-box', $timeline); | ||||
if ($is_external) { | if ($is_external) { | ||||
$add_comment = null; | $add_comment = null; | ||||
} else { | } else { | ||||
$add_comment = $this->buildCommentForm($post); | $add_comment = $this->buildCommentForm($post); | ||||
$add_comment = phutil_tag_div('mlb mlt', $add_comment); | $add_comment = phutil_tag_div('mlb mlt', $add_comment); | ||||
} | } | ||||
list($prev, $next) = $this->loadAdjacentPosts($post); | list($prev, $next) = $this->loadAdjacentPosts($post); | ||||
$properties = id(new PHUIPropertyListView()) | $properties = id(new PHUIPropertyListView()) | ||||
->setUser($viewer) | ->setUser($viewer) | ||||
->setObject($post); | ->setObject($post); | ||||
$is_live = $this->getIsLive(); | |||||
$is_external = $this->getIsExternal(); | |||||
$next_view = new PhameNextPostView(); | $next_view = new PhameNextPostView(); | ||||
if ($next) { | if ($next) { | ||||
$next_view->setNext($next->getTitle(), $next->getLiveURI()); | $next_view->setNext($next->getTitle(), | ||||
$next->getBestURI($is_live, $is_external)); | |||||
} | } | ||||
if ($prev) { | if ($prev) { | ||||
$next_view->setPrevious($prev->getTitle(), $prev->getLiveURI()); | $next_view->setPrevious($prev->getTitle(), | ||||
$prev->getBestURI($is_live, $is_external)); | |||||
} | } | ||||
$document->setFoot($next_view); | $document->setFoot($next_view); | ||||
$crumbs = $this->buildApplicationCrumbs(); | $crumbs = $this->buildApplicationCrumbs(); | ||||
$properties = phutil_tag_div('phui-document-view-pro-box', $properties); | $properties = phutil_tag_div('phui-document-view-pro-box', $properties); | ||||
$page = $this->newPage() | $page = $this->newPage() | ||||
->setTitle($post->getTitle()) | ->setTitle($post->getTitle()) | ||||
▲ Show 20 Lines • Show All 151 Lines • Show Last 20 Lines |