@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.

Modernize People UI

Summary: Updates various /people/ pages for new UI and newPage

Test Plan: Review creating people, new people, sending invites, editing a profile, setting a new picture, something with LDAP

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

+90 -52
+1 -4
src/applications/people/controller/PhabricatorPeopleApproveController.php
··· 53 53 return id(new AphrontRedirectResponse())->setURI($done_uri); 54 54 } 55 55 56 - $dialog = id(new AphrontDialogView()) 57 - ->setUser($admin) 56 + return $this->newDialog() 58 57 ->setTitle(pht('Confirm Approval')) 59 58 ->appendChild( 60 59 pht( ··· 62 61 phutil_tag('strong', array(), $user->getUsername()))) 63 62 ->addCancelButton($done_uri) 64 63 ->addSubmitButton(pht('Approve Account')); 65 - 66 - return id(new AphrontDialogResponse())->setDialog($dialog); 67 64 } 68 65 }
+15 -9
src/applications/people/controller/PhabricatorPeopleCreateController.php
··· 90 90 91 91 $crumbs = $this->buildApplicationCrumbs(); 92 92 $crumbs->addTextCrumb($title); 93 + $crumbs->setBorder(true); 94 + 95 + $header = id(new PHUIHeaderView()) 96 + ->setHeader($title) 97 + ->setHeaderIcon('fa-user'); 93 98 94 99 $box = id(new PHUIObjectBoxView()) 95 - ->setHeaderText($title) 100 + ->setHeaderText(pht('User')) 101 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 96 102 ->setForm($form); 97 103 98 - return $this->buildApplicationPage( 99 - array( 100 - $crumbs, 101 - $box, 102 - ), 103 - array( 104 - 'title' => $title, 105 - )); 104 + $view = id(new PHUITwoColumnView()) 105 + ->setHeader($header) 106 + ->setFooter($box); 107 + 108 + return $this->newPage() 109 + ->setTitle($title) 110 + ->setCrumbs($crumbs) 111 + ->appendChild($view); 106 112 } 107 113 108 114 }
+24 -12
src/applications/people/controller/PhabricatorPeopleInviteSendController.php
··· 125 125 } else { 126 126 $crumbs->addTextCrumb(pht('Invite Users')); 127 127 } 128 + $crumbs->setBorder(true); 128 129 129 130 $confirm_box = null; 131 + $info_view = null; 130 132 if ($is_confirm) { 131 133 132 134 $handles = array(); ··· 157 159 ->setValue(pht('Send Invitations'))); 158 160 } 159 161 162 + $info_view = id(new PHUIInfoView()) 163 + ->setErrors($confirm_errors) 164 + ->setSeverity($severity); 165 + 160 166 $confirm_box = id(new PHUIObjectBoxView()) 161 - ->setInfoView( 162 - id(new PHUIInfoView()) 163 - ->setErrors($confirm_errors) 164 - ->setSeverity($severity)) 165 167 ->setHeaderText(pht('Confirm Invites')) 166 168 ->setTable($invite_table) 167 - ->appendChild($confirm_form); 169 + ->appendChild($confirm_form) 170 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY); 168 171 } 169 172 170 173 $form = id(new AphrontFormView()) ··· 197 200 : pht('Continue')) 198 201 ->addCancelButton($this->getApplicationURI('invite/'))); 199 202 203 + $header = id(new PHUIHeaderView()) 204 + ->setHeader($title) 205 + ->setHeaderIcon('fa-group'); 206 + 200 207 $box = id(new PHUIObjectBoxView()) 201 208 ->setHeaderText( 202 209 $is_confirm 203 210 ? pht('Revise Invites') 204 211 : pht('Invite Users')) 205 212 ->setFormErrors($errors) 206 - ->setForm($form); 213 + ->setForm($form) 214 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY); 207 215 208 - return $this->buildApplicationPage( 209 - array( 210 - $crumbs, 216 + $view = id(new PHUITwoColumnView()) 217 + ->setHeader($header) 218 + ->setFooter(array( 219 + $info_view, 211 220 $confirm_box, 212 221 $box, 213 - ), 214 - array( 215 - 'title' => $title, 216 222 )); 223 + 224 + return $this->newPage() 225 + ->setTitle($title) 226 + ->setCrumbs($crumbs) 227 + ->appendChild($view); 228 + 217 229 } 218 230 219 231 }
+4 -6
src/applications/people/controller/PhabricatorPeopleLdapController.php
··· 42 42 $this->getApplicationURI('/ldap/')); 43 43 44 44 $nav = $this->buildSideNavView(); 45 - $nav->setCrumbs($crumbs); 46 45 $nav->selectFilter('ldap'); 47 46 $nav->appendChild($content); 48 47 ··· 56 55 $nav->appendChild($this->processSearchRequest($request)); 57 56 } 58 57 59 - return $this->buildApplicationPage( 60 - $nav, 61 - array( 62 - 'title' => pht('Import Ldap Users'), 63 - )); 58 + return $this->newPage() 59 + ->setTitle(pht('Import Ldap Users')) 60 + ->setCrumbs($crumbs) 61 + ->setNavigation($nav); 64 62 } 65 63 66 64 private function processImportRequest($request) {
+16 -10
src/applications/people/controller/PhabricatorPeopleNewController.php
··· 208 208 209 209 $title = pht('Create New User'); 210 210 211 - $form_box = id(new PHUIObjectBoxView()) 212 - ->setHeaderText($title) 211 + $box = id(new PHUIObjectBoxView()) 212 + ->setHeaderText(pht('User')) 213 213 ->setFormErrors($errors) 214 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 214 215 ->setForm($form); 215 216 216 217 $crumbs = $this->buildApplicationCrumbs(); 217 218 $crumbs->addTextCrumb($title); 219 + $crumbs->setBorder(true); 218 220 219 - return $this->buildApplicationPage( 220 - array( 221 - $crumbs, 222 - $form_box, 223 - ), 224 - array( 225 - 'title' => $title, 226 - )); 221 + $header = id(new PHUIHeaderView()) 222 + ->setHeader($title) 223 + ->setHeaderIcon('fa-user'); 224 + 225 + $view = id(new PHUITwoColumnView()) 226 + ->setHeader($header) 227 + ->setFooter($box); 228 + 229 + return $this->newPage() 230 + ->setTitle($title) 231 + ->setCrumbs($crumbs) 232 + ->appendChild($view); 227 233 } 228 234 229 235 }
+15 -6
src/applications/people/controller/PhabricatorPeopleProfileEditController.php
··· 75 75 } 76 76 77 77 $form_box = id(new PHUIObjectBoxView()) 78 - ->setHeaderText(pht('Edit Profile')) 78 + ->setHeaderText(pht('Profile')) 79 79 ->setValidationException($validation_exception) 80 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 80 81 ->setForm($form); 81 82 82 - if ($note) { 83 - $form_box->setInfoView($note); 84 - } 85 - 86 83 $crumbs = $this->buildApplicationCrumbs(); 87 84 $crumbs->addTextCrumb(pht('Edit Profile')); 85 + $crumbs->setBorder(true); 88 86 89 87 $nav = $this->getProfileMenu(); 90 88 $nav->selectFilter(PhabricatorPeopleProfilePanelEngine::PANEL_MANAGE); 91 89 90 + $header = id(new PHUIHeaderView()) 91 + ->setHeader(pht('Edit Profile: %s', $user->getFullName())) 92 + ->setHeaderIcon('fa-pencil'); 93 + 94 + $view = id(new PHUITwoColumnView()) 95 + ->setHeader($header) 96 + ->setFooter(array( 97 + $note, 98 + $form_box, 99 + )); 100 + 92 101 return $this->newPage() 93 102 ->setTitle($title) 94 103 ->setCrumbs($crumbs) 95 104 ->setNavigation($nav) 96 - ->appendChild($form_box); 105 + ->appendChild($view); 97 106 } 98 107 }
+15 -5
src/applications/people/controller/PhabricatorPeopleProfilePictureController.php
··· 228 228 $form_box = id(new PHUIObjectBoxView()) 229 229 ->setHeaderText($title) 230 230 ->setFormErrors($errors) 231 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 231 232 ->setForm($form); 232 233 233 234 $upload_form = id(new AphrontFormView()) ··· 247 248 248 249 $upload_box = id(new PHUIObjectBoxView()) 249 250 ->setHeaderText(pht('Upload New Picture')) 251 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 250 252 ->setForm($upload_form); 251 253 252 254 $crumbs = $this->buildApplicationCrumbs(); 253 255 $crumbs->addTextCrumb(pht('Edit Profile Picture')); 256 + $crumbs->setBorder(true); 254 257 255 258 $nav = $this->getProfileMenu(); 256 259 $nav->selectFilter(PhabricatorPeopleProfilePanelEngine::PANEL_MANAGE); 257 260 261 + $header = id(new PHUIHeaderView()) 262 + ->setHeader(pht('Edit Profile Picture')) 263 + ->setHeaderIcon('fa-camera'); 264 + 265 + $view = id(new PHUITwoColumnView()) 266 + ->setHeader($header) 267 + ->setFooter(array( 268 + $form_box, 269 + $upload_box, 270 + )); 271 + 258 272 return $this->newPage() 259 273 ->setTitle($title) 260 274 ->setCrumbs($crumbs) 261 275 ->setNavigation($nav) 262 - ->appendChild( 263 - array( 264 - $form_box, 265 - $upload_box, 266 - )); 276 + ->appendChild($view); 267 277 } 268 278 }