@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 Settings to use full side-navigation

Summary: Moves Settings to use a normal side navigation vs. a two column side navigation. It also updates Edit Engine to do the same, but I don't think there are other callsites. Added a consistent header for better clarification if you were editng your settings, global settings, or a bot's settings.

Test Plan: Test each page on a personal account, create global settings, test each page there, create a bot account, and test each page on the bot account. Anything else?

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

+47 -33
+1
src/applications/conduit/settings/PhabricatorConduitTokensSettingsPanel.php
··· 108 108 109 109 $panel = id(new PHUIObjectBoxView()) 110 110 ->setHeader($header) 111 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 111 112 ->setTable($table); 112 113 113 114 return $panel;
+1
src/applications/oauthserver/panel/PhabricatorOAuthServerAuthorizationsSettingsPanel.php
··· 134 134 135 135 $panel = id(new PHUIObjectBoxView()) 136 136 ->setHeader($header) 137 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 137 138 ->setTable($table); 138 139 139 140 return $panel;
+14 -2
src/applications/settings/controller/PhabricatorSettingsMainController.php
··· 112 112 113 113 $crumbs = $this->buildApplicationCrumbs(); 114 114 $crumbs->addTextCrumb($panel->getPanelName()); 115 + $crumbs->setBorder(true); 116 + 117 + if ($this->user) { 118 + $header_text = pht('Edit Settings (%s)', $user->getUserName()); 119 + } else { 120 + $header_text = pht('Edit Global Settings'); 121 + } 122 + 123 + $header = id(new PHUIHeaderView()) 124 + ->setHeader($header_text) 125 + ->setHeaderIcon('fa-pencil'); 115 126 116 127 $title = $panel->getPanelName(); 117 128 118 129 $view = id(new PHUITwoColumnView()) 119 - ->setNavigation($nav) 120 - ->setMainColumn($response); 130 + ->setHeader($header) 131 + ->setFooter($response); 121 132 122 133 return $this->newPage() 123 134 ->setTitle($title) 135 + ->setNavigation($nav) 124 136 ->setCrumbs($crumbs) 125 137 ->appendChild($view); 126 138
+6 -1
src/applications/settings/editor/PhabricatorSettingsEditEngine.php
··· 63 63 } 64 64 65 65 protected function getObjectEditTitleText($object) { 66 - return pht('Edit Settings'); 66 + $user = $object->getUser(); 67 + if ($user) { 68 + return pht('Edit Settings (%s)', $user->getUserName()); 69 + } else { 70 + return pht('Edit Global Settings'); 71 + } 67 72 } 68 73 69 74 protected function getObjectEditShortText($object) {
+1
src/applications/settings/panel/PhabricatorActivitySettingsPanel.php
··· 48 48 49 49 $panel = id(new PHUIObjectBoxView()) 50 50 ->setHeaderText(pht('Account Activity Logs')) 51 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 51 52 ->setTable($table); 52 53 53 54 $pager_box = id(new PHUIBoxView())
+1
src/applications/settings/panel/PhabricatorDesktopNotificationsSettingsPanel.php
··· 157 157 ->setHeader(pht('Desktop Notifications')) 158 158 ->addActionLink($test_button)) 159 159 ->setForm($form) 160 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 160 161 ->setInfoView($status_box) 161 162 ->setFormSaved($request->getBool('saved')); 162 163
-1
src/applications/settings/panel/PhabricatorEditEngineSettingsPanel.php
··· 22 22 $engine = id(new PhabricatorSettingsEditEngine()) 23 23 ->setController($this->getController()) 24 24 ->setNavigation($this->getNavigation()) 25 - ->setHideHeader(true) 26 25 ->setIsSelfEdit($is_self) 27 26 ->setProfileURI($profile_uri); 28 27
+1
src/applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php
··· 153 153 } 154 154 $view->setHeader($header); 155 155 $view->setTable($table); 156 + $view->setBackground(PHUIObjectBoxView::BLUE_PROPERTY); 156 157 157 158 return $view; 158 159 }
+1
src/applications/settings/panel/PhabricatorEmailPreferencesSettingsPanel.php
··· 136 136 ->setHeaderText(pht('Email Preferences')) 137 137 ->setFormSaved($request->getStr('saved')) 138 138 ->setFormErrors($errors) 139 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 139 140 ->setForm($form); 140 141 141 142 return $form_box;
+2
src/applications/settings/panel/PhabricatorExternalAccountsSettingsPanel.php
··· 131 131 132 132 $linked_box = id(new PHUIObjectBoxView()) 133 133 ->setHeader($linked_head) 134 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 134 135 ->setObjectList($linked); 135 136 136 137 $linkable_box = id(new PHUIObjectBoxView()) 137 138 ->setHeader($linkable_head) 139 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 138 140 ->setObjectList($linkable); 139 141 140 142 return array(
+1
src/applications/settings/panel/PhabricatorMultiFactorSettingsPanel.php
··· 126 126 127 127 $panel->setHeader($header); 128 128 $panel->setTable($table); 129 + $panel->setBackground(PHUIObjectBoxView::BLUE_PROPERTY); 129 130 130 131 return $panel; 131 132 }
+1
src/applications/settings/panel/PhabricatorPasswordSettingsPanel.php
··· 206 206 ->setHeaderText(pht('Change Password')) 207 207 ->setFormSaved($request->getStr('saved')) 208 208 ->setFormErrors($errors) 209 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 209 210 ->setForm($form); 210 211 211 212 return array(
+1
src/applications/settings/panel/PhabricatorSSHKeysSettingsPanel.php
··· 50 50 51 51 $panel->setHeader($header); 52 52 $panel->setTable($table); 53 + $panel->setBackground(PHUIObjectBoxView::BLUE_PROPERTY); 53 54 54 55 return $panel; 55 56 }
+2 -1
src/applications/settings/panel/PhabricatorSessionsSettingsPanel.php
··· 136 136 137 137 $panel = id(new PHUIObjectBoxView()) 138 138 ->setHeader($header) 139 - ->setTable($table); 139 + ->setTable($table) 140 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY); 140 141 141 142 return $panel; 142 143 }
+1
src/applications/settings/panel/PhabricatorTokensSettingsPanel.php
··· 84 84 85 85 $panel = id(new PHUIObjectBoxView()) 86 86 ->setHeader($header) 87 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 87 88 ->setTable($table); 88 89 89 90 return $panel;
+13 -28
src/applications/transactions/editengine/PhabricatorEditEngine.php
··· 29 29 private $page; 30 30 private $pages; 31 31 private $navigation; 32 - private $hideHeader; 33 32 34 33 final public function setViewer(PhabricatorUser $viewer) { 35 34 $this->viewer = $viewer; ··· 125 124 126 125 public function getNavigation() { 127 126 return $this->navigation; 128 - } 129 - 130 - public function setHideHeader($hide_header) { 131 - $this->hideHeader = $hide_header; 132 - return $this; 133 - } 134 - 135 - public function getHideHeader() { 136 - return $this->hideHeader; 137 127 } 138 128 139 129 ··· 1194 1184 1195 1185 $crumbs = $this->buildCrumbs($object, $final = true); 1196 1186 1197 - if ($this->getHideHeader()) { 1198 - $header = null; 1199 - $crumbs->setBorder(false); 1200 - } else { 1201 - $header = id(new PHUIHeaderView()) 1202 - ->setHeader($header_text) 1203 - ->setHeaderIcon($header_icon); 1204 - $crumbs->setBorder(true); 1205 - } 1187 + $header = id(new PHUIHeaderView()) 1188 + ->setHeader($header_text) 1189 + ->setHeaderIcon($header_icon); 1190 + $crumbs->setBorder(true); 1206 1191 1207 1192 if ($action_button) { 1208 1193 $header->addActionLink($action_button); ··· 1231 1216 $view->setHeader($header); 1232 1217 } 1233 1218 1234 - $navigation = $this->getNavigation(); 1235 - if ($navigation) { 1236 - $view 1237 - ->setNavigation($navigation) 1238 - ->setMainColumn($content); 1239 - } else { 1240 - $view->setFooter($content); 1241 - } 1219 + $view->setFooter($content); 1242 1220 1243 - return $controller->newPage() 1221 + $page = $controller->newPage() 1244 1222 ->setTitle($header_text) 1245 1223 ->setCrumbs($crumbs) 1246 1224 ->appendChild($view); 1225 + 1226 + $navigation = $this->getNavigation(); 1227 + if ($navigation) { 1228 + $page->setNavigation($navigation); 1229 + } 1230 + 1231 + return $page; 1247 1232 } 1248 1233 1249 1234 protected function newEditResponse(