Changeset View
Changeset View
Standalone View
Standalone View
src/applications/herald/controller/HeraldRuleController.php
Show First 20 Lines • Show All 235 Lines • ▼ Show 20 Lines | public function handleRequest(AphrontRequest $request) { | ||||
$title = $rule->getID() | $title = $rule->getID() | ||||
? pht('Edit Herald Rule: %s', $rule->getName()) | ? pht('Edit Herald Rule: %s', $rule->getName()) | ||||
: pht('Create Herald Rule: %s', idx($content_type_map, $content_type)); | : pht('Create Herald Rule: %s', idx($content_type_map, $content_type)); | ||||
$icon = $rule->getID() ? 'fa-pencil' : 'fa-plus-square'; | $icon = $rule->getID() ? 'fa-pencil' : 'fa-plus-square'; | ||||
$form_box = id(new PHUIObjectBoxView()) | $form_box = id(new PHUIObjectBoxView()) | ||||
->setHeaderText($title) | |||||
->setBackground(PHUIObjectBoxView::WHITE_CONFIG) | |||||
->setFormErrors($errors) | ->setFormErrors($errors) | ||||
->setForm($form); | ->setForm($form); | ||||
$crumbs = $this | $crumbs = $this | ||||
->buildApplicationCrumbs() | ->buildApplicationCrumbs() | ||||
->addTextCrumb($title) | ->addTextCrumb($title) | ||||
->setBorder(true); | ->setBorder(true); | ||||
$header = id(new PHUIHeaderView()) | |||||
->setHeader($title) | |||||
->setHeaderIcon('fa-plus-square'); | |||||
$view = id(new PHUITwoColumnView()) | $view = id(new PHUITwoColumnView()) | ||||
->setHeader($header) | |||||
->setFooter($form_box); | ->setFooter($form_box); | ||||
return $this->newPage() | return $this->newPage() | ||||
->setTitle($title) | ->setTitle($title) | ||||
->setCrumbs($crumbs) | ->setCrumbs($crumbs) | ||||
->appendChild( | ->appendChild( | ||||
array( | array( | ||||
$view, | $view, | ||||
▲ Show 20 Lines • Show All 466 Lines • Show Last 20 Lines |