Differential D17879 Diff 43006 src/applications/project/controller/PhabricatorProjectBoardBackgroundController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/controller/PhabricatorProjectBoardBackgroundController.php
| Show All 22 Lines | public function handleRequest(AphrontRequest $request) { | ||||
| if (!$board->getHasWorkboard()) { | if (!$board->getHasWorkboard()) { | ||||
| return new Aphront404Response(); | return new Aphront404Response(); | ||||
| } | } | ||||
| $this->setProject($board); | $this->setProject($board); | ||||
| $id = $board->getID(); | $id = $board->getID(); | ||||
| $view_uri = $this->getApplicationURI("board/{$id}/"); | |||||
| $manage_uri = $this->getApplicationURI("board/{$id}/manage/"); | $manage_uri = $this->getApplicationURI("board/{$id}/manage/"); | ||||
| if ($request->isFormPost()) { | if ($request->isFormPost()) { | ||||
| $background_key = $request->getStr('backgroundKey'); | $background_key = $request->getStr('backgroundKey'); | ||||
| $xactions = array(); | $xactions = array(); | ||||
| $xactions[] = id(new PhabricatorProjectTransaction()) | $xactions[] = id(new PhabricatorProjectTransaction()) | ||||
| ->setTransactionType(PhabricatorProjectTransaction::TYPE_BACKGROUND) | ->setTransactionType(PhabricatorProjectTransaction::TYPE_BACKGROUND) | ||||
| ->setNewValue($background_key); | ->setNewValue($background_key); | ||||
| id(new PhabricatorProjectTransactionEditor()) | id(new PhabricatorProjectTransactionEditor()) | ||||
| ->setActor($viewer) | ->setActor($viewer) | ||||
| ->setContentSourceFromRequest($request) | ->setContentSourceFromRequest($request) | ||||
| ->setContinueOnNoEffect(true) | ->setContinueOnNoEffect(true) | ||||
| ->setContinueOnMissingFields(true) | ->setContinueOnMissingFields(true) | ||||
| ->applyTransactions($board, $xactions); | ->applyTransactions($board, $xactions); | ||||
| return id(new AphrontRedirectResponse()) | return id(new AphrontRedirectResponse()) | ||||
| ->setURI($manage_uri); | ->setURI($view_uri); | ||||
| } | } | ||||
| $nav = $this->getProfileMenu(); | $nav = $this->getProfileMenu(); | ||||
| $crumbs = id($this->buildApplicationCrumbs()) | $crumbs = id($this->buildApplicationCrumbs()) | ||||
| ->addTextCrumb(pht('Workboard'), "/project/board/{$board_id}/") | ->addTextCrumb(pht('Workboard'), "/project/board/{$board_id}/") | ||||
| ->addTextCrumb(pht('Manage'), $manage_uri) | ->addTextCrumb(pht('Manage'), $manage_uri) | ||||
| ->addTextCrumb(pht('Background Color')); | ->addTextCrumb(pht('Background Color')); | ||||
| ▲ Show 20 Lines • Show All 110 Lines • Show Last 20 Lines | |||||