print.phtml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php echo $this->doctype; ?>
  2. <!--[if IE 9]><html class="lt-ie10" lang="en" > <![endif]-->
  3. <html class="no-js" lang="en">
  4. <head>
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  6. <meta charset="utf-8">
  7. <title><?php echo $this->title; ?></title>
  8. <?php
  9. $this->scripts();
  10. $this->styles();
  11. ?>
  12. <style>
  13. @page
  14. {
  15. size: auto; /* auto is the initial value */
  16. /* this affects the margin in the printer settings */
  17. margin: 15mm 0mm 15mm 0mm;
  18. }
  19. body
  20. {
  21. /* this affects the margin on the content before sending to printer */
  22. margin: 0px;
  23. }
  24. p
  25. {
  26. font-size:10pt !important;
  27. }
  28. </style>
  29. </head>
  30. <body onload="window.print()">
  31. <nav class="top-bar hide-for-print" data-topbar role="navigation">
  32. <ul class="title-area">
  33. <li class="name">
  34. <h1><a href="#">Print Preview</a></h1>
  35. </li>
  36. </ul>
  37. <section class="top-bar-section">
  38. <!-- Right Nav Section -->
  39. <ul class="right">
  40. <li><a href="#" id="print"><i class="fa fa-print"></i> Print</a></li>
  41. <li><a href="#" id="close"><i class="fa fa-close"></i> Close</a></li>
  42. </ul>
  43. </section>
  44. </nav>
  45. <?php $this->content();?>
  46. <script>
  47. $("#print").click(function() {
  48. window.print();
  49. });
  50. $("#close").click(function() {
  51. window.close();
  52. });
  53. </script>
  54. </body>
  55. </html>