mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 19:40:55 +01:00
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
This commit is contained in:
parent
8b4398f916
commit
d7bc582530
4 changed files with 50 additions and 11 deletions
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
return array(
|
||||
'names' => array(
|
||||
'core.pkg.css' => '85a1b79a',
|
||||
'core.pkg.css' => 'f7796100',
|
||||
'core.pkg.js' => '1d376fa9',
|
||||
'darkconsole.pkg.js' => 'e7393ebb',
|
||||
'differential.pkg.css' => '3fb7f532',
|
||||
|
@ -128,9 +128,9 @@ return array(
|
|||
'rsrc/css/phui/phui-button.css' => '4a5fbe3d',
|
||||
'rsrc/css/phui/phui-chart.css' => '6bf6f78e',
|
||||
'rsrc/css/phui/phui-cms.css' => 'be43c8a8',
|
||||
'rsrc/css/phui/phui-crumbs-view.css' => '9dac418c',
|
||||
'rsrc/css/phui/phui-crumbs-view.css' => '195ac419',
|
||||
'rsrc/css/phui/phui-curtain-view.css' => '947bf1a4',
|
||||
'rsrc/css/phui/phui-document-pro.css' => 'dc3d46ed',
|
||||
'rsrc/css/phui/phui-document-pro.css' => 'ca1fed81',
|
||||
'rsrc/css/phui/phui-document-summary.css' => '9ca48bdf',
|
||||
'rsrc/css/phui/phui-document.css' => 'c32e8dec',
|
||||
'rsrc/css/phui/phui-feed-story.css' => 'aa49845d',
|
||||
|
@ -834,11 +834,11 @@ return array(
|
|||
'phui-calendar-month-css' => '8e10e92c',
|
||||
'phui-chart-css' => '6bf6f78e',
|
||||
'phui-cms-css' => 'be43c8a8',
|
||||
'phui-crumbs-view-css' => '9dac418c',
|
||||
'phui-crumbs-view-css' => '195ac419',
|
||||
'phui-curtain-view-css' => '947bf1a4',
|
||||
'phui-document-summary-view-css' => '9ca48bdf',
|
||||
'phui-document-view-css' => 'c32e8dec',
|
||||
'phui-document-view-pro-css' => 'dc3d46ed',
|
||||
'phui-document-view-pro-css' => 'ca1fed81',
|
||||
'phui-feed-story-css' => 'aa49845d',
|
||||
'phui-font-icon-base-css' => '870a7360',
|
||||
'phui-fontkit-css' => '9cda225e',
|
||||
|
|
|
@ -306,12 +306,23 @@ final class PhrictionDocumentController
|
|||
->setWorkflow(true));
|
||||
}
|
||||
|
||||
return
|
||||
$action_view->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('View History'))
|
||||
->setIcon('fa-list')
|
||||
->setHref(PhrictionDocument::getSlugURI($slug, 'history')));
|
||||
|
||||
$print_uri = PhrictionDocument::getSlugURI($slug).'?__print__=1';
|
||||
|
||||
$action_view->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('Printable Page'))
|
||||
->setIcon('fa-print')
|
||||
->setOpenInNewWindow(true)
|
||||
->setHref($print_uri));
|
||||
|
||||
return $action_view;
|
||||
|
||||
}
|
||||
|
||||
private function renderDocumentChildren($slug) {
|
||||
|
|
|
@ -13,6 +13,10 @@
|
|||
background-color: {$page.background};
|
||||
}
|
||||
|
||||
.printable .phui-crumbs-view {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.phui-crumbs-view,
|
||||
.phui-crumbs-view a.phui-crumb-view,
|
||||
.phui-crumbs-view a.phui-crumbs-action {
|
||||
|
|
|
@ -20,6 +20,26 @@
|
|||
margin: 0 auto;
|
||||
}
|
||||
|
||||
body.printable {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.printable .phui-document-view-pro-box {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.printable .phui-document-container {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.printable .phui-document-container .phui-header-view .phui-header-subheader {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.printable .phui-document-container .phui-header-view .phui-header-col3 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.device .phui-document-view-pro-box {
|
||||
margin: 0 8px;
|
||||
}
|
||||
|
@ -47,6 +67,10 @@
|
|||
left: -36px;
|
||||
}
|
||||
|
||||
.printable .phui-document-view-pro a.phui-document-toc {
|
||||
display: none;
|
||||
}
|
||||
|
||||
a.button.phui-document-toc {
|
||||
display: inline-block;
|
||||
height: 16px;
|
||||
|
|
Loading…
Reference in a new issue