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

Remove PHUIInfoPanelView

Summary: We've never used this, and no current plans to.

Test Plan: grep for use cases.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

-314
-2
resources/celerity/map.php
··· 163 163 'rsrc/css/phui/phui-icon-set-selector.css' => '87db8fee', 164 164 'rsrc/css/phui/phui-icon.css' => '5c4a5de6', 165 165 'rsrc/css/phui/phui-image-mask.css' => 'a8498f9c', 166 - 'rsrc/css/phui/phui-info-panel.css' => '27ea50a1', 167 166 'rsrc/css/phui/phui-info-view.css' => 'e1b4ec37', 168 167 'rsrc/css/phui/phui-invisible-character-view.css' => '6993d9f0', 169 168 'rsrc/css/phui/phui-left-right.css' => 'f60c67e7', ··· 852 851 'phui-icon-set-selector-css' => '87db8fee', 853 852 'phui-icon-view-css' => '5c4a5de6', 854 853 'phui-image-mask-css' => 'a8498f9c', 855 - 'phui-info-panel-css' => '27ea50a1', 856 854 'phui-info-view-css' => 'e1b4ec37', 857 855 'phui-inline-comment-view-css' => '65ae3bc2', 858 856 'phui-invisible-character-view-css' => '6993d9f0',
-4
src/__phutil_library_map__.php
··· 1770 1770 'PHUIImageMaskExample' => 'applications/uiexample/examples/PHUIImageMaskExample.php', 1771 1771 'PHUIImageMaskView' => 'view/phui/PHUIImageMaskView.php', 1772 1772 'PHUIInfoExample' => 'applications/uiexample/examples/PHUIInfoExample.php', 1773 - 'PHUIInfoPanelExample' => 'applications/uiexample/examples/PHUIInfoPanelExample.php', 1774 - 'PHUIInfoPanelView' => 'view/phui/PHUIInfoPanelView.php', 1775 1773 'PHUIInfoView' => 'view/form/PHUIInfoView.php', 1776 1774 'PHUIInvisibleCharacterTestCase' => 'view/phui/__tests__/PHUIInvisibleCharacterTestCase.php', 1777 1775 'PHUIInvisibleCharacterView' => 'view/phui/PHUIInvisibleCharacterView.php', ··· 6928 6926 'PHUIImageMaskExample' => 'PhabricatorUIExample', 6929 6927 'PHUIImageMaskView' => 'AphrontTagView', 6930 6928 'PHUIInfoExample' => 'PhabricatorUIExample', 6931 - 'PHUIInfoPanelExample' => 'PhabricatorUIExample', 6932 - 'PHUIInfoPanelView' => 'AphrontView', 6933 6929 'PHUIInfoView' => 'AphrontTagView', 6934 6930 'PHUIInvisibleCharacterTestCase' => 'PhabricatorTestCase', 6935 6931 'PHUIInvisibleCharacterView' => 'AphrontView',
-138
src/applications/uiexample/examples/PHUIInfoPanelExample.php
··· 1 - <?php 2 - 3 - final class PHUIInfoPanelExample extends PhabricatorUIExample { 4 - 5 - public function getName() { 6 - return pht('Info Panel'); 7 - } 8 - 9 - public function getDescription() { 10 - return pht('A medium sized box with bits of gooey information.'); 11 - } 12 - 13 - public function renderExample() { 14 - $header1 = id(new PHUIHeaderView()) 15 - ->setHeader(pht('Conpherence')); 16 - 17 - $header2 = id(new PHUIHeaderView()) 18 - ->setHeader(pht('Diffusion')); 19 - 20 - $header3 = id(new PHUIHeaderView()) 21 - ->setHeader(pht('Backend Ops Projects')); 22 - 23 - $header4 = id(new PHUIHeaderView()) 24 - ->setHeader(pht('Revamp Liberty')) 25 - ->setSubHeader(pht('For great justice')) 26 - ->setImage( 27 - celerity_get_resource_uri('/rsrc/image/people/washington.png')); 28 - 29 - $header5 = id(new PHUIHeaderView()) 30 - ->setHeader(pht('Phacility Redesign')) 31 - ->setSubHeader(pht('Move them pixels')) 32 - ->setImage( 33 - celerity_get_resource_uri('/rsrc/image/people/harding.png')); 34 - 35 - $header6 = id(new PHUIHeaderView()) 36 - ->setHeader(pht('Python Phlux')) 37 - ->setSubHeader(pht('No. Sleep. Till Brooklyn.')) 38 - ->setImage( 39 - celerity_get_resource_uri('/rsrc/image/people/taft.png')); 40 - 41 - $column1 = id(new PHUIInfoPanelView()) 42 - ->setHeader($header1) 43 - ->setColumns(3) 44 - ->addInfoBlock(3, pht('Needs Triage')) 45 - ->addInfoBlock(5, pht('Unbreak Now')) 46 - ->addInfoBlock(0, pht('High')) 47 - ->addInfoBlock(0, pht('Normal')) 48 - ->addInfoBlock(12, pht('Low')) 49 - ->addInfoBlock(123, pht('Wishlist')); 50 - 51 - $column2 = id(new PHUIInfoPanelView()) 52 - ->setHeader($header2) 53 - ->setColumns(3) 54 - ->addInfoBlock(3, pht('Needs Triage')) 55 - ->addInfoBlock(5, pht('Unbreak Now')) 56 - ->addInfoBlock(0, pht('High')) 57 - ->addInfoBlock(0, pht('Normal')) 58 - ->addInfoBlock(12, pht('Low')) 59 - ->addInfoBlock(123, pht('Wishlist')); 60 - 61 - $column3 = id(new PHUIInfoPanelView()) 62 - ->setHeader($header3) 63 - ->setColumns(3) 64 - ->addInfoBlock(3, pht('Needs Triage')) 65 - ->addInfoBlock(5, pht('Unbreak Now')) 66 - ->addInfoBlock(0, pht('High')) 67 - ->addInfoBlock(0, pht('Normal')) 68 - ->addInfoBlock(12, pht('Low')) 69 - ->addInfoBlock(123, pht('Wishlist')); 70 - 71 - $column4 = id(new PHUIInfoPanelView()) 72 - ->setHeader($header4) 73 - ->setColumns(3) 74 - ->setProgress(90) 75 - ->addInfoBlock(3, pht('Needs Triage')) 76 - ->addInfoBlock(5, pht('Unbreak Now')) 77 - ->addInfoBlock(0, pht('High')) 78 - ->addInfoBlock(0, pht('Normal')) 79 - ->addInfoBlock(0, pht('Wishlist')); 80 - 81 - $column5 = id(new PHUIInfoPanelView()) 82 - ->setHeader($header5) 83 - ->setColumns(2) 84 - ->setProgress(25) 85 - ->addInfoBlock(3, pht('Needs Triage')) 86 - ->addInfoBlock(5, pht('Unbreak Now')) 87 - ->addInfoBlock(0, pht('High')) 88 - ->addInfoBlock(0, pht('Normal')); 89 - 90 - $column6 = id(new PHUIInfoPanelView()) 91 - ->setHeader($header6) 92 - ->setColumns(2) 93 - ->setProgress(50) 94 - ->addInfoBlock(3, pht('Needs Triage')) 95 - ->addInfoBlock(5, pht('Unbreak Now')) 96 - ->addInfoBlock(0, pht('High')) 97 - ->addInfoBlock(0, pht('Normal')); 98 - 99 - $layout1 = id(new AphrontMultiColumnView()) 100 - ->addColumn($column1) 101 - ->addColumn($column2) 102 - ->addColumn($column3) 103 - ->setFluidLayout(true); 104 - 105 - $layout2 = id(new AphrontMultiColumnView()) 106 - ->addColumn($column4) 107 - ->addColumn($column5) 108 - ->addColumn($column6) 109 - ->setFluidLayout(true); 110 - 111 - 112 - $head1 = id(new PHUIHeaderView()) 113 - ->setHeader(pht('Flagged')); 114 - 115 - $head2 = id(new PHUIHeaderView()) 116 - ->setHeader(pht('Sprints')); 117 - 118 - 119 - $wrap1 = id(new PHUIBoxView()) 120 - ->appendChild($layout1) 121 - ->addMargin(PHUI::MARGIN_LARGE_BOTTOM); 122 - 123 - $wrap2 = id(new PHUIBoxView()) 124 - ->appendChild($layout2) 125 - ->addMargin(PHUI::MARGIN_LARGE_BOTTOM); 126 - 127 - 128 - return phutil_tag( 129 - 'div', 130 - array(), 131 - array( 132 - $head1, 133 - $wrap1, 134 - $head2, 135 - $wrap2, 136 - )); 137 - } 138 - }
-120
src/view/phui/PHUIInfoPanelView.php
··· 1 - <?php 2 - 3 - final class PHUIInfoPanelView extends AphrontView { 4 - 5 - private $header; 6 - private $progress = null; 7 - private $columns = 3; 8 - private $infoblock = array(); 9 - 10 - protected function canAppendChild() { 11 - return false; 12 - } 13 - 14 - public function setHeader(PHUIHeaderView $header) { 15 - $this->header = $header; 16 - return $this; 17 - } 18 - 19 - public function setProgress($progress) { 20 - $this->progress = $progress; 21 - return $this; 22 - } 23 - 24 - public function setColumns($columns) { 25 - $this->columns = $columns; 26 - return $this; 27 - } 28 - 29 - public function addInfoblock($num, $text) { 30 - $this->infoblock[] = array($num, $text); 31 - return $this; 32 - } 33 - 34 - public function render() { 35 - require_celerity_resource('phui-info-panel-css'); 36 - 37 - $trs = array(); 38 - $rows = ceil(count($this->infoblock) / $this->columns); 39 - for ($i = 0; $i < $rows; $i++) { 40 - $tds = array(); 41 - $ii = 1; 42 - foreach ($this->infoblock as $key => $cell) { 43 - $tds[] = $this->renderCell($cell); 44 - unset($this->infoblock[$key]); 45 - $ii++; 46 - if ($ii > $this->columns) { 47 - break; 48 - } 49 - } 50 - $trs[] = phutil_tag( 51 - 'tr', 52 - array( 53 - 'class' => 'phui-info-panel-table-row', 54 - ), 55 - $tds); 56 - } 57 - 58 - $table = phutil_tag( 59 - 'table', 60 - array( 61 - 'class' => 'phui-info-panel-table', 62 - ), 63 - $trs); 64 - 65 - $table = id(new PHUIBoxView()) 66 - ->addPadding(PHUI::PADDING_MEDIUM) 67 - ->appendChild($table); 68 - 69 - $progress = null; 70 - if ($this->progress) { 71 - $progress = phutil_tag( 72 - 'div', 73 - array( 74 - 'class' => 'phui-info-panel-progress', 75 - 'style' => 'width: '.(int)$this->progress.'%;', 76 - ), 77 - null); 78 - } 79 - 80 - $box = id(new PHUIObjectBoxView()) 81 - ->setHeader($this->header) 82 - ->appendChild($table) 83 - ->appendChild($progress); 84 - 85 - return phutil_tag( 86 - 'div', 87 - array( 88 - 'class' => 'phui-info-panel', 89 - ), 90 - $box); 91 - } 92 - 93 - private function renderCell($cell) { 94 - $number = phutil_tag( 95 - 'div', 96 - array( 97 - 'class' => 'phui-info-panel-number', 98 - ), 99 - $cell[0]); 100 - 101 - $text = phutil_tag( 102 - 'div', 103 - array( 104 - 'class' => 'phui-info-panel-text', 105 - ), 106 - $cell[1]); 107 - 108 - return phutil_tag( 109 - 'td', 110 - array( 111 - 'class' => 'phui-info-panel-table-cell', 112 - 'align' => 'center', 113 - 'width' => floor(100 / $this->columns).'%', 114 - ), 115 - array( 116 - $number, 117 - $text, 118 - )); 119 - } 120 - }
-50
webroot/rsrc/css/phui/phui-info-panel.css
··· 1 - /** 2 - * @provides phui-info-panel-css 3 - */ 4 - 5 - .phui-info-panel .phui-object-box .phui-header-has-image { 6 - padding: 2px 0 0 2px; 7 - } 8 - 9 - .phui-info-panel .phui-object-box .phui-header-image { 10 - margin: 0 8px 0 0; 11 - } 12 - 13 - .phui-info-panel-table { 14 - border-collapse: collapse; 15 - border-style: hidden; 16 - width: 100%; 17 - } 18 - 19 - .phui-info-panel-table td, 20 - .phui-info-panel-table th { 21 - border: 1px solid {$thinblueborder}; 22 - } 23 - 24 - .phui-info-panel-table-cell { 25 - padding: 8px; 26 - } 27 - 28 - .phui-info-panel-number, 29 - .phui-info-panel-number a { 30 - font-size: 30px; 31 - font-weight: bold; 32 - color: {$lightgreytext}; 33 - -webkit-font-smoothing: antialiased; 34 - } 35 - 36 - .phui-info-panel-text, 37 - .phui-info-panel-text a { 38 - color: {$lightgreytext}; 39 - } 40 - 41 - .phui-info-panel-number a:hover, 42 - .phui-info-panel-text a:hover { 43 - color: {$greytext}; 44 - text-decoration: none; 45 - } 46 - 47 - .phui-info-panel-progress { 48 - background: {$green}; 49 - height: 6px; 50 - }