Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/editengine/PhabricatorEditEngine.php
Show First 20 Lines • Show All 307 Lines • ▼ Show 20 Lines | /* -( Display Text )------------------------------------------------------- */ | ||||
* @task text | * @task text | ||||
*/ | */ | ||||
protected function getCommentViewButtonText($object) { | protected function getCommentViewButtonText($object) { | ||||
return $this->getCommentViewSeriousButtonText($object); | return $this->getCommentViewSeriousButtonText($object); | ||||
} | } | ||||
/** | /** | ||||
* @task text | |||||
*/ | |||||
protected function getPageHeader($object) { | |||||
return null; | |||||
} | |||||
/** | |||||
* Return a human-readable header describing what this engine is used to do, | * Return a human-readable header describing what this engine is used to do, | ||||
* like "Configure Maniphest Task Forms". | * like "Configure Maniphest Task Forms". | ||||
* | * | ||||
* @return string Human-readable description of the engine. | * @return string Human-readable description of the engine. | ||||
* @task text | * @task text | ||||
*/ | */ | ||||
abstract public function getSummaryHeader(); | abstract public function getSummaryHeader(); | ||||
▲ Show 20 Lines • Show All 840 Lines • ▼ Show 20 Lines | if ($show_preview) { | ||||
$previews[] = $preview; | $previews[] = $preview; | ||||
} | } | ||||
} else { | } else { | ||||
$previews = array(); | $previews = array(); | ||||
} | } | ||||
$form = $this->buildEditForm($object, $fields); | $form = $this->buildEditForm($object, $fields); | ||||
$crumbs = $this->buildCrumbs($object, $final = true); | |||||
$crumbs->setBorder(true); | |||||
if ($request->isAjax()) { | if ($request->isAjax()) { | ||||
return $this->getController() | return $this->getController() | ||||
->newDialog() | ->newDialog() | ||||
->setWidth(AphrontDialogView::WIDTH_FULL) | ->setWidth(AphrontDialogView::WIDTH_FULL) | ||||
->setTitle($header_text) | ->setTitle($header_text) | ||||
->setValidationException($validation_exception) | ->setValidationException($validation_exception) | ||||
->appendForm($form) | ->appendForm($form) | ||||
->addCancelButton($cancel_uri) | ->addCancelButton($cancel_uri) | ||||
->addSubmitButton($submit_button); | ->addSubmitButton($submit_button); | ||||
} | } | ||||
$crumbs = $this->buildCrumbs($object, $final = true); | $box_header = id(new PHUIHeaderView()) | ||||
$header = id(new PHUIHeaderView()) | |||||
->setHeader($header_text); | ->setHeader($header_text); | ||||
$crumbs->setBorder(true); | |||||
if ($action_button) { | if ($action_button) { | ||||
$header->addActionLink($action_button); | $box_header->addActionLink($action_button); | ||||
} | } | ||||
$box = id(new PHUIObjectBoxView()) | $box = id(new PHUIObjectBoxView()) | ||||
->setUser($viewer) | ->setUser($viewer) | ||||
->setHeaderText($this->getObjectName()) | ->setHeader($box_header) | ||||
->setValidationException($validation_exception) | ->setValidationException($validation_exception) | ||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) | ->setBackground(PHUIObjectBoxView::WHITE_CONFIG) | ||||
->appendChild($form); | ->appendChild($form); | ||||
// This is fairly questionable, but in use by Settings. | // This is fairly questionable, but in use by Settings. | ||||
if ($request->getURIData('formSaved')) { | if ($request->getURIData('formSaved')) { | ||||
$box->setFormSaved(true); | $box->setFormSaved(true); | ||||
} | } | ||||
$content = array( | $content = array( | ||||
$box, | $box, | ||||
$previews, | $previews, | ||||
); | ); | ||||
$view = new PHUITwoColumnView(); | $view = new PHUITwoColumnView(); | ||||
if ($header) { | $page_header = $this->getPageHeader($object); | ||||
$view->setHeader($header); | if ($page_header) { | ||||
$view->setHeader($page_header); | |||||
} | } | ||||
$page = $controller->newPage() | $page = $controller->newPage() | ||||
->setTitle($header_text) | ->setTitle($header_text) | ||||
->setCrumbs($crumbs) | ->setCrumbs($crumbs) | ||||
->appendChild($view); | ->appendChild($view); | ||||
$navigation = $this->getNavigation(); | $navigation = $this->getNavigation(); | ||||
▲ Show 20 Lines • Show All 1,186 Lines • Show Last 20 Lines |