diff --git a/mod/book/tool/print/index.php b/mod/book/tool/print/index.php index 36e6bf9163249..cb258b08b791e 100644 --- a/mod/book/tool/print/index.php +++ b/mod/book/tool/print/index.php @@ -81,7 +81,7 @@ // page header ?> - + <?php echo format_string($book->name, true, array('context'=>$context)) ?> @@ -90,6 +90,13 @@ + pix_icon('chapter', $printtext, 'booktool_print', array('class' => 'book_print_icon')); + $printlinkatt = array('onclick' => 'window.print();return false;', 'class' => 'book_no_print'); + echo html_writer::link('#', $printicon.$printtext, $printlinkatt); + ?>

name, true, array('context'=>$context)) ?>

@@ -119,7 +126,7 @@ // page header ?> - + <?php echo format_string($book->name, true, array('context'=>$context)) ?> @@ -128,6 +135,13 @@ + pix_icon('book', $printtext, 'booktool_print', array('class' => 'book_print_icon')); + $printlinkatt = array('onclick' => 'window.print();return false;', 'class' => 'book_no_print'); + echo html_writer::link('#', $printicon.$printtext, $printlinkatt); + ?>

name, true, array('context'=>$context)) ?>

intro, $book->introformat, array('noclean'=>true, 'context'=>$context)) ?>

diff --git a/mod/book/tool/print/print.css b/mod/book/tool/print/print.css index 7b7ccede3c1cf..fb5b19cce00ef 100644 --- a/mod/book/tool/print/print.css +++ b/mod/book/tool/print/print.css @@ -155,3 +155,21 @@ font { margin-top: 0px; list-style: none; } + +/* Print dialog link icon */ +.book_print_icon { + padding-left: 0; + padding-right: 3px; + height: 16px; + vertical-align: text-bottom; + width: 16px; + border-width: 0; +} + +/* Exclude elements from printing */ +@media print +{ + .book_no_print { + display: none; + } +}