Differential D15487 Diff 37335 src/applications/diffusion/controller/DiffusionRepositoryEditStagingController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/controller/DiffusionRepositoryEditStagingController.php
| Show All 39 Lines | if ($request->isFormPost()) { | ||||
| ->applyTransactions($repository, $xactions); | ->applyTransactions($repository, $xactions); | ||||
| return id(new AphrontRedirectResponse())->setURI($edit_uri); | return id(new AphrontRedirectResponse())->setURI($edit_uri); | ||||
| } | } | ||||
| $crumbs = $this->buildApplicationCrumbs(); | $crumbs = $this->buildApplicationCrumbs(); | ||||
| $crumbs->addTextCrumb(pht('Edit Staging')); | $crumbs->addTextCrumb(pht('Edit Staging')); | ||||
| $title = pht('Edit %s', $repository->getName()); | $title = pht('Edit Staging (%s)', $repository->getName()); | ||||
| $header = id(new PHUIHeaderView()) | |||||
| ->setHeader($title) | |||||
| ->setHeaderIcon('fa-pencil'); | |||||
| $form = id(new AphrontFormView()) | $form = id(new AphrontFormView()) | ||||
| ->setUser($viewer) | ->setUser($viewer) | ||||
| ->appendRemarkupInstructions( | ->appendRemarkupInstructions( | ||||
| pht( | pht( | ||||
| "To make it easier to run integration tests and builds on code ". | "To make it easier to run integration tests and builds on code ". | ||||
| "under review, you can configure a **Staging Area**. When `arc` ". | "under review, you can configure a **Staging Area**. When `arc` ". | ||||
| "creates a diff, it will push a copy of the changes to the ". | "creates a diff, it will push a copy of the changes to the ". | ||||
| "configured staging area with a corresponding tag.". | "configured staging area with a corresponding tag.". | ||||
| "\n\n". | "\n\n". | ||||
| "IMPORTANT: This feature is new, experimental, and not supported. ". | "IMPORTANT: This feature is new, experimental, and not supported. ". | ||||
| "Use it at your own risk.")) | "Use it at your own risk.")) | ||||
| ->appendChild( | ->appendChild( | ||||
| id(new AphrontFormTextControl()) | id(new AphrontFormTextControl()) | ||||
| ->setLabel(pht('Staging Area URI')) | ->setLabel(pht('Staging Area URI')) | ||||
| ->setName('area') | ->setName('area') | ||||
| ->setValue($v_area)) | ->setValue($v_area)) | ||||
| ->appendChild( | ->appendChild( | ||||
| id(new AphrontFormSubmitControl()) | id(new AphrontFormSubmitControl()) | ||||
| ->setValue(pht('Save')) | ->setValue(pht('Save')) | ||||
| ->addCancelButton($edit_uri)); | ->addCancelButton($edit_uri)); | ||||
| $object_box = id(new PHUIObjectBoxView()) | $form_box = id(new PHUIObjectBoxView()) | ||||
| ->setHeaderText($title) | ->setHeaderText(pht('Staging')) | ||||
| ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) | |||||
| ->setForm($form); | ->setForm($form); | ||||
| $view = id(new PHUITwoColumnView()) | |||||
| ->setHeader($header) | |||||
| ->setFooter(array( | |||||
| $form_box, | |||||
| )); | |||||
| return $this->newPage() | return $this->newPage() | ||||
| ->setTitle($title) | ->setTitle($title) | ||||
| ->setCrumbs($crumbs) | ->setCrumbs($crumbs) | ||||
| ->appendChild($object_box); | ->appendChild($view); | ||||
| } | } | ||||
| } | } | ||||