@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update Releeph to new UI

Summary: Runs through Releeph to move to new UI and `newPage`

Test Plan: Ran through product, release, branch, everything seems to work.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15623

+120 -84
-13
src/applications/releeph/controller/ReleephController.php
··· 2 2 3 3 abstract class ReleephController extends PhabricatorController { 4 4 5 - public function buildStandardPageResponse($view, array $data) { 6 - $page = $this->buildStandardPageView(); 7 - 8 - $page->setApplicationName(pht('Releeph')); 9 - $page->setBaseURI('/releeph/'); 10 - $page->setTitle(idx($data, 'title')); 11 - $page->setGlyph("\xD3\x82"); 12 - $page->appendChild($view); 13 - 14 - $response = new AphrontWebpageResponse(); 15 - return $response->setContent($page->render()); 16 - } 17 - 18 5 public function buildSideNavView($for_app = false) { 19 6 $user = $this->getRequest()->getUser(); 20 7
+19 -10
src/applications/releeph/controller/branch/ReleephBranchCreateController.php
··· 105 105 ->addCancelButton($product_uri)); 106 106 107 107 $box = id(new PHUIObjectBoxView()) 108 - ->setHeaderText(pht('New Branch')) 108 + ->setHeaderText(pht('Branch')) 109 109 ->setFormErrors($errors) 110 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 110 111 ->appendChild($form); 111 112 113 + $title = pht('New Branch'); 114 + 112 115 $crumbs = $this->buildApplicationCrumbs(); 113 - $crumbs->addTextCrumb(pht('New Branch')); 116 + $crumbs->addTextCrumb($title); 117 + $crumbs->setBorder(true); 118 + 119 + $header = id(new PHUIHeaderView()) 120 + ->setHeader($title) 121 + ->setHeaderIcon('fa-plus-square'); 122 + 123 + $view = id(new PHUITwoColumnView()) 124 + ->setHeader($header) 125 + ->setFooter($box); 114 126 115 - return $this->buildApplicationPage( 116 - array( 117 - $crumbs, 118 - $box, 119 - ), 120 - array( 121 - 'title' => pht('New Branch'), 122 - )); 127 + return $this->newPage() 128 + ->setTitle($title) 129 + ->setCrumbs($crumbs) 130 + ->appendChild($view); 131 + 123 132 } 124 133 }
+18 -12
src/applications/releeph/controller/branch/ReleephBranchEditController.php
··· 86 86 ->setValue(pht('Save Branch'))); 87 87 88 88 $title = pht( 89 - 'Edit Branch %s', 89 + 'Edit Branch: %s', 90 90 $branch->getDisplayNameWithDetail()); 91 91 92 + $box = id(new PHUIObjectBoxView()) 93 + ->setHeaderText(pht('Branch')) 94 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 95 + ->appendChild($form); 96 + 92 97 $crumbs = $this->buildApplicationCrumbs(); 93 98 $crumbs->addTextCrumb(pht('Edit')); 99 + $crumbs->setBorder(true); 94 100 95 - $box = id(new PHUIObjectBoxView()) 96 - ->setHeaderText($title) 97 - ->appendChild($form); 101 + $header = id(new PHUIHeaderView()) 102 + ->setHeader(pht('Edit Branch')) 103 + ->setHeaderIcon('fa-pencil'); 98 104 99 - return $this->buildApplicationPage( 100 - array( 101 - $crumbs, 102 - $box, 103 - ), 104 - array( 105 - 'title' => $title, 106 - )); 105 + $view = id(new PHUITwoColumnView()) 106 + ->setHeader($header) 107 + ->setFooter($box); 108 + 109 + return $this->newPage() 110 + ->setTitle($title) 111 + ->setCrumbs($crumbs) 112 + ->appendChild($view); 107 113 } 108 114 }
+8 -8
src/applications/releeph/controller/branch/ReleephBranchHistoryController.php
··· 27 27 28 28 $crumbs = $this->buildApplicationCrumbs(); 29 29 $crumbs->addTextCrumb(pht('History')); 30 + $crumbs->setBorder(true); 30 31 31 - return $this->buildApplicationPage( 32 - array( 33 - $crumbs, 34 - $timeline, 35 - ), 36 - array( 37 - 'title' => pht('Branch History'), 38 - )); 32 + $title = pht('Branch History'); 33 + 34 + return $this->newPage() 35 + ->setTitle($title) 36 + ->setCrumbs($crumbs) 37 + ->appendChild($timeline); 38 + 39 39 } 40 40 41 41 }
+18 -10
src/applications/releeph/controller/product/ReleephProductCreateController.php
··· 91 91 ->addCancelButton('/releeph/project/') 92 92 ->setValue(pht('Create Release Product'))); 93 93 94 - $form_box = id(new PHUIObjectBoxView()) 95 - ->setHeaderText(pht('Create New Product')) 94 + $box = id(new PHUIObjectBoxView()) 95 + ->setHeaderText(pht('Product')) 96 96 ->setFormErrors($errors) 97 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 97 98 ->setForm($form); 99 + 100 + $title = pht('Create New Product'); 98 101 99 102 $crumbs = $this->buildApplicationCrumbs(); 100 103 $crumbs->addTextCrumb(pht('New Product')); 104 + $crumbs->setBorder(true); 101 105 102 - return $this->buildApplicationPage( 103 - array( 104 - $crumbs, 105 - $form_box, 106 - ), 107 - array( 108 - 'title' => pht('Create New Product'), 109 - )); 106 + $header = id(new PHUIHeaderView()) 107 + ->setHeader($title) 108 + ->setHeaderIcon('fa-plus-square'); 109 + 110 + $view = id(new PHUITwoColumnView()) 111 + ->setHeader($header) 112 + ->setFooter($box); 113 + 114 + return $this->newPage() 115 + ->setTitle($title) 116 + ->setCrumbs($crumbs) 117 + ->appendChild($view); 110 118 } 111 119 112 120 private function getRepositorySelectOptions() {
+18 -10
src/applications/releeph/controller/product/ReleephProductEditController.php
··· 195 195 ->setValue(pht('Save'))); 196 196 197 197 $box = id(new PHUIObjectBoxView()) 198 - ->setHeaderText(pht('Edit Releeph Product')) 198 + ->setHeaderText(pht('Product')) 199 199 ->setFormErrors($errors) 200 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 200 201 ->appendChild($form); 201 202 203 + $title = pht('Edit Product'); 204 + 202 205 $crumbs = $this->buildApplicationCrumbs(); 203 206 $crumbs->addTextCrumb(pht('Edit Product')); 207 + $crumbs->setBorder(true); 204 208 205 - return $this->buildStandardPageResponse( 206 - array( 207 - $crumbs, 208 - $box, 209 - ), 210 - array( 211 - 'title' => pht('Edit Releeph Product'), 212 - 'device' => true, 213 - )); 209 + $header = id(new PHUIHeaderView()) 210 + ->setHeader($title) 211 + ->setHeaderIcon('fa-pencil'); 212 + 213 + $view = id(new PHUITwoColumnView()) 214 + ->setHeader($header) 215 + ->setFooter($box); 216 + 217 + return $this->newPage() 218 + ->setTitle($title) 219 + ->setCrumbs($crumbs) 220 + ->appendChild($view); 221 + 214 222 } 215 223 216 224 private function getBranchHelpText() {
+6 -8
src/applications/releeph/controller/product/ReleephProductHistoryController.php
··· 28 28 $crumbs->addTextCrumb(pht('History')); 29 29 $crumbs->setBorder(true); 30 30 31 - return $this->buildApplicationPage( 32 - array( 33 - $crumbs, 34 - $timeline, 35 - ), 36 - array( 37 - 'title' => pht('Product History'), 38 - )); 31 + $title = pht('Product History'); 32 + 33 + return $this->newPage() 34 + ->setTitle($title) 35 + ->setCrumbs($crumbs) 36 + ->appendChild($timeline); 39 37 } 40 38 41 39 }
+19 -7
src/applications/releeph/controller/request/ReleephRequestEditController.php
··· 275 275 if ($is_edit) { 276 276 $title = pht('Edit Pull Request'); 277 277 $submit_name = pht('Save'); 278 + $header_icon = 'fa-pencil'; 278 279 279 280 $crumbs->addTextCrumb($pull->getMonogram(), '/'.$pull->getMonogram()); 280 281 $crumbs->addTextCrumb(pht('Edit')); 281 282 } else { 282 283 $title = pht('Create Pull Request'); 283 284 $submit_name = pht('Create Pull Request'); 285 + $header_icon = 'fa-plus-square'; 284 286 285 287 $crumbs->addTextCrumb(pht('New Pull Request')); 286 288 } ··· 291 293 ->setValue($submit_name)); 292 294 293 295 $box = id(new PHUIObjectBoxView()) 294 - ->setHeaderText($title) 296 + ->setHeaderText(pht('Request')) 295 297 ->setFormErrors($errors) 298 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 296 299 ->appendChild($form); 297 300 298 - return $this->buildApplicationPage( 299 - array( 300 - $crumbs, 301 + $crumbs->setBorder(true); 302 + 303 + $header = id(new PHUIHeaderView()) 304 + ->setHeader($title) 305 + ->setHeaderIcon($header_icon); 306 + 307 + $view = id(new PHUITwoColumnView()) 308 + ->setHeader($header) 309 + ->setFooter(array( 301 310 $notice_view, 302 311 $box, 303 - ), 304 - array( 305 - 'title' => $title, 306 312 )); 313 + 314 + return $this->newPage() 315 + ->setTitle($title) 316 + ->setCrumbs($crumbs) 317 + ->appendChild($view); 318 + 307 319 } 308 320 }
+14 -6
src/applications/releeph/controller/request/ReleephRequestViewController.php
··· 76 76 77 77 $crumbs = $this->buildApplicationCrumbs(); 78 78 $crumbs->addTextCrumb($pull->getMonogram(), '/'.$pull->getMonogram()); 79 + $crumbs->setBorder(true); 79 80 80 - return $this->buildStandardPageResponse( 81 - array( 82 - $crumbs, 81 + $header = id(new PHUIHeaderView()) 82 + ->setHeader($title) 83 + ->setHeaderIcon('fa-flag-checkered'); 84 + 85 + $view = id(new PHUITwoColumnView()) 86 + ->setHeader($header) 87 + ->setFooter(array( 83 88 $pull_box, 84 89 $timeline, 85 90 $add_comment_form, 86 - ), 87 - array( 88 - 'title' => $title, 89 91 )); 92 + 93 + return $this->newPage() 94 + ->setTitle($title) 95 + ->setCrumbs($crumbs) 96 + ->appendChild($view); 97 + 90 98 } 91 99 92 100