Remove pro-white-background, re-style PHUIDocumentViewPro

Summary: This makes document views a little more automatic, and a little more style to the page. The Document itself remains on a pure white centered background, but footer and preceeding objects go back to the original body color. This provides a bit more depth and separation over content and definitions/comments.

Test Plan:
Tested Phriction, Diviner, Legalpad, Phame, Email Commands, HTTP Commands, with and without a footer.

{F1005853}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14582
This commit is contained in:
Chad Little
2015-11-27 20:40:02 -08:00
parent d880346b64
commit a6e24cb2be
13 changed files with 51 additions and 71 deletions

View File

@@ -49,8 +49,7 @@ final class PhamePostViewController extends PhamePostController {
->addActionLink($action_button);
$document = id(new PHUIDocumentViewPro())
->setHeader($header)
->setPropertyList($properties);
->setHeader($header);
if ($post->isDraft()) {
$document->appendChild(
@@ -94,15 +93,16 @@ final class PhamePostViewController extends PhamePostController {
$timeline = phutil_tag_div('phui-document-view-pro-box', $timeline);
$add_comment = $this->buildCommentForm($post);
$add_comment = phutil_tag_div('mlb mlt', $add_comment);
return $this->newPage()
->setTitle($post->getTitle())
->addClass('pro-white-background')
->setPageObjectPHIDs(array($post->getPHID()))
->setCrumbs($crumbs)
->appendChild(
array(
$document,
$properties,
$timeline,
$add_comment,
));
@@ -209,12 +209,6 @@ final class PhamePostViewController extends PhamePostController {
private function buildCommentForm(PhamePost $post) {
$viewer = $this->getViewer();
$is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business');
$add_comment_header = $is_serious
? pht('Add Comment')
: pht('Derp Text');
$draft = PhabricatorDraft::newFromUserAndKey(
$viewer, $post->getPHID());
@@ -222,7 +216,7 @@ final class PhamePostViewController extends PhamePostController {
->setUser($viewer)
->setObjectPHID($post->getPHID())
->setDraft($draft)
->setHeaderText($add_comment_header)
->setHeaderText(pht('Add Comment'))
->setAction($this->getApplicationURI('post/comment/'.$post->getID().'/'))
->setSubmitButtonName(pht('Add Comment'));