dolibarr 23.0.3
skilldet.fiche.tpl.php
1<?php
2/* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
3 * Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 */
18
35// Protection to avoid direct call of template
36if (empty($conf) || !is_object($conf)) {
37 print "Error, template page can't be called as URL";
38 exit(1);
39}
40
41if (!empty($object->table_element_line)) {
42 // Show object lines
43 $result = $object->getLinesArray();
44}
45
46// Supposed provided before includion of the tpl
47'
48@phan-var-force string $note_public
49@phan-var-force string $note_private
50@phan-var-force int $colwidth
51@phan-var-force string $moreparam
52@phan-var-force int $permission
53@phan-var-force string $typeofdata
54@phan-var-force string $value_public
55@phan-var-force string $value_private
56';
57
58
59print '<!-- BEGIN PHP TEMPLATE hrm/core/tpl/skilldet.fiche.tpl.php -->'."\n";
60
61print '<div class="tagtable border table-border tableforfield centpercent">'."\n";
62print '<div class="tagtr table-border-row">'."\n";
63$editmode = (GETPOST('action', 'aZ09') == 'edit'.$note_public);
64print '<div class="tagtd tagtdnote tdtop'.($editmode ? '' : ' sensiblehtmlcontent').' table-key-border-col'.(empty($cssclass) ? '' : ' '.$cssclass).'"'.($colwidth ? ' style="width: '.$colwidth.'%"' : '').'>'."\n";
65print $form->editfieldkey("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, $moreparam, 0, 0);
66print '</div>'."\n";
67print '<div class="tagtd wordbreak table-val-border-col'.($editmode ? '' : ' sensiblehtmlcontent').'">'."\n";
68print $form->editfieldval("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, '', null, null, $moreparam, 1)."\n";
69print '</div>'."\n";
70print '</div>'."\n";
71if (empty($user->socid)) {
72 // Private notes (always hidden to external users)
73 print '<div class="tagtr table-border-row">'."\n";
74 $editmode = (GETPOST('action', 'aZ09') == 'edit'.$note_private);
75 print '<div class="tagtd tagtdnote tdtop'.($editmode ? '' : ' sensiblehtmlcontent').' table-key-border-col'.(empty($cssclass) ? '' : ' '.$cssclass).'"'.($colwidth ? ' style="width: '.$colwidth.'%"' : '').'>'."\n";
76 print $form->editfieldkey("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, $moreparam, 0, 0);
77 print '</div>'."\n";
78 print '<div class="tagtd wordbreak table-val-border-col'.($editmode ? '' : ' sensiblehtmlcontent').'">'."\n";
79 print $form->editfieldval("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, '', null, null, $moreparam, 1);
80 print '</div>'."\n";
81 print '</div>'."\n";
82}
83print '</div>'."\n";
84?>
85<!-- END PHP TEMPLATE NOTES-->
if(! $sortfield) if(! $sortorder) $object
Definition account.php:100
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.