28 if (empty($langs) || !is_object($langs))
30 print "Error, template page can't be called as URL";
35 $langs->load(
"modulebuilder");
39 <!-- BEGIN PHP TEMPLATE admin_extrafields_view.tpl.php -->
42 print '<span class="opacitymedium">'.$langs->trans(
"DefineHereComplementaryAttributes", $textobject).
'</span><br>'.
"\n";
46 $extrafields->fetch_name_optionals_label($elementtype);
48 print '<div class="div-table-responsive">';
49 print '<table summary="listofattributes" class="noborder centpercent">';
51 print '<tr class="liste_titre">';
52 print '<td class="left">'.$langs->trans(
"Position");
53 print '<span class="nowrap">';
57 print '<td>'.$langs->trans(
"LabelOrTranslationKey").
'</td>';
58 print '<td>'.$langs->trans(
"TranslationString").
'</td>';
59 print '<td>'.$langs->trans(
"AttributeCode").
'</td>';
60 print '<td>'.$langs->trans(
"Type").
'</td>';
61 print '<td class="right">'.$langs->trans(
"Size").
'</td>';
62 print '<td>'.$langs->trans(
"ComputedFormula").
'</td>';
63 print '<td class="center">'.$langs->trans(
"Unique").
'</td>';
64 print '<td class="center">'.$langs->trans(
"Required").
'</td>';
65 print '<td class="center">'.$langs->trans(
"AlwaysEditable").
'</td>';
66 print '<td class="center">'.$form->textwithpicto($langs->trans(
"Visible"), $langs->trans(
"VisibleDesc")).
'</td>';
67 print '<td class="center">'.$form->textwithpicto($langs->trans(
"DisplayOnPdf"), $langs->trans(
"DisplayOnPdfDesc")).
'</td>';
68 print '<td class="center">'.$form->textwithpicto($langs->trans(
"Totalizable"), $langs->trans(
"TotalizableDesc")).
'</td>';
69 if ($conf->multicompany->enabled) {
70 print '<td class="center">'.$langs->trans(
"Entities").
'</td>';
72 print '<td width="80"> </td>';
75 if (is_array($extrafields->attributes[$elementtype][
'type']) && count($extrafields->attributes[$elementtype][
'type']))
77 foreach ($extrafields->attributes[$elementtype][
'type'] as $key => $value)
85 if (!empty($extrafields->attributes[$elementtype][
'langfile'][$key])) {
86 $langs->load($extrafields->attributes[$elementtype][
'langfile'][$key]);
89 print '<tr class="oddeven">';
90 print "<td>".$extrafields->attributes[$elementtype][
'pos'][$key].
"</td>\n";
91 print "<td>".$extrafields->attributes[$elementtype][
'label'][$key].
"</td>\n";
92 print "<td>".$langs->trans($extrafields->attributes[$elementtype][
'label'][$key]).
"</td>\n";
93 print "<td>".$key.
"</td>\n";
94 print "<td>".$type2label[$extrafields->attributes[$elementtype][
'type'][$key]].
"</td>\n";
95 print '<td class="right">'.$extrafields->attributes[$elementtype][
'size'][$key].
"</td>\n";
96 print '<td>'.dol_trunc($extrafields->attributes[$elementtype][
'computed'][$key], 20).
"</td>\n";
97 print '<td class="center">'.yn($extrafields->attributes[$elementtype][
'unique'][$key]).
"</td>\n";
98 print '<td class="center">'.yn($extrafields->attributes[$elementtype][
'required'][$key]).
"</td>\n";
99 print '<td class="center">'.yn($extrafields->attributes[$elementtype][
'alwayseditable'][$key]).
"</td>\n";
100 print '<td class="center">'.$extrafields->attributes[$elementtype][
'list'][$key].
"</td>\n";
101 print '<td class="center">'.$extrafields->attributes[$elementtype][
'printable'][$key].
"</td>\n";
102 print '<td class="center">'.yn($extrafields->attributes[$elementtype][
'totalizable'][$key]).
"</td>\n";
103 if (!empty($conf->multicompany->enabled)) {
104 print '<td class="center">';
105 if (empty($extrafields->attributes[$elementtype][
'entityid'][$key]))
107 print $langs->trans(
"All");
109 global $multicompanylabel_cache;
110 if (!is_array($multicompanylabel_cache)) $multicompanylabel_cache = array();
111 if (empty($multicompanylabel_cache[$extrafields->attributes[$elementtype][
'entityid'][$key]])) {
113 $mc->getInfo($extrafields->attributes[$elementtype][
'entityid'][$key]);
114 $multicompanylabel_cache[$extrafields->attributes[$elementtype][
'entityid'][$key]] = $mc->label ? $mc->label : $extrafields->attributes[$elementtype][
'entityid'][$key];
116 print $multicompanylabel_cache[$extrafields->attributes[$elementtype][
'entityid'][$key]];
120 print '<td class="right nowraponall"><a class="editfielda" href="'.$_SERVER[
"PHP_SELF"].
'?action=edit&token='.
newToken().
'&attrname='.$key.
'#formeditextrafield">'.
img_edit().
'</a>';
121 print ' <a class="paddingleft" href="'.$_SERVER[
"PHP_SELF"].
'?action=delete&token='.
newToken().
'&attrname='.$key.
'">'.
img_delete().
'</a></td>'.
"\n";
126 if (!empty($conf->multicompany->enabled)) $colspan++;
128 print '<tr class="oddeven">';
129 print '<td class="opacitymedium" colspan="'.$colspan.
'">';
130 print $langs->trans(
"None");
138 <!-- END PHP TEMPLATE admin_extrafields_view.tpl.php -->
img_edit($titlealt= 'default', $float=0, $other= '')
Show logo editer/modifier fiche.
img_picto($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt= '', $morecss= '', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
print
Draft customers invoices.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
img_delete($titlealt= 'default', $other= 'class="pictodelete"', $morecss= '')
Show delete logo.