productattributevalueline_title.tpl.php 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. /* Copyright (C) 2022 Open-Dsi <support@open-dsi.fr>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  16. *
  17. * Need to have following variables defined:
  18. * $object (invoice, order, ...)
  19. * $conf
  20. * $langs
  21. * $element (used to test $user->rights->$element->creer)
  22. * $permtoedit (used to replace test $user->rights->$element->creer)
  23. * $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax)
  24. * $outputalsopricetotalwithtax
  25. * $usemargins (0 to disable all margins columns, 1 to show according to margin setup)
  26. *
  27. * $type, $text, $description, $line
  28. */
  29. // Protection to avoid direct call of template
  30. if (empty($object) || !is_object($object)) {
  31. print "Error, template page can't be called as URL";
  32. exit;
  33. }
  34. print "<!-- BEGIN PHP TEMPLATE productattributevalueline_title.tpl.php -->\n";
  35. // Title line
  36. print "<thead>\n";
  37. print '<tr class="liste_titre nodrag nodrop">';
  38. // Adds a line numbering column
  39. if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
  40. print '<td class="linecolnum center">&nbsp;</td>';
  41. }
  42. // Ref
  43. print '<td class="linecolref">'.$langs->trans('Ref').'</td>';
  44. // Value
  45. print '<td class="linecolvalue">'.$langs->trans('Value').'</td>';
  46. print '<td class="linecoledit"></td>'; // No width to allow autodim
  47. print '<td class="linecoldelete" style="width: 10px"></td>';
  48. print '<td class="linecolmove" style="width: 10px"></td>';
  49. if ($action == 'selectlines') {
  50. print '<td class="linecolcheckall center">';
  51. print '<input type="checkbox" class="linecheckboxtoggle" />';
  52. print '<script>$(document).ready(function() {$(".linecheckboxtoggle").click(function() {var checkBoxes = $(".linecheckbox");checkBoxes.prop("checked", this.checked);})});</script>';
  53. print '</td>';
  54. }
  55. print "</tr>\n";
  56. print "</thead>\n";
  57. print "<!-- END PHP TEMPLATE productattributevalueline_title.tpl.php -->\n";