dolibarr 19.0.3
objectline_view.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) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
10 * Copyright (C) 2021 Greg Rastklan <greg.rastklan@atm-consulting.fr>
11 * Copyright (C) 2021 Jean-Pascal BOUDET <jean-pascal.boudet@atm-consulting.fr>
12 * Copyright (C) 2021 Grégory BLEMAND <gregory.blemand@atm-consulting.fr>
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 3 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program. If not, see <https://www.gnu.org/licenses/>.
26 *
27 * Need to have following variables defined:
28 * $object (invoice, order, ...)
29 * $conf
30 * $langs
31 * $dateSelector
32 * $forceall (0 by default, 1 for supplier invoices/orders)
33 * $element (used to test $user->rights->$element->creer)
34 * $permtoedit (used to replace test $user->rights->$element->creer)
35 * $senderissupplier (0 by default, 1 for supplier invoices/orders)
36 * $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax)
37 * $outputalsopricetotalwithtax
38 * $usemargins (0 to disable all margins columns, 1 to show according to margin setup)
39 * $object_rights->creer initialized from = $object->getRights()
40 * $disableedit, $disablemove, $disableremove
41 *
42 * $text, $description, $line
43 */
44
45// Protection to avoid direct call of template
46if (empty($object) || !is_object($object)) {
47 print "Error, template page can't be called as URL";
48 exit;
49}
50
51global $mysoc;
52global $forceall, $senderissupplier, $inputalsopricewithtax, $outputalsopricetotalwithtax;
53
54// add html5 elements
55$domData = ' data-element="'.$line->element.'"';
56$domData .= ' data-id="'.$line->id.'"';
57$domData .= ' data-qty="'.$line->qty.'"';
58$domData .= ' data-product_type="'.$line->product_type.'"';
59
60$coldisplay = 0;
61?>
62<!-- BEGIN PHP TEMPLATE htm/core/tpl/objectline_view.tpl.php -->
63<tr id="row-<?php print $line->id?>" class="drag drop oddeven" <?php print $domData; ?> >
64<?php if (getDolGlobalString('MAIN_VIEW_LINE_NUMBER')) { ?>
65 <td class="linecolnum center"><span class="opacitymedium"><?php $coldisplay++; ?><?php print($i + 1); ?></span></td>
66<?php } ?>
67 <td class="linecollabel"><?php $coldisplay++; ?><div id="line_<?php print $line->id; ?>"></div>
68<?php
69if ($line->fk_skill > 0) {
70 $skill = new Skill($this->db);
71 $resSkill = $skill->fetch($line->fk_skill);
72 if ($resSkill > 0) {
73 print Skill::typeCodeToLabel($skill->skill_type);
74 }
75}
76?>
77 </td>
78 <td>
79<?php
80if ($line->fk_skill > 0) {
81 print $skill->getNomUrl(1);
82}
83?>
84 </td>
85
86 <td class="linecoldescription minwidth300imp"><?php $coldisplay++; ?>
87<?php
88
89// Add description in form
90if ($line->fk_skill > 0 && $resSkill > 0) {
91 //print $skill->description;
92}
93
94?>
95 </td>
96 <td class="linecolrank nowrap right"><?php $coldisplay++; ?>
97
98<?php
99 global $permissiontoadd;
100
101 // Show evaluation boxes
102 print displayRankInfos($line->rankorder, $line->fk_skill, 'TNote', ($this->status == 0 && $permissiontoadd) ? 'edit' : 'view');
103
104?>
105
106 </td>
107
108<?php
109
110if ($this->statut == 0 && !empty($object_rights->creer) && $action != 'selectlines') {
111 print '<td class="linecoledit center">';
112 $coldisplay++;
113 if (($line->info_bits & 2) == 2 || !empty($disableedit)) {
114 } else { ?>
115 <a class="editfielda reposition" href="<?php print $_SERVER["PHP_SELF"].'?id='.$this->id.'&amp;action=editline&amp;lineid='.$line->id.'#line_'.$line->id; ?>">
116 <?php print img_edit().'</a>';
117 }
118 print '</td>';
119
120 /*
121 if ($num > 1 && $conf->browser->layout != 'phone' && ($this->situation_counter == 1 || !$this->situation_cycle_ref) && empty($disablemove)) {
122 print '<td class="linecolmove tdlineupdown center">';
123 $coldisplay++;
124 if ($i > 0) { ?>
125 <a class="lineupdown" href="<?php print $_SERVER["PHP_SELF"].'?id='.$this->id.'&amp;action=up&amp;rowid='.$line->id; ?>">
126 <?php print img_up('default', 0, 'imgupforline'); ?>
127 </a>
128 <?php }
129 if ($i < $num - 1) { ?>
130 <a class="lineupdown" href="<?php print $_SERVER["PHP_SELF"].'?id='.$this->id.'&amp;action=down&amp;rowid='.$line->id; ?>">
131 <?php print img_down('default', 0, 'imgdownforline'); ?>
132 </a>
133 <?php }
134 print '</td>';
135 } else {
136 print '<td '.(($conf->browser->layout != 'phone' && empty($disablemove)) ? ' class="linecolmove tdlineupdown center"' : ' class="linecolmove center"').'></td>';
137 $coldisplay++;
138 }*/
139} else {
140 //print '<td colspan="3"></td>';
141 $coldisplay = $coldisplay + 3;
142}
143
144if ($action == 'selectlines') { ?>
145 <td class="linecolcheck center"><input type="checkbox" class="linecheckbox" name="line_checkbox[<?php print $i + 1; ?>]" value="<?php print $line->id; ?>" ></td>
146<?php }
147
148print "</tr>\n";
149
150print "<!-- END PHP TEMPLATE objectline_view.tpl.php -->\n";
Class for Skill.
static typeCodeToLabel($code)
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
img_edit($titlealt='default', $float=0, $other='')
Show logo editer/modifier fiche.
displayRankInfos($selected_rank, $fk_skill, $inputname='TNote', $mode='view')
Used to print ranks of a skill into several case, view or edit pour js necessary to select a rank.
publicphonebutton2 phonegreen basiclayout basiclayout TotalHT VATCode TotalVAT TotalLT1 TotalLT2 TotalTTC TotalHT clearboth nowraponall right right takeposterminal SELECT e e e e e statut
Definition invoice.php:1907
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
Definition repair.php:121
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:124