dolibarr 23.0.3
objectline_title.tpl.php
1<?php
2/* Copyright (C) 2010-2013 Regis Houssin <regis.houssin@inodbox.com>
3 * Copyright (C) 2010-2011 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.fr>
5 * Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr>
6 * Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
7 * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
8 * Copyright (C) 2017 Juanjo Menent <jmenent@2byte.es>
9 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
10 * Copyright (C) 2025 Nick Fragoulis
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 3 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program. If not, see <https://www.gnu.org/licenses/>.
24 *
25 * Need to have the following variables defined:
26 * $object (invoice, order, ...)
27 * $conf
28 * $langs
29 * $element (used to test $user->hasRight($element, 'creer'))
30 * $permtoedit (used to replace test $user->hasRight($element, 'creer'))
31 * $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax)
32 * $outputalsopricetotalwithtax
33 * $usemargins (0 to disable all margins columns, 1 to show according to margin setup)
34 *
35 * $type, $text, $description, $line
36 */
46// Protection to avoid direct call of template
47if (empty($object) || !is_object($object)) {
48 print "Error, template page can't be called as URL";
49 exit(1);
50}
51
52'@phan-var-force CommonObject $this
53 @phan-var-force CommonObject $object';
54
55global $filtertype;
56if (empty($filtertype)) {
57 $filtertype = 0;
58}
59
60print "<!-- BEGIN PHP TEMPLATE expedition/tpl/objectline_title.tpl.php -->\n";
61
62
63// Title line
64print "<thead>\n";
65
66print '<tr class="liste_titre nodrag nodrop">';
67
68// Adds a line numbering column
69if (getDolGlobalString('MAIN_VIEW_LINE_NUMBER')) {
70 print '<td class="linecolnum center">&nbsp;</td>';
71}
72
73// Product
74print '<th class="linecoldescription">'.$langs->trans('Description');
75
76// Qty
77print '<th class="linecolqty right">'.$langs->trans('Qty').'</th>';
78
79
80// Unit
81if (getDolGlobalString('PRODUCT_USE_UNITS')) {
82 print '<th class="linecoluseunit left">'.$langs->trans('Unit').'</th>';
83}
84
85print '<td class="linecoledit" style="width: 10px"></td>'; // No width to allow autodim
86
87print '<td class="linecoldelete" style="width: 10px"></td>';
88
89print '<td class="linecolmove" style="width: 10px"></td>';
90
91if ($action == 'selectlines') {
92 print '<td class="linecolcheckall center">';
93 print '<input type="checkbox" class="linecheckboxtoggle" />';
94 print '<script>$(document).ready(function() {$(".linecheckboxtoggle").click(function() {var checkBoxes = $(".linecheckbox");checkBoxes.prop("checked", this.checked);})});</script>';
95 print '</td>';
96}
97
98print "</tr>\n";
99print "</thead>\n";
100
101print "<!-- END PHP TEMPLATE objectline_title.tpl.php -->\n";
if(! $sortfield) if(! $sortorder) $object
Definition account.php:100
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.