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

Add a "Printable Version" link to Phortune invoices

Summary:
Ref T9309. This is a minor quality of life improvement, hopefully. We already have print CSS, just expose it more clearly.

Also, hide actions (these never seem useful?) and footers from printable versions. I opened the printable version in a new window since it now doesn't have any actions.

Test Plan:
{F777241}

{F777242}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9309

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

+38 -5
+5 -5
resources/celerity/map.php
··· 7 7 */ 8 8 return array( 9 9 'names' => array( 10 - 'core.pkg.css' => '928faf7e', 10 + 'core.pkg.css' => '994de4ed', 11 11 'core.pkg.js' => '47dc9ebb', 12 12 'darkconsole.pkg.js' => 'e7393ebb', 13 13 'differential.pkg.css' => '2de124c9', ··· 36 36 'rsrc/css/application/base/notification-menu.css' => 'f31c0bde', 37 37 'rsrc/css/application/base/phabricator-application-launch-view.css' => '95351601', 38 38 'rsrc/css/application/base/phui-theme.css' => '6b451f24', 39 - 'rsrc/css/application/base/standard-page-view.css' => '4d176b67', 39 + 'rsrc/css/application/base/standard-page-view.css' => '1f53d056', 40 40 'rsrc/css/application/calendar/calendar-icon.css' => 'c69aa59f', 41 41 'rsrc/css/application/chatlog/chatlog.css' => 'd295b020', 42 42 'rsrc/css/application/conduit/conduit-api.css' => '7bc725c4', ··· 141 141 'rsrc/css/phui/phui-object-item-list-view.css' => 'ab1bf393', 142 142 'rsrc/css/phui/phui-pager.css' => 'bea33d23', 143 143 'rsrc/css/phui/phui-pinboard-view.css' => '2495140e', 144 - 'rsrc/css/phui/phui-property-list-view.css' => '15bbe0b0', 144 + 'rsrc/css/phui/phui-property-list-view.css' => '318d4dea', 145 145 'rsrc/css/phui/phui-remarkup-preview.css' => '867f85b3', 146 146 'rsrc/css/phui/phui-spacing.css' => '042804d6', 147 147 'rsrc/css/phui/phui-status.css' => '888cedb8', ··· 743 743 'phabricator-side-menu-view-css' => 'bec2458e', 744 744 'phabricator-slowvote-css' => '475b4bd2', 745 745 'phabricator-source-code-view-css' => '5e0178de', 746 - 'phabricator-standard-page-view' => '4d176b67', 746 + 'phabricator-standard-page-view' => '1f53d056', 747 747 'phabricator-textareautils' => '5c93c52c', 748 748 'phabricator-title' => 'df5e11d2', 749 749 'phabricator-tooltip' => '1d298e3a', ··· 794 794 'phui-object-item-list-view-css' => 'ab1bf393', 795 795 'phui-pager-css' => 'bea33d23', 796 796 'phui-pinboard-view-css' => '2495140e', 797 - 'phui-property-list-view-css' => '15bbe0b0', 797 + 'phui-property-list-view-css' => '318d4dea', 798 798 'phui-remarkup-preview-css' => '867f85b3', 799 799 'phui-spacing-css' => '042804d6', 800 800 'phui-status-list-view-css' => '888cedb8',
+8
src/applications/phortune/controller/PhortuneCartViewController.php
··· 268 268 $refund_uri = $this->getApplicationURI("{$prefix}cart/{$id}/refund/"); 269 269 $update_uri = $this->getApplicationURI("{$prefix}cart/{$id}/update/"); 270 270 $accept_uri = $this->getApplicationURI("{$prefix}cart/{$id}/accept/"); 271 + $print_uri = $this->getApplicationURI("{$prefix}cart/{$id}/?__print__=1"); 271 272 272 273 $view->addAction( 273 274 id(new PhabricatorActionView()) ··· 308 309 ->setIcon('fa-shopping-cart') 309 310 ->setHref($resume_uri)); 310 311 } 312 + 313 + $view->addAction( 314 + id(new PhabricatorActionView()) 315 + ->setName(pht('Printable Version')) 316 + ->setHref($print_uri) 317 + ->setOpenInNewWindow(true) 318 + ->setIcon('fa-print')); 311 319 312 320 return $view; 313 321 }
+17
src/view/layout/PhabricatorActionView.php
··· 14 14 private $sigils = array(); 15 15 private $metadata; 16 16 private $selected; 17 + private $openInNewWindow; 17 18 18 19 public function setSelected($selected) { 19 20 $this->selected = $selected; ··· 107 108 return $this; 108 109 } 109 110 111 + public function setOpenInNewWindow($open_in_new_window) { 112 + $this->openInNewWindow = $open_in_new_window; 113 + return $this; 114 + } 115 + 116 + public function getOpenInNewWindow() { 117 + return $this->openInNewWindow; 118 + } 119 + 110 120 public function render() { 111 121 112 122 $icon = null; ··· 161 171 ), 162 172 $item); 163 173 } else { 174 + if ($this->getOpenInNewWindow()) { 175 + $target = '_blank'; 176 + } else { 177 + $target = null; 178 + } 179 + 164 180 $item = javelin_tag( 165 181 'a', 166 182 array( 167 183 'href' => $this->getHref(), 168 184 'class' => 'phabricator-action-view-item', 185 + 'target' => $target, 169 186 'sigil' => $sigils, 170 187 'meta' => $this->metadata, 171 188 ),
+4
webroot/rsrc/css/application/base/standard-page-view.css
··· 25 25 color: {$greytext}; 26 26 } 27 27 28 + !print .phabricator-standard-page-footer { 29 + display: none; 30 + } 31 + 28 32 .device-desktop .has-local-nav + .phabricator-standard-page-footer { 29 33 margin-left: 221px; 30 34 }
+4
webroot/rsrc/css/phui/phui-property-list-view.css
··· 176 176 border-left: 1px solid {$thinblueborder}; 177 177 } 178 178 179 + !print .phui-property-list-actions { 180 + display: none; 181 + } 182 + 179 183 .device .phui-property-list-actions { 180 184 float: none; 181 185 width: auto;