Current File : /home/escuelai/public_html/it/files/_cache/templates/4f/4f6757dd420aba6836d3be1a155be932.php |
<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* components/search/table.html.twig */
class __TwigTemplate_ec9584975dbfd8fca9430e3b7c9530be extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
// line 33
echo "
";
// line 34
$context["searchform_id"] = ((twig_get_attribute($this->env, $this->source, ($context["data"] ?? null), "searchform_id", [], "array", true, true, false, 34)) ? (_twig_default_filter((($__internal_compile_0 = ($context["data"] ?? null)) && is_array($__internal_compile_0) || $__internal_compile_0 instanceof ArrayAccess ? ($__internal_compile_0["searchform_id"] ?? null) : null), ("search_" . ($context["rand"] ?? null)))) : (("search_" . ($context["rand"] ?? null))));
// line 35
echo "
<div class=\"table-responsive-lg\">
<table class=\"search-results table card-table table-hover ";
// line 37
echo (((($__internal_compile_1 = (($__internal_compile_2 = ($context["data"] ?? null)) && is_array($__internal_compile_2) || $__internal_compile_2 instanceof ArrayAccess ? ($__internal_compile_2["search"] ?? null) : null)) && is_array($__internal_compile_1) || $__internal_compile_1 instanceof ArrayAccess ? ($__internal_compile_1["is_deleted"] ?? null) : null)) ? ("table-danger deleted-results") : ("table-striped"));
echo "\"
id=\"";
// line 38
echo twig_escape_filter($this->env, ($context["searchform_id"] ?? null), "html", null, true);
echo "\">
<thead>
<tr ";
// line 40
if ((($context["count"] ?? null) == 0)) {
echo "style=\"display: none;\"";
}
echo ">
";
// line 41
if (($context["showmassiveactions"] ?? null)) {
// line 42
echo " <th style=\"width: 30px;\">
<div>
<input class=\"form-check-input\" type=\"checkbox\" id=\"checkall_";
// line 44
echo twig_escape_filter($this->env, ($context["rand"] ?? null), "html", null, true);
echo "\"
value=\"\" aria-label=\"";
// line 45
echo twig_escape_filter($this->env, __("Check all as"), "html", null, true);
echo "\"
onclick=\"checkAsCheckboxes(this, '";
// line 46
echo twig_escape_filter($this->env, ($context["searchform_id"] ?? null), "html", null, true);
echo "');\" />
</div>
</th>
";
}
// line 50
echo "
";
// line 51
$context["sorts"] = (($__internal_compile_3 = (($__internal_compile_4 = ($context["data"] ?? null)) && is_array($__internal_compile_4) || $__internal_compile_4 instanceof ArrayAccess ? ($__internal_compile_4["search"] ?? null) : null)) && is_array($__internal_compile_3) || $__internal_compile_3 instanceof ArrayAccess ? ($__internal_compile_3["sort"] ?? null) : null);
// line 52
echo "
";
// line 53
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((($__internal_compile_5 = (($__internal_compile_6 = ($context["data"] ?? null)) && is_array($__internal_compile_6) || $__internal_compile_6 instanceof ArrayAccess ? ($__internal_compile_6["data"] ?? null) : null)) && is_array($__internal_compile_5) || $__internal_compile_5 instanceof ArrayAccess ? ($__internal_compile_5["cols"] ?? null) : null));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["col"]) {
// line 54
echo " ";
// line 55
echo " ";
$context["linkto"] = "";
// line 56
echo " ";
$context["so_no_sort"] = (((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["col"], "searchopt", [], "array", false, true, false, 56), "nosort", [], "array", true, true, false, 56) && !(null === (($__internal_compile_7 = twig_get_attribute($this->env, $this->source, $context["col"], "searchopt", [], "array", false, true, false, 56)) && is_array($__internal_compile_7) || $__internal_compile_7 instanceof ArrayAccess ? ($__internal_compile_7["nosort"] ?? null) : null)))) ? ((($__internal_compile_8 = twig_get_attribute($this->env, $this->source, $context["col"], "searchopt", [], "array", false, true, false, 56)) && is_array($__internal_compile_8) || $__internal_compile_8 instanceof ArrayAccess ? ($__internal_compile_8["nosort"] ?? null) : null)) : (false));
// line 57
echo " ";
$context["meta"] = (((twig_get_attribute($this->env, $this->source, $context["col"], "meta", [], "array", true, true, false, 57) && !(null === (($__internal_compile_9 = $context["col"]) && is_array($__internal_compile_9) || $__internal_compile_9 instanceof ArrayAccess ? ($__internal_compile_9["meta"] ?? null) : null)))) ? ((($__internal_compile_10 = $context["col"]) && is_array($__internal_compile_10) || $__internal_compile_10 instanceof ArrayAccess ? ($__internal_compile_10["meta"] ?? null) : null)) : (false));
// line 58
echo " ";
$context["sort_order"] = "nosort";
// line 59
echo " ";
$context["sort_num"] = "";
// line 60
echo " ";
$context["can_sort"] = (( !($context["meta"] ?? null) && !($context["no_sort"] ?? null)) && !($context["so_no_sort"] ?? null));
// line 61
echo " ";
if (($context["can_sort"] ?? null)) {
// line 62
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(($context["sorts"] ?? null));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["sort_opt"]) {
// line 63
echo " ";
if (($context["sort_opt"] == (($__internal_compile_11 = $context["col"]) && is_array($__internal_compile_11) || $__internal_compile_11 instanceof ArrayAccess ? ($__internal_compile_11["id"] ?? null) : null))) {
// line 64
echo " ";
$context["sort_order"] = ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["data"] ?? null), "search", [], "array", false, true, false, 64), "order", [], "array", false, true, false, 64), twig_get_attribute($this->env, $this->source, $context["loop"], "index0", [], "any", false, false, false, 64), [], "array", true, true, false, 64)) ? (_twig_default_filter((($__internal_compile_12 = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["data"] ?? null), "search", [], "array", false, true, false, 64), "order", [], "array", false, true, false, 64)) && is_array($__internal_compile_12) || $__internal_compile_12 instanceof ArrayAccess ? ($__internal_compile_12[twig_get_attribute($this->env, $this->source, $context["loop"], "index0", [], "any", false, false, false, 64)] ?? null) : null), "ASC")) : ("ASC"));
// line 65
echo " ";
$context["sort_num"] = twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 65);
// line 66
echo " ";
}
// line 67
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['sort_opt'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 68
echo " ";
}
// line 69
echo "
";
// line 70
$context["col_name"] = (($__internal_compile_13 = $context["col"]) && is_array($__internal_compile_13) || $__internal_compile_13 instanceof ArrayAccess ? ($__internal_compile_13["name"] ?? null) : null);
// line 71
echo " ";
// line 72
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["col"], "groupname", [], "array", true, true, false, 72)) {
// line 73
echo " ";
$context["groupname"] = (((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["col"], "groupname", [], "array", false, true, false, 73), "name", [], "array", true, true, false, 73) && !(null === (($__internal_compile_14 = twig_get_attribute($this->env, $this->source, $context["col"], "groupname", [], "array", false, true, false, 73)) && is_array($__internal_compile_14) || $__internal_compile_14 instanceof ArrayAccess ? ($__internal_compile_14["name"] ?? null) : null)))) ? ((($__internal_compile_15 = twig_get_attribute($this->env, $this->source, $context["col"], "groupname", [], "array", false, true, false, 73)) && is_array($__internal_compile_15) || $__internal_compile_15 instanceof ArrayAccess ? ($__internal_compile_15["name"] ?? null) : null)) : ((($__internal_compile_16 = $context["col"]) && is_array($__internal_compile_16) || $__internal_compile_16 instanceof ArrayAccess ? ($__internal_compile_16["groupname"] ?? null) : null)));
// line 74
echo " ";
$context["col_name"] = twig_sprintf(__("%1\$s - %2\$s"), ($context["groupname"] ?? null), (($__internal_compile_17 = $context["col"]) && is_array($__internal_compile_17) || $__internal_compile_17 instanceof ArrayAccess ? ($__internal_compile_17["name"] ?? null) : null));
// line 75
echo " ";
}
// line 76
echo "
";
// line 78
echo " ";
if (( !($context["itemtype"] ?? null) == (($__internal_compile_18 = $context["col"]) && is_array($__internal_compile_18) || $__internal_compile_18 instanceof ArrayAccess ? ($__internal_compile_18["itemtype"] ?? null) : null))) {
// line 79
echo " ";
$context["col_name"] = twig_sprintf(__("%1\$s - %2\$s"), $this->extensions['Glpi\Application\View\Extension\ItemtypeExtension']->getItemtypeName((($__internal_compile_19 = $context["col"]) && is_array($__internal_compile_19) || $__internal_compile_19 instanceof ArrayAccess ? ($__internal_compile_19["itemtype"] ?? null) : null)), ($context["col_name"] ?? null));
// line 80
echo " ";
}
// line 81
echo "
<th data-searchopt-id=\"";
// line 82
echo twig_escape_filter($this->env, (($__internal_compile_20 = $context["col"]) && is_array($__internal_compile_20) || $__internal_compile_20 instanceof ArrayAccess ? ($__internal_compile_20["id"] ?? null) : null), "html", null, true);
echo "\" ";
if ( !($context["can_sort"] ?? null)) {
echo "data-nosort=\"true\"";
}
echo " data-sort-order=\"";
echo twig_escape_filter($this->env, ($context["sort_order"] ?? null), "html", null, true);
echo "\"
";
// line 83
if ( !twig_test_empty(($context["sort_num"] ?? null))) {
echo "data-sort-num=\"";
echo twig_escape_filter($this->env, (($context["sort_num"] ?? null) - 1), "html", null, true);
echo "\"";
}
echo ">
";
// line 84
$context["sort_icon"] = (((($context["sort_order"] ?? null) == "ASC")) ? ("fas fa-sort-up") : ((((($context["sort_order"] ?? null) == "DESC")) ? ("fas fa-sort-down") : (""))));
// line 85
echo " ";
echo twig_escape_filter($this->env, ($context["col_name"] ?? null), "html", null, true);
echo "
";
// line 86
if (($context["can_sort"] ?? null)) {
// line 87
echo " <span class=\"sort-indicator\"><i class=\"";
echo twig_escape_filter($this->env, ($context["sort_icon"] ?? null), "html", null, true);
echo "\"></i><span class=\"sort-num\">";
(((twig_length_filter($this->env, ($context["sorts"] ?? null)) > 1)) ? (print (twig_escape_filter($this->env, ($context["sort_num"] ?? null), "html", null, true))) : (print ("")));
echo "</span></span>
";
}
// line 89
echo " </th>
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['col'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 91
echo "
";
// line 93
echo " ";
if (twig_get_attribute($this->env, $this->source, ($context["union_search_type"] ?? null), ($context["itemtype"] ?? null), [], "array", true, true, false, 93)) {
// line 94
echo " <th>
";
// line 95
echo twig_escape_filter($this->env, __("Item type"), "html", null, true);
echo "
</th>
";
}
// line 98
echo " </tr>
</thead>
<tbody>
";
// line 101
if ((($context["count"] ?? null) == 0)) {
// line 102
echo " <tr>
<td colspan=\"";
// line 103
echo twig_escape_filter($this->env, twig_length_filter($this->env, (($__internal_compile_21 = (($__internal_compile_22 = ($context["data"] ?? null)) && is_array($__internal_compile_22) || $__internal_compile_22 instanceof ArrayAccess ? ($__internal_compile_22["data"] ?? null) : null)) && is_array($__internal_compile_21) || $__internal_compile_21 instanceof ArrayAccess ? ($__internal_compile_21["cols"] ?? null) : null)), "html", null, true);
echo "\">
<div class=\"alert alert-info mb-0 rounded-0 border-top-0 border-bottom-0 border-right-0\" role=\"alert\">
";
// line 105
echo twig_escape_filter($this->env, __("No item found"), "html", null, true);
echo "
</div>
</td>
</tr>
";
} else {
// line 110
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((($__internal_compile_23 = (($__internal_compile_24 = ($context["data"] ?? null)) && is_array($__internal_compile_24) || $__internal_compile_24 instanceof ArrayAccess ? ($__internal_compile_24["data"] ?? null) : null)) && is_array($__internal_compile_23) || $__internal_compile_23 instanceof ArrayAccess ? ($__internal_compile_23["rows"] ?? null) : null));
foreach ($context['_seq'] as $context["rowkey"] => $context["row"]) {
// line 111
echo " <tr>
";
// line 112
if (($context["showmassiveactions"] ?? null)) {
// line 113
echo " <td>
<div>
";
// line 116
echo " ";
if (((($context["itemtype"] ?? null) == "Entity") && !Session::haveAccessToEntity((($__internal_compile_25 = $context["row"]) && is_array($__internal_compile_25) || $__internal_compile_25 instanceof ArrayAccess ? ($__internal_compile_25["id"] ?? null) : null)))) {
// line 117
echo " ";
} elseif ((((($context["itemtype"] ?? null) == "User") && !Session::canViewAllEntities()) && !$this->extensions['Glpi\Application\View\Extension\SessionExtension']->hasAccessToUserEntities((($__internal_compile_26 = $context["row"]) && is_array($__internal_compile_26) || $__internal_compile_26 instanceof ArrayAccess ? ($__internal_compile_26["id"] ?? null) : null)))) {
// line 118
echo " ";
} elseif ((($this->extensions['Glpi\Application\View\Extension\PhpExtension']->isInstanceOf(($context["item"] ?? null), "CommonDBTM") && twig_get_attribute($this->env, $this->source, ($context["item"] ?? null), "maybeRecursive", [], "method", false, false, false, 118)) && !Session::haveAccessToEntity((($__internal_compile_27 = $context["row"]) && is_array($__internal_compile_27) || $__internal_compile_27 instanceof ArrayAccess ? ($__internal_compile_27["entities_id"] ?? null) : null)))) {
// line 119
echo " ";
} else {
// line 120
echo " ";
$context["checked"] = (((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $this->extensions['Glpi\Application\View\Extension\SessionExtension']->session("glpimassiveactionselected"), ($context["itemtype"] ?? null), [], "array", false, true, false, 120), (($__internal_compile_28 = $context["row"]) && is_array($__internal_compile_28) || $__internal_compile_28 instanceof ArrayAccess ? ($__internal_compile_28["id"] ?? null) : null), [], "array", true, true, false, 120) && !(null === (($__internal_compile_29 = twig_get_attribute($this->env, $this->source, $this->extensions['Glpi\Application\View\Extension\SessionExtension']->session("glpimassiveactionselected"), ($context["itemtype"] ?? null), [], "array", false, true, false, 120)) && is_array($__internal_compile_29) || $__internal_compile_29 instanceof ArrayAccess ? ($__internal_compile_29[(($__internal_compile_30 = $context["row"]) && is_array($__internal_compile_30) || $__internal_compile_30 instanceof ArrayAccess ? ($__internal_compile_30["id"] ?? null) : null)] ?? null) : null)))) ? ((($__internal_compile_31 = twig_get_attribute($this->env, $this->source, $this->extensions['Glpi\Application\View\Extension\SessionExtension']->session("glpimassiveactionselected"), ($context["itemtype"] ?? null), [], "array", false, true, false, 120)) && is_array($__internal_compile_31) || $__internal_compile_31 instanceof ArrayAccess ? ($__internal_compile_31[(($__internal_compile_32 = $context["row"]) && is_array($__internal_compile_32) || $__internal_compile_32 instanceof ArrayAccess ? ($__internal_compile_32["id"] ?? null) : null)] ?? null) : null)) : (false));
// line 121
echo " <input class=\"form-check-input\" type=\"checkbox\" data-glpicore-ma-tags=\"common\"
value=\"1\" aria-label=\"\" ";
// line 122
if (($context["checked"] ?? null)) {
echo "checked=\"checked\"";
}
// line 123
echo " name=\"item[";
echo twig_escape_filter($this->env, (((twig_get_attribute($this->env, $this->source, $context["row"], "TYPE", [], "array", true, true, false, 123) && !(null === (($__internal_compile_33 = $context["row"]) && is_array($__internal_compile_33) || $__internal_compile_33 instanceof ArrayAccess ? ($__internal_compile_33["TYPE"] ?? null) : null)))) ? ((($__internal_compile_34 = $context["row"]) && is_array($__internal_compile_34) || $__internal_compile_34 instanceof ArrayAccess ? ($__internal_compile_34["TYPE"] ?? null) : null)) : (($context["itemtype"] ?? null))), "html", null, true);
echo "][";
echo twig_escape_filter($this->env, (($__internal_compile_35 = $context["row"]) && is_array($__internal_compile_35) || $__internal_compile_35 instanceof ArrayAccess ? ($__internal_compile_35["id"] ?? null) : null), "html", null, true);
echo "]\" />
";
}
// line 125
echo " </div>
</td>
";
}
// line 128
echo "
";
// line 129
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((($__internal_compile_36 = (($__internal_compile_37 = ($context["data"] ?? null)) && is_array($__internal_compile_37) || $__internal_compile_37 instanceof ArrayAccess ? ($__internal_compile_37["data"] ?? null) : null)) && is_array($__internal_compile_36) || $__internal_compile_36 instanceof ArrayAccess ? ($__internal_compile_36["cols"] ?? null) : null));
foreach ($context['_seq'] as $context["_key"] => $context["col"]) {
// line 130
echo " ";
$context["colkey"] = (((($__internal_compile_38 = $context["col"]) && is_array($__internal_compile_38) || $__internal_compile_38 instanceof ArrayAccess ? ($__internal_compile_38["itemtype"] ?? null) : null) . "_") . (($__internal_compile_39 = $context["col"]) && is_array($__internal_compile_39) || $__internal_compile_39 instanceof ArrayAccess ? ($__internal_compile_39["id"] ?? null) : null));
// line 131
echo " ";
// line 132
echo " ";
echo $this->extensions['Glpi\Application\View\Extension\SearchExtension']->showItem(0, (($__internal_compile_40 = (($__internal_compile_41 = $context["row"]) && is_array($__internal_compile_41) || $__internal_compile_41 instanceof ArrayAccess ? ($__internal_compile_41[($context["colkey"] ?? null)] ?? null) : null)) && is_array($__internal_compile_40) || $__internal_compile_40 instanceof ArrayAccess ? ($__internal_compile_40["displayname"] ?? null) : null), 0, 0, $this->extensions['Glpi\Application\View\Extension\PhpExtension']->call("Search::displayConfigItem", [0 => ($context["itemtype"] ?? null), 1 => (($__internal_compile_42 = $context["col"]) && is_array($__internal_compile_42) || $__internal_compile_42 instanceof ArrayAccess ? ($__internal_compile_42["id"] ?? null) : null), 2 => $context["row"]]));
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['col'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 134
echo "
";
// line 136
echo " ";
if (twig_get_attribute($this->env, $this->source, ($context["union_search_type"] ?? null), ($context["itemtype"] ?? null), [], "array", true, true, false, 136)) {
// line 137
echo " <td>
";
// line 138
echo twig_escape_filter($this->env, $this->extensions['Glpi\Application\View\Extension\ItemtypeExtension']->getItemtypeName((($__internal_compile_43 = $context["row"]) && is_array($__internal_compile_43) || $__internal_compile_43 instanceof ArrayAccess ? ($__internal_compile_43["TYPE"] ?? null) : null)), "html", null, true);
echo "
</td>
";
}
// line 141
echo " </tr>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['rowkey'], $context['row'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 143
echo " ";
}
// line 144
echo " </tbody>
</table>
</div>
";
}
public function getTemplateName()
{
return "components/search/table.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 394 => 144, 391 => 143, 384 => 141, 378 => 138, 375 => 137, 372 => 136, 369 => 134, 360 => 132, 358 => 131, 355 => 130, 351 => 129, 348 => 128, 343 => 125, 335 => 123, 331 => 122, 328 => 121, 325 => 120, 322 => 119, 319 => 118, 316 => 117, 313 => 116, 309 => 113, 307 => 112, 304 => 111, 299 => 110, 291 => 105, 286 => 103, 283 => 102, 281 => 101, 276 => 98, 270 => 95, 267 => 94, 264 => 93, 261 => 91, 246 => 89, 238 => 87, 236 => 86, 231 => 85, 229 => 84, 221 => 83, 211 => 82, 208 => 81, 205 => 80, 202 => 79, 199 => 78, 196 => 76, 193 => 75, 190 => 74, 187 => 73, 184 => 72, 182 => 71, 180 => 70, 177 => 69, 174 => 68, 160 => 67, 157 => 66, 154 => 65, 151 => 64, 148 => 63, 130 => 62, 127 => 61, 124 => 60, 121 => 59, 118 => 58, 115 => 57, 112 => 56, 109 => 55, 107 => 54, 90 => 53, 87 => 52, 85 => 51, 82 => 50, 75 => 46, 71 => 45, 67 => 44, 63 => 42, 61 => 41, 55 => 40, 50 => 38, 46 => 37, 42 => 35, 40 => 34, 37 => 33,);
}
public function getSourceContext()
{
return new Source("{#
# ---------------------------------------------------------------------
#
# GLPI - Gestionnaire Libre de Parc Informatique
#
# http://glpi-project.org
#
# @copyright 2015-2022 Teclib' and contributors.
# @copyright 2003-2014 by the INDEPNET Development Team.
# @licence https://www.gnu.org/licenses/gpl-3.0.html
#
# ---------------------------------------------------------------------
#
# LICENSE
#
# This file is part of GLPI.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# ---------------------------------------------------------------------
#}
{% set searchform_id = data['searchform_id']|default('search_' ~ rand) %}
<div class=\"table-responsive-lg\">
<table class=\"search-results table card-table table-hover {{ data['search']['is_deleted'] ? \"table-danger deleted-results\" : \"table-striped\" }}\"
id=\"{{ searchform_id }}\">
<thead>
<tr {% if count == 0 %}style=\"display: none;\"{% endif %}>
{% if showmassiveactions %}
<th style=\"width: 30px;\">
<div>
<input class=\"form-check-input\" type=\"checkbox\" id=\"checkall_{{ rand }}\"
value=\"\" aria-label=\"{{ __('Check all as') }}\"
onclick=\"checkAsCheckboxes(this, '{{ searchform_id }}');\" />
</div>
</th>
{% endif %}
{% set sorts = data['search']['sort'] %}
{% for col in data['data']['cols'] %}
{# construct header link (for sorting) #}
{% set linkto = '' %}
{% set so_no_sort = col['searchopt']['nosort'] ?? false %}
{% set meta = col['meta'] ?? false %}
{% set sort_order = 'nosort' %}
{% set sort_num = '' %}
{% set can_sort = not meta and not no_sort and not so_no_sort %}
{% if can_sort %}
{% for sort_opt in sorts %}
{% if sort_opt == col['id'] %}
{% set sort_order = data['search']['order'][loop.index0]|default('ASC') %}
{% set sort_num = loop.index %}
{% endif %}
{% endfor %}
{% endif %}
{% set col_name = col['name'] %}
{# prefix by group name (corresponding to optgroup in dropdown) if exists #}
{% if col['groupname'] is defined %}
{% set groupname = (col['groupname']['name'] ?? col['groupname']) %}
{% set col_name = __('%1\$s - %2\$s')|format(groupname, col['name']) %}
{% endif %}
{# Not main itemtype, prefix col_name by secondary itemtype #}
{% if not itemtype == col['itemtype'] %}
{% set col_name = __('%1\$s - %2\$s')|format(col['itemtype']|itemtype_name, col_name) %}
{% endif %}
<th data-searchopt-id=\"{{ col['id'] }}\" {% if not can_sort %}data-nosort=\"true\"{% endif %} data-sort-order=\"{{ sort_order }}\"
{% if sort_num is not empty %}data-sort-num=\"{{ sort_num - 1 }}\"{% endif %}>
{% set sort_icon = sort_order == 'ASC' ? 'fas fa-sort-up' : (sort_order == 'DESC' ? 'fas fa-sort-down' : '') %}
{{ col_name }}
{% if can_sort %}
<span class=\"sort-indicator\"><i class=\"{{ sort_icon }}\"></i><span class=\"sort-num\">{{ sorts|length > 1 ? sort_num : '' }}</span></span>
{% endif %}
</th>
{% endfor %}
{# display itemtype in AllAssets #}
{% if union_search_type[itemtype] is defined %}
<th>
{{ __('Item type') }}
</th>
{% endif %}
</tr>
</thead>
<tbody>
{% if count == 0 %}
<tr>
<td colspan=\"{{ data['data']['cols']|length }}\">
<div class=\"alert alert-info mb-0 rounded-0 border-top-0 border-bottom-0 border-right-0\" role=\"alert\">
{{ __('No item found') }}
</div>
</td>
</tr>
{% else %}
{% for rowkey, row in data['data']['rows'] %}
<tr>
{% if showmassiveactions %}
<td>
<div>
{# disable massiveaction checkbox for some specific cases #}
{% if itemtype == 'Entity' and not has_access_to_entity(row['id']) %}
{% elseif itemtype == 'User' and not can_view_all_entities() and not has_access_to_user_entities(row['id']) %}
{% elseif item is instanceof('CommonDBTM') and item.maybeRecursive() and not has_access_to_entity(row['entities_id']) %}
{% else %}
{% set checked = session('glpimassiveactionselected')[itemtype][row['id']] ?? false %}
<input class=\"form-check-input\" type=\"checkbox\" data-glpicore-ma-tags=\"common\"
value=\"1\" aria-label=\"\" {% if checked %}checked=\"checked\"{% endif %}
name=\"item[{{ row['TYPE'] ?? itemtype }}][{{ row['id'] }}]\" />
{% endif %}
</div>
</td>
{% endif %}
{% for col in data['data']['cols'] %}
{% set colkey = col['itemtype'] ~ '_' ~ col['id'] %}
{# showItem function returns \"<td ...>...</td>\" #}
{{ showItem(0, row[colkey]['displayname'], 0, 0, call('Search::displayConfigItem', [itemtype, col['id'], row]))|raw }}
{% endfor %}
{# display itemtype in AllAssets #}
{% if union_search_type[itemtype] is defined %}
<td>
{{ row['TYPE']|itemtype_name }}
</td>
{% endif %}
</tr>
{% endfor %}
{% endif %}
</tbody>
</table>
</div>
", "components/search/table.html.twig", "/home/escuelai/public_html/it/templates/components/search/table.html.twig");
}
}