dolibarr 18.0.6
productattributevalueline_view.tpl.php
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 * $dateSelector
22 * $forceall (0 by default, 1 for supplier invoices/orders)
23 * $element (used to test $user->rights->$element->creer)
24 * $permtoedit (used to replace test $user->rights->$element->creer)
25 * $senderissupplier (0 by default, 1 for supplier invoices/orders)
26 * $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax)
27 * $outputalsopricetotalwithtax
28 * $usemargins (0 to disable all margins columns, 1 to show according to margin setup)
29 * $object_rights->creer initialized from = $object->getRights()
30 * $disableedit, $disablemove, $disableremove
31 *
32 * $text, $description, $line
33 */
34
35// Protection to avoid direct call of template
36if (empty($object) || !is_object($object)) {
37 print "Error, template page can't be called as URL";
38 exit;
39}
40
41// add html5 elements
42$domData = ' data-element="'.$line->element.'"';
43$domData .= ' data-id="'.$line->id.'"';
44
45$coldisplay = 0;
46?>
47<!-- BEGIN PHP TEMPLATE productattributevalueline_view.tpl.php -->
48<tr id="row-<?php print $line->id?>" class="drag drop oddeven" <?php print $domData; ?> >
49<?php if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?>
50 <td class="linecolnum center"><span class="opacitymedium"><?php $coldisplay++; ?><?php print ($i + 1); ?></span></td>
51<?php } ?>
52 <td class="linecolref nowrap"><?php $coldisplay++; ?><div id="line_<?php print $line->id; ?>"></div>
53 <?php print $line->ref ?>
54 </td>
55
56 <td class="linecolvalue nowrap"><?php $coldisplay++; print $line->value ?></td>
57<?php
58if (!empty($object_rights->write) && $action != 'selectlines') {
59 print '<td class="linecoledit center width25">';
60 $coldisplay++;
61 if (empty($disableedit)) { ?>
62 <a class="editfielda reposition" href="<?php print $_SERVER["PHP_SELF"].'?id='.$this->id.'&amp;action=editline&amp;lineid='.$line->id.'#line_'.$line->id; ?>">
63 <?php print img_edit().'</a>';
64 }
65 print '</td>';
66
67 print '<td class="linecoldelete center width25">';
68 $coldisplay++;
69 if (empty($disableremove)) { // For situation invoice, deletion is not possible if there is a parent company.
70 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$this->id.'&amp;action=ask_deleteline&amp;lineid='.$line->id.'">';
71 print img_delete();
72 print '</a>';
73 }
74 print '</td>';
75
76 if ($num > 1 && $conf->browser->layout != 'phone' && empty($disablemove)) {
77 print '<td class="linecolmove tdlineupdown center width25">';
78 $coldisplay++;
79 if ($i > 0) { ?>
80 <a class="lineupdown reposition" href="<?php print $_SERVER["PHP_SELF"].'?id='.$this->id.'&action=up&token='.newToken().'&rowid='.$line->id; ?>">
81 <?php print img_up('default', 0, 'imgupforline'); ?>
82 </a>
83 <?php }
84 if ($i < $num - 1) { ?>
85 <a class="lineupdown reposition" href="<?php print $_SERVER["PHP_SELF"].'?id='.$this->id.'&action=down&token='.newToken().'&rowid='.$line->id; ?>">
86 <?php print img_down('default', 0, 'imgdownforline'); ?>
87 </a>
88 <?php }
89 print '</td>';
90 } else {
91 print '<td '.(($conf->browser->layout != 'phone' && empty($disablemove)) ? ' class="linecolmove tdlineupdown center"' : ' class="linecolmove center"').'></td>';
92 $coldisplay++;
93 }
94} else {
95 print '<td colspan="3"></td>';
96 $coldisplay = $coldisplay + 3;
97}
98
99if ($action == 'selectlines') { ?>
100 <td class="linecolcheck center"><input type="checkbox" class="linecheckbox" name="line_checkbox[<?php print $i + 1; ?>]" value="<?php print $line->id; ?>" ></td>
101<?php }
102
103print "</tr>\n";
104
105print "<!-- END PHP TEMPLATE productattributevalueline_view.tpl.php -->\n";
img_delete($titlealt='default', $other='class="pictodelete"', $morecss='')
Show delete logo.
img_down($titlealt='default', $selected=0, $moreclass='')
Show down arrow logo.
img_edit($titlealt='default', $float=0, $other='')
Show logo editer/modifier fiche.
img_up($titlealt='default', $selected=0, $moreclass='')
Show top arrow logo.
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
Definition repair.php:120
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:123