print.phtml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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: 10mm 10mm 10mm 10mm;
  18. }
  19. body
  20. {
  21. /* this affects the margin on the content before sending to printer */
  22. margin: 0px;
  23. }
  24. td
  25. {
  26. padding:2px !important;
  27. font-size:8pt !important;
  28. }
  29. th
  30. {
  31. padding:2px !important;
  32. font-size:8pt !important;
  33. }
  34. p
  35. {
  36. font-size:8pt !important;
  37. }
  38. </style>
  39. </head>
  40. <body onload="window.prints()">
  41. <nav class="top-bar hide-for-print" data-topbar role="navigation">
  42. <ul class="title-area">
  43. <li class="name">
  44. <h1><a href="#">Print Preview</a></h1>
  45. </li>
  46. </ul>
  47. <section class="top-bar-section">
  48. <!-- Right Nav Section -->
  49. <ul class="right">
  50. <li><a href="#" id="print"><i class="fa fa-print"></i> Print</a></li>
  51. <li><a href="#" id="close"><i class="fa fa-close"></i> Close</a></li>
  52. </ul>
  53. </section>
  54. </nav>
  55. <?php $this->content();?>
  56. <script>
  57. $("#print").click(function() {
  58. window.print();
  59. });
  60. $("#close").click(function() {
  61. window.close();
  62. });
  63. </script>
  64. </body>
  65. </html>