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->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,
));
return $this->buildApplicationPage(
$nav,
array(
'title' => $title,
));
return $this->newPage()
->setTitle($title)
->appendChild($nav);
}
private function renderCodeBox() {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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