mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-24 06:20:56 +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:
parent
13176e4185
commit
2992b5277a
5 changed files with 36 additions and 32 deletions
|
@ -240,14 +240,12 @@ final class DivinerAtomController extends DivinerController {
|
|||
|
||||
$prop_list = phutil_tag_div('phui-document-view-pro-box', $prop_list);
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
array(
|
||||
$crumbs,
|
||||
return $this->newPage()
|
||||
->setTitle($symbol->getTitle())
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild(array(
|
||||
$document,
|
||||
$prop_list,
|
||||
),
|
||||
array(
|
||||
'title' => $symbol->getTitle(),
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -92,13 +92,11 @@ final class DivinerBookController extends DivinerController {
|
|||
$document->appendChild($preface_view);
|
||||
$document->appendChild($out);
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
array(
|
||||
$crumbs,
|
||||
return $this->newPage()
|
||||
->setTitle($book->getTitle())
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild(array(
|
||||
$document,
|
||||
),
|
||||
array(
|
||||
'title' => $book->getTitle(),
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -57,8 +57,10 @@ final class DivinerBookEditController extends DivinerController {
|
|||
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$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())
|
||||
->setViewer($viewer)
|
||||
|
@ -104,8 +106,9 @@ final class DivinerBookEditController extends DivinerController {
|
|||
->setValue(pht('Save'))
|
||||
->addCancelButton($view_uri));
|
||||
|
||||
$object_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText($title)
|
||||
$box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Book'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setForm($form);
|
||||
|
||||
$timeline = $this->buildTransactionTimeline(
|
||||
|
@ -113,15 +116,21 @@ final class DivinerBookEditController extends DivinerController {
|
|||
new DivinerLiveBookTransactionQuery());
|
||||
$timeline->setShouldTerminate(true);
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
array(
|
||||
$crumbs,
|
||||
$object_box,
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setHeaderIcon($header_icon);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setFooter(array(
|
||||
$box,
|
||||
$timeline,
|
||||
),
|
||||
array(
|
||||
'title' => $title,
|
||||
));
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild($view);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -84,11 +84,12 @@ final class DivinerFindController extends DivinerController {
|
|||
|
||||
$list = $this->renderAtomList($atoms);
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
$list,
|
||||
array(
|
||||
'title' => array(pht('Find'), pht('"%s"', $query_text)),
|
||||
return $this->newPage()
|
||||
->setTitle(array(pht('Find'), pht('"%s"', $query_text)))
|
||||
->appendChild(array(
|
||||
$list,
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -65,13 +65,11 @@ final class DivinerMainController extends DivinerController {
|
|||
$document->appendChild($text);
|
||||
}
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
array(
|
||||
$crumbs,
|
||||
return $this->newPage()
|
||||
->setTitle(pht('Documentation Books'))
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild(array(
|
||||
$document,
|
||||
),
|
||||
array(
|
||||
'title' => pht('Documentation Books'),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue