animal-dietary-balance.php 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <title>[[*longtitle]] | [[++site_name]]</title>
  5. <base href="[[!++site_url]]" >
  6. <meta charset="[[++modx_charset]]" >
  7. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" >
  8. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
  9. <meta name="keywords" content="[[*introtext]]" >
  10. <meta name="description" content="[[*description]]" >
  11. [[!Profile]]
  12. [[$dash-header]]
  13. <link href="/client-assets/css/dashboard.css" rel="stylesheet" type="text/css" />
  14. <script src="https://unpkg.com/gijgo@1.9.11/js/gijgo.min.js" type="text/javascript"></script>
  15. <link href="https://unpkg.com/gijgo@1.9.11/css/gijgo.min.css" rel="stylesheet" type="text/css" />
  16. <script src="client-assets/js/skycons.js" type="text/javascript"></script>
  17. <link href="client-assets/home/css/graphing.css" rel="stylesheet" type="text/css" media="screen" />
  18. <link href="client-assets/home/css/alux.min.css" rel="stylesheet" type="text/css" media="screen" />
  19. <script src="https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.9.3/html2pdf.bundle.min.js" integrity="sha512-YcsIPGdhPK4P/uRW6/sruonlYj+Q7UHWeKfTAkBW+g83NKM+jMJFJ4iAPfSnVp7BKD4dKMHmVSvICUbE/V1sSw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  20. <style>
  21. @media print {
  22. @page {
  23. size: A4 portrait;
  24. }
  25. @page :left {
  26. margin-left: 0.5cm;
  27. }
  28. @page :right {
  29. margin-right: 0.5cm;
  30. }
  31. @page :top {
  32. margin-top: 0cm;
  33. }
  34. @page :bottom {
  35. margin-bottom: 0cm;
  36. }
  37. }
  38. </style>
  39. </head>
  40. <body>
  41. <link rel="stylesheet" href="client-assets/home/css/graphPrint.css" media="print">
  42. <style>
  43. .progress {
  44. border-radius: 0rem !important;
  45. }
  46. </style>
  47. <div class="container" id="content">
  48. <div class="row">
  49. [[!logoHeader]]
  50. </div>
  51. [[!animalAnalysisClient]]
  52. <!-- Graph Button -->
  53. <div class="d-print-none">
  54. [[!animalAnalysisReportButton]]
  55. <!-- <button class="btn btn-secondary downloadPDF" >Generate PDF</button> -->
  56. </div>
  57. <!-- GRAPH BANNER -->
  58. <div class="row">
  59. <div class="col-md-12 text-center font-weight-bold h4" >ANIMAL DIETARY MINERAL BALANCE</div>
  60. </div>
  61. <hr class="p-1 m-1">
  62. <!-- CHART HEADER -->
  63. <table class="chart">
  64. <tbody>
  65. <tr class="chart-header">
  66. <th class="text-center col-1-7">Elements</th>
  67. <th class="text-center col-1-7">Daily Intake</th>
  68. <th class="text-center col-1-7">Daily Req.</th>
  69. <th class="text-center col-1-7">Nutrient Bal</th>
  70. <th class="text-center col-1-7">Deficit</th>
  71. <th class="text-center col-1-7">Satisfactory</th>
  72. <th >Surplus</th>
  73. </tr>
  74. <tr>
  75. <td class="border-left"></td>
  76. <td class="border-left"></td>
  77. <td class="border-left"></td>
  78. <td class="border-left nutrient-balance"></td>
  79. <td class="border-left"></td>
  80. <td class="border-left"></td>
  81. <td class="border-left border-right"></td>
  82. </tr>
  83. [[!animalAnalysisCalcs? &element=`n` &nutrient=`Nitrogen` &weight=`g`]]
  84. [[!animalAnalysisCalcs? &element=`p` &nutrient=`Phosphorus` &weight=`g`]]
  85. [[!animalAnalysisCalcs? &element=`k` &nutrient=`Potassium` &weight=`g`]]
  86. [[!animalAnalysisCalcs? &element=`mg` &nutrient=`Magnesium` &weight=`g`]]
  87. [[!animalAnalysisCalcs? &element=`ca` &nutrient=`Calcium` &weight=`g`]]
  88. [[!animalAnalysisCalcs? &element=`na` &nutrient=`Sodium` &weight=`g`]]
  89. <tr>
  90. <td class="text-left border-left"></td>
  91. <td class="text-center border-left"></td>
  92. <td class="text-center border-left"></td>
  93. <td class="text-center border-left nutrient-balance"></td>
  94. <td class="text-center border-left"></td>
  95. <td class="text-center border-left"></td>
  96. <td class="text-center border-left border-right"></td>
  97. </tr>
  98. [[!animalAnalysisCalcs? &element=`fe` &nutrient=`Iron` &weight=`mg`]]
  99. [[!animalAnalysisCalcs? &element=`mn` &nutrient=`Manganese` &weight=`mg`]]
  100. [[!animalAnalysisCalcs? &element=`zn` &nutrient=`Zinc` &weight=``]]
  101. [[!animalAnalysisCalcs? &element=`cu` &nutrient=`Copper` &weight=`mg`]]
  102. [[!animalAnalysisCalcs? &element=`b` &nutrient=`Boron` &weight=`mg`]]
  103. <tr>
  104. <td class="border-bottom border-left"></td>
  105. <td class="border-bottom border-left"></td>
  106. <td class="border-bottom border-left"></td>
  107. <td class="border-bottom border-left nutrient-balance"></td>
  108. <td class="border-bottom border-left"></td>
  109. <td class="border-bottom border-left"></td>
  110. <td class="border-bottom border-left border-right"></td>
  111. </tr>
  112. [[!animalAnalysisCalcs? &element=`mo` &nutrient=`Molybdenum` &weight=`mg`]]
  113. [[!animalAnalysisCalcs? &element=`co` &nutrient=`Colbalt` &weight=`mg`]]
  114. [[!animalAnalysisCalcs? &element=`se` &nutrient=`Selenium` &weight=`mg`]]
  115. [[!animalAnalysisCalcs? &element=`ch` &nutrient=`Chloride` &weight=`g`]]
  116. <tr>
  117. <td class="border-bottom border-left"></td>
  118. <td class="border-bottom border-left"></td>
  119. <td class="border-bottom border-left"></td>
  120. <td class="border-bottom border-left nutrient-balance"></td>
  121. <td class="border-bottom border-left"></td>
  122. <td class="border-bottom border-left"></td>
  123. <td class="border-bottom border-left border-right"></td>
  124. </tr>
  125. </tbody>
  126. </table>
  127. <div class="clearfix"></div>
  128. <p>Note: The above assessment is for individual nutrient levels. The influence of nutrient interations is not considered above. Some key Nutrient Ratio Indices, which do account for these interactions, are shown below. Although based on published calculations, they should be used with caution, as metabolic disorders can be induced by a multitude of factors, and not just these nutrient rations alone.</p>
  129. <div class="clearfix"></div>
  130. [[!animalRatios]]
  131. <div class="clearfix"></div>
  132. <p>The normal range levels shown above are based on the minimum for either animal or plant requirement (which ever is the greater). The following nutrient ratio indices have been calculated as requested to assist in evaluation the sutability of ths sample as a dairy feed. Although based on published calculations, hey should be useed with caution, as metabolic disorders can be induced by a multitude of factors and not just these nutrient ratios alone.</p>
  133. <p><b>References:</b></p>
  134. <p><ul>
  135. <li>AFIA Laboratory Methods Manual v7 Appendix 2.2R(1) , p93 <a href="https://www.afia.org.au/files/pdfs/AFIA_Lab_Manual_v7.pdf">Link</a></li>
  136. <li>NRC Nutrient Requirements of Dairy Cattle. National Academy Press, Washington DC. 7th Revised Edition, 2001 <a href="#">Link</a></li>
  137. <li>Milk Production from Pasture – Principles and Practices. Massey University, NZ, 2002 <a href="#">Link</a></li>
  138. <li>Forage Evaluation in Ruminant Nutrition. CABI, Wallingford, UK, 2000<a href="https://www.researchgate.net/profile/Khalid_Hassan10/post/Can_anybody_help_with_ruminant_nutrition_textbook2/attachment/59d6393779197b80779966e8/AS%3A400869553131522%401472586157622/download/Forage+evaluation+in+Ruminant.pdf">Link</a></li>
  139. </ul></p>
  140. <div class="clearfix"></div>
  141. </div>
  142. <!--
  143. <script src="https://cloud.tinymce.com/stable/tinymce.min.js?apiKey=xcotawi18mg1imp8im144buq68h9g3ndd3c9c8215w8qu3ld"></script>
  144. <script>
  145. tinymce.init({
  146. selector: 'textarea',
  147. menubar: false,
  148. toolbar: 'bold italic | alignleft aligncenter alignright alignjustify | bullist numlist | removeformat',
  149. plugins: 'autosave',
  150. autosave_interval: '20s'
  151. });
  152. </script>
  153. -->
  154. [[$dash-footer]]
  155. <script>
  156. //https://github.com/eKoopmans/html2pdf.js
  157. $('.downloadPDF').click(function () {
  158. var element = document.getElementById('content'); //document.createElement("body");
  159. element.classList.remove('screen');
  160. element.classList.add('print');
  161. var opt = {
  162. margin: 3,
  163. filename: 'soil-analysis.pdf',
  164. image: { type: 'jpeg', quality: 1.0 },
  165. html2canvas: { scale: 2, letterRendering: true, windowWidth: 1024 }, //, windowWidth: 1024
  166. jsPDF: { orientation: 'portrait', unit: 'mm', format: 'a4', putOnlyUsedFonts: true, floatPrecision: 'smart', }
  167. };
  168. html2pdf()
  169. .from(element)
  170. .toPdf()
  171. .set(opt)
  172. .save()
  173. .then(function(){
  174. element.classList.remove('print');
  175. element.classList.add('screen');
  176. });
  177. });
  178. </script>
  179. </body>
  180. </html>