1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-25 06:50:55 +01:00

Update Diviner to modern UI

Summary: Moves to `newPage`, updates UI on edit page.

Test Plan: Edit a book, view a book, main, list, search.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15585
This commit is contained in:
Chad Little 2016-04-02 13:33:07 -07:00
parent 13176e4185
commit 2992b5277a
5 changed files with 36 additions and 32 deletions

View file

@ -240,14 +240,12 @@ final class DivinerAtomController extends DivinerController {
$prop_list = phutil_tag_div('phui-document-view-pro-box', $prop_list); $prop_list = phutil_tag_div('phui-document-view-pro-box', $prop_list);
return $this->buildApplicationPage( return $this->newPage()
array( ->setTitle($symbol->getTitle())
$crumbs, ->setCrumbs($crumbs)
->appendChild(array(
$document, $document,
$prop_list, $prop_list,
),
array(
'title' => $symbol->getTitle(),
)); ));
} }

View file

@ -92,13 +92,11 @@ final class DivinerBookController extends DivinerController {
$document->appendChild($preface_view); $document->appendChild($preface_view);
$document->appendChild($out); $document->appendChild($out);
return $this->buildApplicationPage( return $this->newPage()
array( ->setTitle($book->getTitle())
$crumbs, ->setCrumbs($crumbs)
->appendChild(array(
$document, $document,
),
array(
'title' => $book->getTitle(),
)); ));
} }

View file

@ -57,8 +57,10 @@ final class DivinerBookEditController extends DivinerController {
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Edit Basics')); $crumbs->addTextCrumb(pht('Edit Basics'));
$crumbs->setBorder(true);
$title = pht('Edit %s', $book->getTitle()); $title = pht('Edit Book: %s', $book->getTitle());
$header_icon = 'fa-pencil';
$policies = id(new PhabricatorPolicyQuery()) $policies = id(new PhabricatorPolicyQuery())
->setViewer($viewer) ->setViewer($viewer)
@ -104,8 +106,9 @@ final class DivinerBookEditController extends DivinerController {
->setValue(pht('Save')) ->setValue(pht('Save'))
->addCancelButton($view_uri)); ->addCancelButton($view_uri));
$object_box = id(new PHUIObjectBoxView()) $box = id(new PHUIObjectBoxView())
->setHeaderText($title) ->setHeaderText(pht('Book'))
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->setForm($form); ->setForm($form);
$timeline = $this->buildTransactionTimeline( $timeline = $this->buildTransactionTimeline(
@ -113,15 +116,21 @@ final class DivinerBookEditController extends DivinerController {
new DivinerLiveBookTransactionQuery()); new DivinerLiveBookTransactionQuery());
$timeline->setShouldTerminate(true); $timeline->setShouldTerminate(true);
return $this->buildApplicationPage( $header = id(new PHUIHeaderView())
array( ->setHeader($title)
$crumbs, ->setHeaderIcon($header_icon);
$object_box,
$view = id(new PHUITwoColumnView())
->setHeader($header)
->setFooter(array(
$box,
$timeline, $timeline,
),
array(
'title' => $title,
)); ));
return $this->newPage()
->setTitle($title)
->setCrumbs($crumbs)
->appendChild($view);
} }
} }

View file

@ -84,11 +84,12 @@ final class DivinerFindController extends DivinerController {
$list = $this->renderAtomList($atoms); $list = $this->renderAtomList($atoms);
return $this->buildApplicationPage( return $this->newPage()
$list, ->setTitle(array(pht('Find'), pht('"%s"', $query_text)))
array( ->appendChild(array(
'title' => array(pht('Find'), pht('"%s"', $query_text)), $list,
)); ));
} }
} }

View file

@ -65,13 +65,11 @@ final class DivinerMainController extends DivinerController {
$document->appendChild($text); $document->appendChild($text);
} }
return $this->buildApplicationPage( return $this->newPage()
array( ->setTitle(pht('Documentation Books'))
$crumbs, ->setCrumbs($crumbs)
->appendChild(array(
$document, $document,
),
array(
'title' => pht('Documentation Books'),
)); ));
} }
} }