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

Printable pages for PHUIDocumentViewPro

Summary: Fixes T10131. Adds new CSS to better present document pages for printing. Added a print link to Phriction.

Test Plan: Tested Phriction, Phame, and Legalpad.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10131

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

+50 -11
+5 -5
resources/celerity/map.php
··· 7 7 */ 8 8 return array( 9 9 'names' => array( 10 - 'core.pkg.css' => '85a1b79a', 10 + 'core.pkg.css' => 'f7796100', 11 11 'core.pkg.js' => '1d376fa9', 12 12 'darkconsole.pkg.js' => 'e7393ebb', 13 13 'differential.pkg.css' => '3fb7f532', ··· 128 128 'rsrc/css/phui/phui-button.css' => '4a5fbe3d', 129 129 'rsrc/css/phui/phui-chart.css' => '6bf6f78e', 130 130 'rsrc/css/phui/phui-cms.css' => 'be43c8a8', 131 - 'rsrc/css/phui/phui-crumbs-view.css' => '9dac418c', 131 + 'rsrc/css/phui/phui-crumbs-view.css' => '195ac419', 132 132 'rsrc/css/phui/phui-curtain-view.css' => '947bf1a4', 133 - 'rsrc/css/phui/phui-document-pro.css' => 'dc3d46ed', 133 + 'rsrc/css/phui/phui-document-pro.css' => 'ca1fed81', 134 134 'rsrc/css/phui/phui-document-summary.css' => '9ca48bdf', 135 135 'rsrc/css/phui/phui-document.css' => 'c32e8dec', 136 136 'rsrc/css/phui/phui-feed-story.css' => 'aa49845d', ··· 834 834 'phui-calendar-month-css' => '8e10e92c', 835 835 'phui-chart-css' => '6bf6f78e', 836 836 'phui-cms-css' => 'be43c8a8', 837 - 'phui-crumbs-view-css' => '9dac418c', 837 + 'phui-crumbs-view-css' => '195ac419', 838 838 'phui-curtain-view-css' => '947bf1a4', 839 839 'phui-document-summary-view-css' => '9ca48bdf', 840 840 'phui-document-view-css' => 'c32e8dec', 841 - 'phui-document-view-pro-css' => 'dc3d46ed', 841 + 'phui-document-view-pro-css' => 'ca1fed81', 842 842 'phui-feed-story-css' => 'aa49845d', 843 843 'phui-font-icon-base-css' => '870a7360', 844 844 'phui-fontkit-css' => '9cda225e',
+17 -6
src/applications/phriction/controller/PhrictionDocumentController.php
··· 306 306 ->setWorkflow(true)); 307 307 } 308 308 309 - return 310 - $action_view->addAction( 311 - id(new PhabricatorActionView()) 312 - ->setName(pht('View History')) 313 - ->setIcon('fa-list') 314 - ->setHref(PhrictionDocument::getSlugURI($slug, 'history'))); 309 + $action_view->addAction( 310 + id(new PhabricatorActionView()) 311 + ->setName(pht('View History')) 312 + ->setIcon('fa-list') 313 + ->setHref(PhrictionDocument::getSlugURI($slug, 'history'))); 314 + 315 + $print_uri = PhrictionDocument::getSlugURI($slug).'?__print__=1'; 316 + 317 + $action_view->addAction( 318 + id(new PhabricatorActionView()) 319 + ->setName(pht('Printable Page')) 320 + ->setIcon('fa-print') 321 + ->setOpenInNewWindow(true) 322 + ->setHref($print_uri)); 323 + 324 + return $action_view; 325 + 315 326 } 316 327 317 328 private function renderDocumentChildren($slug) {
+4
webroot/rsrc/css/phui/phui-crumbs-view.css
··· 13 13 background-color: {$page.background}; 14 14 } 15 15 16 + .printable .phui-crumbs-view { 17 + display: none; 18 + } 19 + 16 20 .phui-crumbs-view, 17 21 .phui-crumbs-view a.phui-crumb-view, 18 22 .phui-crumbs-view a.phui-crumbs-action {
+24
webroot/rsrc/css/phui/phui-document-pro.css
··· 20 20 margin: 0 auto; 21 21 } 22 22 23 + body.printable { 24 + background-color: #fff; 25 + } 26 + 27 + .printable .phui-document-view-pro-box { 28 + display: none; 29 + } 30 + 31 + .printable .phui-document-container { 32 + border: none; 33 + } 34 + 35 + .printable .phui-document-container .phui-header-view .phui-header-subheader { 36 + display: none; 37 + } 38 + 39 + .printable .phui-document-container .phui-header-view .phui-header-col3 { 40 + display: none; 41 + } 42 + 23 43 .device .phui-document-view-pro-box { 24 44 margin: 0 8px; 25 45 } ··· 45 65 position: absolute; 46 66 top: 34px; 47 67 left: -36px; 68 + } 69 + 70 + .printable .phui-document-view-pro a.phui-document-toc { 71 + display: none; 48 72 } 49 73 50 74 a.button.phui-document-toc {