Add objectheaders to new View

Summary: This adds the 'PHUIObjectBox' to nearly every place that should get it. I need to comb through Diffusion a little more. I've left Differential mostly alone, but may decide to do it anyways this weekend. I'm sure I missed something else, but these are easy enough to update.

Test Plan: tested each new layout.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D7162
This commit is contained in:
Chad Little
2013-09-28 15:55:38 -07:00
parent 0318cadad4
commit 94d0704fdb
61 changed files with 526 additions and 365 deletions

View File

@@ -50,6 +50,11 @@ final class PonderQuestionViewController extends PonderController {
$actions = $this->buildActionListView($question);
$properties = $this->buildPropertyListView($question);
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
->addContent($actions)
->addContent($properties);
$crumbs = $this->buildApplicationCrumbs($this->buildSideNavView());
$crumbs->setActionList($actions);
$crumbs->addCrumb(
@@ -60,9 +65,7 @@ final class PonderQuestionViewController extends PonderController {
return $this->buildApplicationPage(
array(
$crumbs,
$header,
$actions,
$properties,
$object_box,
$question_xactions,
$answers,
$answer_add_panel
@@ -208,11 +211,16 @@ final class PonderQuestionViewController extends PonderController {
->setAction($this->getApplicationURI("/question/comment/{$id}/"))
->setSubmitButtonName(pht('Comment'));
$object_box = id(new PHUIObjectBoxView())
->setFlush(true)
->setHeaderText(pht('Question Comment'))
->addContent($add_comment);
return $this->wrapComments(
count($xactions),
array(
$timeline,
$add_comment,
$object_box,
));
}
@@ -253,13 +261,18 @@ final class PonderQuestionViewController extends PonderController {
$out[] = phutil_tag('br');
$out[] = id(new PhabricatorAnchorView())
->setAnchorName("A$id");
$out[] = id(new PHUIHeaderView())
->setHeader($this->getHandle($author_phid)->getFullName())
->setImage($this->getHandle($author_phid)->getImageURI());
$header = id(new PHUIHeaderView())
->setHeader($this->getHandle($author_phid)->getFullName());
$out[] = $this->buildAnswerActions($answer);
$out[] = $this->buildAnswerProperties($answer);
$actions = $this->buildAnswerActions($answer);
$properties = $this->buildAnswerProperties($answer);
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
->addContent($actions)
->addContent($properties);
$out[] = $object_box;
$details = array();
$details[] = id(new PhabricatorApplicationTransactionView())
@@ -268,13 +281,20 @@ final class PonderQuestionViewController extends PonderController {
->setTransactions($xactions)
->setMarkupEngine($engine);
$details[] = id(new PhabricatorApplicationTransactionCommentView())
$form = id(new PhabricatorApplicationTransactionCommentView())
->setUser($viewer)
->setObjectPHID($answer->getPHID())
->setShowPreview(false)
->setAction($this->getApplicationURI("/answer/comment/{$id}/"))
->setSubmitButtonName(pht('Comment'));
$comment_box = id(new PHUIObjectBoxView())
->setFlush(true)
->setHeaderText(pht('Answer Comment'))
->addContent($form);
$details[] = $comment_box;
$out[] = $this->wrapComments(
count($xactions),
$details);