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

Convert Alamanc edit forms to new UI

Summary: Adds headers, new layout to edit panels on Almanac.

Test Plan: Pull up each edit panel in sandbox, save form.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

+59 -18
+16 -6
src/applications/almanac/controller/AlmanacBindingEditController.php
··· 99 99 100 100 $box = id(new PHUIObjectBoxView()) 101 101 ->setValidationException($validation_exception) 102 - ->setHeaderText($title) 102 + ->setHeaderText(pht('Binding')) 103 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 103 104 ->appendChild($form); 104 105 105 106 $crumbs = $this->buildApplicationCrumbs(); 106 107 $crumbs->addTextCrumb($service->getName(), $service_uri); 107 108 if ($is_new) { 108 109 $crumbs->addTextCrumb(pht('Create Binding')); 110 + $header = id(new PHUIHeaderView()) 111 + ->setHeader(pht('Create Binding')) 112 + ->setHeaderIcon('fa-plus-square'); 109 113 } else { 110 114 $crumbs->addTextCrumb(pht('Edit Binding')); 115 + $header = id(new PHUIHeaderView()) 116 + ->setHeader(pht('Create Binding')) 117 + ->setHeaderIcon('fa-pencil'); 111 118 } 119 + $crumbs->setBorder(true); 120 + 121 + $view = id(new PHUITwoColumnView()) 122 + ->setHeader($header) 123 + ->setFooter(array( 124 + $box, 125 + )); 112 126 113 127 return $this->newPage() 114 128 ->setTitle($title) 115 129 ->setCrumbs($crumbs) 116 - ->appendChild( 117 - array( 118 - $box, 119 - )); 120 - 130 + ->appendChild($view); 121 131 } 122 132 123 133 }
+12 -5
src/applications/almanac/controller/AlmanacConsoleController.php
··· 61 61 62 62 $crumbs = $this->buildApplicationCrumbs(); 63 63 $crumbs->addTextCrumb(pht('Console')); 64 + $crumbs->setBorder(true); 64 65 65 66 $box = id(new PHUIObjectBoxView()) 66 - ->setHeaderText(pht('Console')) 67 67 ->setObjectList($menu); 68 68 69 + $header = id(new PHUIHeaderView()) 70 + ->setHeader(pht('Almanac Console')) 71 + ->setHeaderIcon('fa-server'); 72 + 73 + $view = id(new PHUITwoColumnView()) 74 + ->setHeader($header) 75 + ->setFooter(array( 76 + $box, 77 + )); 78 + 69 79 return $this->newPage() 70 80 ->setTitle(pht('Almanac Console')) 71 81 ->setCrumbs($crumbs) 72 - ->appendChild( 73 - array( 74 - $box, 75 - )); 82 + ->appendChild($view); 76 83 77 84 } 78 85
+17 -5
src/applications/almanac/controller/AlmanacInterfaceEditController.php
··· 131 131 132 132 $box = id(new PHUIObjectBoxView()) 133 133 ->setValidationException($validation_exception) 134 - ->setHeaderText($title) 134 + ->setHeaderText(pht('Interface')) 135 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 135 136 ->setForm($form); 136 137 137 138 $crumbs = $this->buildApplicationCrumbs(); 138 139 $crumbs->addTextCrumb($device->getName(), $device_uri); 139 140 if ($is_new) { 140 141 $crumbs->addTextCrumb(pht('Create Interface')); 142 + $header = id(new PHUIHeaderView()) 143 + ->setHeader(pht('Create Interface')) 144 + ->setHeaderIcon('fa-plus-square'); 141 145 } else { 142 146 $crumbs->addTextCrumb(pht('Edit Interface')); 147 + $header = id(new PHUIHeaderView()) 148 + ->setHeader(pht('Edit Interface')) 149 + ->setHeaderIcon('fa-pencil'); 143 150 } 151 + $crumbs->setBorder(true); 152 + 153 + $view = id(new PHUITwoColumnView()) 154 + ->setHeader($header) 155 + ->setFooter(array( 156 + $box, 157 + )); 144 158 145 159 return $this->newPage() 146 160 ->setTitle($title) 147 161 ->setCrumbs($crumbs) 148 - ->appendChild( 149 - array( 150 - $box, 151 - )); 162 + ->appendChild($view); 163 + 152 164 } 153 165 154 166 }
+14 -2
src/applications/almanac/controller/AlmanacServiceEditController.php
··· 75 75 76 76 $crumbs = $this->buildApplicationCrumbs(); 77 77 $crumbs->addTextCrumb(pht('Create Service')); 78 + $crumbs->setBorder(true); 78 79 79 80 $title = pht('Choose Service Type'); 81 + $header = id(new PHUIHeaderView()) 82 + ->setHeader(pht('Create Service')) 83 + ->setHeaderIcon('fa-plus-square'); 80 84 81 85 $form = id(new AphrontFormView()) 82 86 ->setUser($viewer) ··· 88 92 89 93 $box = id(new PHUIObjectBoxView()) 90 94 ->setFormErrors($errors) 91 - ->setHeaderText($title) 95 + ->setHeaderText(pht('Service')) 96 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 92 97 ->setForm($form); 93 98 99 + $view = id(new PHUITwoColumnView()) 100 + ->setHeader($header) 101 + ->setFooter(array( 102 + $box, 103 + )); 104 + 94 105 return $this->newPage() 95 106 ->setTitle($title) 96 107 ->setCrumbs($crumbs) 97 - ->appendChild($box); 108 + ->appendChild($view); 109 + 98 110 } 99 111 100 112 }