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

Implement PHUIHeaderView from AphrontTagView

Summary: Looking at implementing ManiphestTaskListView as standard components, need to add this functionality for Headers.

Test Plan: Browsed various pages, couldn't spot any regressions offhand.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

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

+26 -20
+1 -3
src/__phutil_library_map__.php
··· 1495 1495 'PhabricatorCacheTTLGarbageCollector' => 'applications/cache/garbagecollector/PhabricatorCacheTTLGarbageCollector.php', 1496 1496 'PhabricatorCaches' => 'applications/cache/PhabricatorCaches.php', 1497 1497 'PhabricatorCalendarApplication' => 'applications/calendar/application/PhabricatorCalendarApplication.php', 1498 - 'PhabricatorCalendarBrowseController' => 'applications/calendar/controller/PhabricatorCalendarBrowseController.php', 1499 1498 'PhabricatorCalendarController' => 'applications/calendar/controller/PhabricatorCalendarController.php', 1500 1499 'PhabricatorCalendarDAO' => 'applications/calendar/storage/PhabricatorCalendarDAO.php', 1501 1500 'PhabricatorCalendarEvent' => 'applications/calendar/storage/PhabricatorCalendarEvent.php', ··· 4520 4519 'PHUIHandleListView' => 'AphrontTagView', 4521 4520 'PHUIHandleTagListView' => 'AphrontTagView', 4522 4521 'PHUIHandleView' => 'AphrontView', 4523 - 'PHUIHeaderView' => 'AphrontView', 4522 + 'PHUIHeaderView' => 'AphrontTagView', 4524 4523 'PHUIIconExample' => 'PhabricatorUIExample', 4525 4524 'PHUIIconView' => 'AphrontTagView', 4526 4525 'PHUIImageMaskExample' => 'PhabricatorUIExample', ··· 4839 4838 'PhabricatorCacheSpec' => 'Phobject', 4840 4839 'PhabricatorCacheTTLGarbageCollector' => 'PhabricatorGarbageCollector', 4841 4840 'PhabricatorCalendarApplication' => 'PhabricatorApplication', 4842 - 'PhabricatorCalendarBrowseController' => 'PhabricatorCalendarController', 4843 4841 'PhabricatorCalendarController' => 'PhabricatorController', 4844 4842 'PhabricatorCalendarDAO' => 'PhabricatorLiskDAO', 4845 4843 'PhabricatorCalendarEvent' => array(
+25 -17
src/view/phui/PHUIHeaderView.php
··· 1 1 <?php 2 2 3 - final class PHUIHeaderView extends AphrontView { 3 + final class PHUIHeaderView extends AphrontTagView { 4 4 5 5 const PROPERTY_STATUS = 1; 6 6 ··· 123 123 return $this; 124 124 } 125 125 126 - public function render() { 126 + protected function getTagName() { 127 + return 'div'; 128 + } 129 + 130 + protected function getTagAttributes() { 127 131 require_celerity_resource('phui-header-view-css'); 128 132 129 133 $classes = array(); ··· 146 150 $classes[] = 'phui-header-tall'; 147 151 } 148 152 153 + if ($this->image) { 154 + $classes[] = 'phui-header-has-image'; 155 + } 156 + 157 + return array( 158 + 'class' => $classes, 159 + ); 160 + } 161 + 162 + protected function getTagContent() { 149 163 $image = null; 150 164 if ($this->image) { 151 165 $image = phutil_tag( ··· 156 170 'style' => 'background-image: url('.$this->image.')', 157 171 ), 158 172 ' '); 159 - $classes[] = 'phui-header-has-image'; 160 173 } 161 174 162 175 $header = array(); ··· 243 256 $property_list); 244 257 } 245 258 246 - return phutil_tag( 247 - 'div', 248 - array( 249 - 'class' => implode(' ', $classes), 250 - ), 251 - array( 252 - $image, 253 - phutil_tag( 254 - 'h1', 255 - array( 256 - 'class' => 'phui-header-view grouped', 257 - ), 258 - $header), 259 - )); 259 + return array( 260 + $image, 261 + phutil_tag( 262 + 'h1', 263 + array( 264 + 'class' => 'phui-header-view grouped', 265 + ), 266 + $header), 267 + ); 260 268 } 261 269 262 270 private function renderPolicyProperty(PhabricatorPolicyInterface $object) {