1<!-- file list-titles.tpl.php -->
7 print
"Error, template page can't be called as URL";
10'@phan-var-force Context $context';
11'@phan-var-force AbstractListController $this';
21$formList = &$this->formList;
24$url .= (preg_match(
'/\?/', $url) ?
'&' :
'?') . preg_replace(
'/^(&|&)/i',
'', $formList->params);
27$sortList = array_combine(explode(
",", $formList->sortfield), explode(
",", $formList->sortorder));
29$formList->nbColumn = 0;
33<!-- Fields title label -->
35 <th data-col=
"row-checkbox"></th>
36 <?php $formList->nbColumn++ ?>
38 <?php
foreach ($formList->object->fields as $key => $val) {
39 $alias = $val[
'alias'] ??
't.';
40 if (array_key_exists($alias . $key, $formList->arrayfields) && !empty($formList->arrayfields[$alias . $key][
'checked'])) {
41 $order = array_key_exists($alias . $key, $sortList) ? strtolower(trim($sortList[$alias . $key])) :
'';
42 $link_url = $url .
'&sortfield=' . urlencode($alias . $key) .
'&sortorder=' . ($order ==
'desc' ?
'asc' :
'desc');
43 $cssforfield = $formList->getClasseCssList($key, $val);
44 $cssforfield = preg_replace(
'/small\s*/',
'', $cssforfield);
46 <th <?php print empty($cssforfield) ?
'' :
'class="' .
dolPrintHTMLForAttribute($cssforfield) .
'" ' ?>data-col=
"<?php print dolPrintHTMLForAttribute((string) $key) ?>" scope=
"col"<?php print (!empty($order) ?
' table-order="' .
dolPrintHTMLForAttribute($order) .
'"' :
'') ?>>
47 <a href=
"<?php print dolPrintHTMLForAttribute($link_url) ?>"><?php print $langs->trans((string) $formList->arrayfields[$alias . $key][
'label']) ?></a>
49 <?php $formList->nbColumn++;
54 $parameters = array(
'sortList' => $sortList);
55 $reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters,
$context);
56 print $hookmanager->resPrint;
59 if (array_key_exists(
'remain_to_pay', $formList->arrayfields) && !empty($formList->arrayfields[
'remain_to_pay'][
'checked'])) { ?>
60 <th scope=
"col"><?php print $langs->trans((
string) $formList->arrayfields[
'remain_to_pay'][
'label']) ?></th>
61 <?php $formList->nbColumn++;
65 if (array_key_exists(
'download_link', $formList->arrayfields) && !empty($formList->arrayfields[
'download_link'][
'checked'])) { ?>
66 <th scope=
"col"><?php print $langs->trans((
string) $formList->arrayfields[
'download_link'][
'label']) ?></th>
67 <?php $formList->nbColumn++;
71 if (array_key_exists(
'signature_link', $formList->arrayfields) && !empty($formList->arrayfields[
'signature_link'][
'checked'])) { ?>
72 <th scope=
"col"><?php print $langs->trans((
string) $formList->arrayfields[
'signature_link'][
'label']) ?></th>
73 <?php $formList->nbColumn++;
dolPrintHTMLForAttribute($s, $escapeonlyhtmltags=0, $allowothertags=array())
Return a string ready to be output into an HTML attribute (alt, title, data-html, ....
$context
@method int call_trigger(string $triggerName, ?User $user)