Differential D15487 Diff 37335 src/applications/diffusion/controller/DiffusionRepositoryEditActionsController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/controller/DiffusionRepositoryEditActionsController.php
| Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | public function handleRequest(AphrontRequest $request) { | ||||
| $content = array(); | $content = array(); | ||||
| $crumbs = $this->buildApplicationCrumbs(); | $crumbs = $this->buildApplicationCrumbs(); | ||||
| $crumbs->addTextCrumb(pht('Edit Actions')); | $crumbs->addTextCrumb(pht('Edit Actions')); | ||||
| $title = pht('Edit Actions (%s)', $repository->getName()); | $title = pht('Edit Actions (%s)', $repository->getName()); | ||||
| $header = id(new PHUIHeaderView()) | |||||
| ->setHeader($title) | |||||
| ->setHeaderIcon('fa-pencil'); | |||||
| $policies = id(new PhabricatorPolicyQuery()) | $policies = id(new PhabricatorPolicyQuery()) | ||||
| ->setViewer($viewer) | ->setViewer($viewer) | ||||
| ->setObject($repository) | ->setObject($repository) | ||||
| ->execute(); | ->execute(); | ||||
| $form = id(new AphrontFormView()) | $form = id(new AphrontFormView()) | ||||
| ->setUser($viewer) | ->setUser($viewer) | ||||
| ->appendRemarkupInstructions( | ->appendRemarkupInstructions( | ||||
| Show All 28 Lines | $form = id(new AphrontFormView()) | ||||
| 0 => pht('Disable Autoclose'), | 0 => pht('Disable Autoclose'), | ||||
| ))) | ))) | ||||
| ->appendChild( | ->appendChild( | ||||
| id(new AphrontFormSubmitControl()) | id(new AphrontFormSubmitControl()) | ||||
| ->setValue(pht('Save Actions')) | ->setValue(pht('Save Actions')) | ||||
| ->addCancelButton($edit_uri)); | ->addCancelButton($edit_uri)); | ||||
| $form_box = id(new PHUIObjectBoxView()) | $form_box = id(new PHUIObjectBoxView()) | ||||
| ->setHeaderText($title) | ->setHeaderText(pht('Actions')) | ||||
| ->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($form_box); | ->appendChild($view); | ||||
| } | } | ||||
| } | } | ||||