1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-31 17:08:22 +01:00

Update Config to new UI

Summary: Converts Config to new UI, updates to `newPage`

Test Plan: Review all pages in Config, setup issues, ignore an issue, edit a config option

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15587
This commit is contained in:
Chad Little 2016-04-03 00:27:39 +00:00 committed by chad
parent 72d12be850
commit 839e7e2fc6
13 changed files with 65 additions and 81 deletions

View file

@ -64,12 +64,10 @@ final class PhabricatorConfigAllController
$nav->setCrumbs($crumbs); $nav->setCrumbs($crumbs);
$nav->appendChild($panel); $nav->appendChild($panel);
return $this->newPage()
->setTitle($title)
->appendChild($nav);
return $this->buildApplicationPage(
$nav,
array(
'title' => $title,
));
} }
} }

View file

@ -25,11 +25,9 @@ final class PhabricatorConfigCacheController
$data_box, $data_box,
)); ));
return $this->buildApplicationPage( return $this->newPage()
$nav, ->setTitle($title)
array( ->appendChild($nav);
'title' => $title,
));
} }
private function renderCodeBox() { private function renderCodeBox() {

View file

@ -159,11 +159,9 @@ final class PhabricatorConfigDatabaseIssueController
$table_box, $table_box,
)); ));
return $this->buildApplicationPage( return $this->newPage()
$nav, ->setTitle($title)
array( ->appendChild($nav);
'title' => $title,
));
} }
} }

View file

@ -94,11 +94,9 @@ final class PhabricatorConfigDatabaseStatusController
$nav->setCrumbs($crumbs); $nav->setCrumbs($crumbs);
$nav->appendChild($body); $nav->appendChild($body);
return $this->buildApplicationPage( return $this->newPage()
$nav, ->setTitle($title)
array( ->appendChild($nav);
'title' => $title,
));
} }

View file

@ -227,11 +227,13 @@ final class PhabricatorConfigEditController
->setValue($examples)); ->setValue($examples));
} }
$title = pht('Edit %s', $key); $title = pht('Edit Option: %s', $key);
$header_icon = 'fa-pencil';
$short = pht('Edit'); $short = pht('Edit');
$form_box = id(new PHUIObjectBoxView()) $form_box = id(new PHUIObjectBoxView())
->setHeaderText($title) ->setHeaderText(pht('Config Option'))
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->setForm($form); ->setForm($form);
if ($error_view) { if ($error_view) {
@ -246,21 +248,25 @@ final class PhabricatorConfigEditController
} }
$crumbs->addTextCrumb($key, '/config/edit/'.$key); $crumbs->addTextCrumb($key, '/config/edit/'.$key);
$crumbs->setBorder(true);
$timeline = $this->buildTransactionTimeline( $timeline = $this->buildTransactionTimeline(
$config_entry, $config_entry,
new PhabricatorConfigTransactionQuery()); new PhabricatorConfigTransactionQuery());
$timeline->setShouldTerminate(true); $timeline->setShouldTerminate(true);
return $this->buildApplicationPage( $header = id(new PHUIHeaderView())
array( ->setHeader($title)
$crumbs, ->setHeaderIcon($header_icon);
$form_box,
$timeline, $view = id(new PHUITwoColumnView())
), ->setHeader($header)
array( ->setFooter($form_box);
'title' => $title,
)); return $this->newPage()
->setTitle($title)
->setCrumbs($crumbs)
->appendChild($view);
} }
private function readRequest( private function readRequest(

View file

@ -17,22 +17,26 @@ final class PhabricatorConfigGroupController
$list = $this->buildOptionList($options->getOptions()); $list = $this->buildOptionList($options->getOptions());
$box = id(new PHUIObjectBoxView()) $box = id(new PHUIObjectBoxView())
->setHeaderText($title)
->setObjectList($list); ->setObjectList($list);
$crumbs = $this $crumbs = $this
->buildApplicationCrumbs() ->buildApplicationCrumbs()
->addTextCrumb(pht('Config'), $this->getApplicationURI()) ->addTextCrumb(pht('Config'), $this->getApplicationURI())
->addTextCrumb($options->getName(), $this->getApplicationURI()); ->addTextCrumb($options->getName(), $this->getApplicationURI())
->setBorder(true);
return $this->buildApplicationPage( $header = id(new PHUIHeaderView())
array( ->setHeader($title)
$crumbs, ->setHeaderIcon('fa-sliders');
$box,
), $view = id(new PHUITwoColumnView())
array( ->setHeader($header)
'title' => $title, ->setFooter($box);
));
return $this->newPage()
->setTitle($title)
->setCrumbs($crumbs)
->appendChild($view);
} }
private function buildOptionList(array $options) { private function buildOptionList(array $options) {

View file

@ -40,13 +40,9 @@ final class PhabricatorConfigHistoryController
$nav->setCrumbs($crumbs); $nav->setCrumbs($crumbs);
$nav->appendChild($timeline); $nav->appendChild($timeline);
return $this->buildApplicationPage( return $this->newPage()
array( ->setTitle($title)
$nav, ->appendChild($nav);
),
array(
'title' => $title,
));
} }
} }

View file

@ -32,14 +32,12 @@ final class PhabricatorConfigIgnoreController
throw new Exception(pht('Unrecognized verb: %s', $verb)); throw new Exception(pht('Unrecognized verb: %s', $verb));
} }
$dialog = id(new AphrontDialogView()) return $this->newDialog()
->setUser($request->getUser())
->setTitle($title) ->setTitle($title)
->appendChild($body) ->appendChild($body)
->addSubmitButton($submit_title) ->addSubmitButton($submit_title)
->addCancelButton($issue_uri); ->addCancelButton($issue_uri);
return id(new AphrontDialogResponse())->setDialog($dialog);
} }
public function manageApplication($issue) { public function manageApplication($issue) {

View file

@ -66,11 +66,9 @@ final class PhabricatorConfigIssueListController
$nav->setCrumbs($crumbs); $nav->setCrumbs($crumbs);
return $this->buildApplicationPage( return $this->newPage()
$nav, ->setTitle($title)
array( ->appendChild($nav);
'title' => $title,
));
} }
private function buildIssueList(array $issues, $group) { private function buildIssueList(array $issues, $group) {

View file

@ -36,14 +36,10 @@ final class PhabricatorConfigIssueViewController
->addTextCrumb(pht('Setup Issues'), $this->getApplicationURI('issue/')) ->addTextCrumb(pht('Setup Issues'), $this->getApplicationURI('issue/'))
->addTextCrumb($title, $request->getRequestURI()); ->addTextCrumb($title, $request->getRequestURI());
return $this->buildApplicationPage( return $this->newPage()
array( ->setTitle($title)
$crumbs, ->setCrumbs($crumbs)
$content, ->appendChild($content);
),
array(
'title' => $title,
));
} }
private function renderIssue(PhabricatorSetupIssue $issue) { private function renderIssue(PhabricatorSetupIssue $issue) {

View file

@ -35,11 +35,9 @@ final class PhabricatorConfigListController
$nav->setCrumbs($crumbs); $nav->setCrumbs($crumbs);
return $this->buildApplicationPage( return $this->newPage()
$nav, ->setTitle($title)
array( ->appendChild($nav);
'title' => $title,
));
} }
private function buildConfigOptionsList(array $groups, $type) { private function buildConfigOptionsList(array $groups, $type) {

View file

@ -14,10 +14,10 @@ final class PhabricatorConfigModuleController
$module = $all_modules[$key]; $module = $all_modules[$key];
$content = $module->renderModuleStatus($request); $content = $module->renderModuleStatus($request);
$name = $module->getModuleName(); $title = $module->getModuleName();
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb($name); $crumbs->addTextCrumb($title);
$nav = $this->buildSideNavView(); $nav = $this->buildSideNavView();
$nav->selectFilter('module/'.$key.'/'); $nav->selectFilter('module/'.$key.'/');
@ -27,11 +27,9 @@ final class PhabricatorConfigModuleController
$content, $content,
)); ));
return $this->buildApplicationPage( return $this->newPage()
$nav, ->setTitle($title)
array( ->appendChild($nav);
'title' => $name,
));
} }
} }

View file

@ -18,11 +18,9 @@ final class PhabricatorConfigWelcomeController
$nav->setCrumbs($crumbs); $nav->setCrumbs($crumbs);
$nav->appendChild($this->buildWelcomeScreen($request)); $nav->appendChild($this->buildWelcomeScreen($request));
return $this->buildApplicationPage( return $this->newPage()
$nav, ->setTitle($title)
array( ->appendChild($nav);
'title' => $title,
));
} }
public function buildWelcomeScreen(AphrontRequest $request) { public function buildWelcomeScreen(AphrontRequest $request) {