<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
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;
use Twig\TemplateWrapper;
/* table/search/input_box.twig */
class __TwigTemplate_45acded7bd56a5604cfc3a4fb3e05d13 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $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 = []): iterable
{
$macros = $this->macros;
// line 2
if ((($context["foreigners"] ?? null) && $this->env->getFunction('search_column_in_foreigners')->getCallable()(($context["foreigners"] ?? null), ($context["column_name"] ?? null)))) {
// line 3
yield " ";
if (is_iterable((($_v0 = ($context["foreign_data"] ?? null)) && is_array($_v0) || $_v0 instanceof ArrayAccess ? ($_v0["disp_row"] ?? null) : null))) {
// line 4
yield " <select name=\"criteriaValues[";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["column_index"] ?? null), "html", null, true);
yield "]\"
id=\"";
// line 5
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["column_id"] ?? null), "html", null, true);
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["column_index"] ?? null), "html", null, true);
yield "\">
";
// line 6
yield $this->env->getFunction('foreign_dropdown')->getCallable()((($_v1 = // line 7
($context["foreign_data"] ?? null)) && is_array($_v1) || $_v1 instanceof ArrayAccess ? ($_v1["disp_row"] ?? null) : null), (($_v2 = // line 8
($context["foreign_data"] ?? null)) && is_array($_v2) || $_v2 instanceof ArrayAccess ? ($_v2["foreign_field"] ?? null) : null), (($_v3 = // line 9
($context["foreign_data"] ?? null)) && is_array($_v3) || $_v3 instanceof ArrayAccess ? ($_v3["foreign_display"] ?? null) : null), "", // line 11
($context["foreign_max_limit"] ?? null));
// line 12
yield "
</select>
";
} elseif (((($_v4 = // line 14
($context["foreign_data"] ?? null)) && is_array($_v4) || $_v4 instanceof ArrayAccess ? ($_v4["foreign_link"] ?? null) : null) == true)) {
// line 15
yield " <input type=\"text\"
id=\"";
// line 16
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["column_id"] ?? null), "html", null, true);
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["column_index"] ?? null), "html", null, true);
yield "\"
name=\"criteriaValues[";
// line 17
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["column_index"] ?? null), "html", null, true);
yield "]\"
id=\"field_";
// line 18
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["column_name_hash"] ?? null), "html", null, true);
yield "[";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["column_index"] ?? null), "html", null, true);
yield "]\"
class=\"textfield\"
";
// line 20
if (CoreExtension::getAttribute($this->env, $this->source, ($context["criteria_values"] ?? null), ($context["column_index"] ?? null), [], "array", true, true, false, 20)) {
// line 21
yield " value=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((($_v5 = ($context["criteria_values"] ?? null)) && is_array($_v5) || $_v5 instanceof ArrayAccess ? ($_v5[($context["column_index"] ?? null)] ?? null) : null), "html", null, true);
yield "\"
";
}
// line 22
yield ">
<a class=\"ajax browse_foreign\" href=\"";
// line 23
yield PhpMyAdmin\Url::getFromRoute("/browse-foreigners");
yield "\" data-post=\"";
// line 24
yield PhpMyAdmin\Url::getCommon(["db" => ($context["db"] ?? null), "table" => ($context["table"] ?? null)], "", false);
// line 25
yield "&field=";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::urlencode(($context["column_name"] ?? null)), "html", null, true);
yield "&fieldkey=";
// line 26
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["column_index"] ?? null), "html", null, true);
yield "&fromsearch=1\">
";
// line 27
yield PhpMyAdmin\Html\Generator::getIcon("b_browse", _gettext("Browse foreign values"));
yield "
</a>
";
}
} elseif (CoreExtension::inFilter( // line 30
($context["column_type"] ?? null), PhpMyAdmin\Utils\Gis::getDataTypes())) {
// line 31
yield " <input type=\"text\"
name=\"criteriaValues[";
// line 32
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["column_index"] ?? null), "html", null, true);
yield "]\"
size=\"40\"
class=\"textfield\"
id=\"field_";
// line 35
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["column_index"] ?? null), "html", null, true);
yield "\">
";
// line 36
if (($context["in_fbs"] ?? null)) {
// line 37
yield " <span class=\"open_search_gis_editor\">
";
// line 38
yield PhpMyAdmin\Html\Generator::linkOrButton("#", null, PhpMyAdmin\Html\Generator::getIcon("b_edit", _gettext("Edit/Insert")));
yield "
</span>
";
}
} elseif (((is_string($_v6 = // line 41
($context["column_type"] ?? null)) && is_string($_v7 = "enum") && str_starts_with($_v6, $_v7)) || ((is_string($_v8 = // line 42
($context["column_type"] ?? null)) && is_string($_v9 = "set") && str_starts_with($_v8, $_v9)) && ($context["in_zoom_search_edit"] ?? null)))) {
// line 43
yield " ";
$context["in_zoom_search_edit"] = false;
// line 44
yield " ";
$context["value"] = PhpMyAdmin\Util::parseEnumSetValues(($context["column_type"] ?? null));
// line 45
yield " ";
$context["cnt_value"] = Twig\Extension\CoreExtension::length($this->env->getCharset(), ($context["value"] ?? null));
// line 46
yield " ";
// line 52
yield " ";
if ((((is_string($_v10 = ($context["column_type"] ?? null)) && is_string($_v11 = "enum") && str_starts_with($_v10, $_v11)) && !($context["in_zoom_search_edit"] ?? null)) || ((is_string($_v12 = // line 53
($context["column_type"] ?? null)) && is_string($_v13 = "set") && str_starts_with($_v12, $_v13)) && ($context["in_zoom_search_edit"] ?? null)))) {
// line 54
yield " <select name=\"criteriaValues[";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["column_index"] ?? null), "html", null, true);
yield "]\"
id=\"";
// line 55
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["column_id"] ?? null), "html", null, true);
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["column_index"] ?? null), "html", null, true);
yield "\">
";
} else {
// line 57
yield " <select name=\"criteriaValues[";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["column_index"] ?? null), "html", null, true);
yield "]\"
id=\"";
// line 58
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["column_id"] ?? null), "html", null, true);
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["column_index"] ?? null), "html", null, true);
yield "\"
multiple=\"multiple\"
size=\"";
// line 60
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(min(3, ($context["cnt_value"] ?? null)), "html", null, true);
yield "\">
";
}
// line 62
yield " ";
// line 63
yield " <option value=\"\"></option>
";
// line 64
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(range(0, (($context["cnt_value"] ?? null) - 1)));
foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
// line 65
yield " ";
if (((CoreExtension::getAttribute($this->env, $this->source, ($context["criteria_values"] ?? null), ($context["column_index"] ?? null), [], "array", true, true, false, 65) && is_iterable((($_v14 = // line 66
($context["criteria_values"] ?? null)) && is_array($_v14) || $_v14 instanceof ArrayAccess ? ($_v14[($context["column_index"] ?? null)] ?? null) : null))) && CoreExtension::inFilter((($_v15 = // line 67
($context["value"] ?? null)) && is_array($_v15) || $_v15 instanceof ArrayAccess ? ($_v15[$context["i"]] ?? null) : null), (($_v16 = ($context["criteria_values"] ?? null)) && is_array($_v16) || $_v16 instanceof ArrayAccess ? ($_v16[($context["column_index"] ?? null)] ?? null) : null)))) {
// line 68
yield " <option value=\"";
yield (($_v17 = ($context["value"] ?? null)) && is_array($_v17) || $_v17 instanceof ArrayAccess ? ($_v17[$context["i"]] ?? null) : null);
yield "\" selected>
";
// line 69
yield (($_v18 = ($context["value"] ?? null)) && is_array($_v18) || $_v18 instanceof ArrayAccess ? ($_v18[$context["i"]] ?? null) : null);
yield "
</option>
";
} else {
// line 72
yield " <option value=\"";
yield (($_v19 = ($context["value"] ?? null)) && is_array($_v19) || $_v19 instanceof ArrayAccess ? ($_v19[$context["i"]] ?? null) : null);
yield "\">
";
// line 73
yield (($_v20 = ($context["value"] ?? null)) && is_array($_v20) || $_v20 instanceof ArrayAccess ? ($_v20[$context["i"]] ?? null) : null);
yield "
</option>
";
}
// line 76
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['i'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 77
yield " </select>
";
} else {
// line 79
yield " ";
$context["the_class"] = "textfield";
// line 80
yield " ";
if ((($context["column_type"] ?? null) == "date")) {
// line 81
yield " ";
$context["the_class"] = (($context["the_class"] ?? null) . " datefield");
// line 82
yield " ";
} elseif (((($context["column_type"] ?? null) == "datetime") || (is_string($_v21 = ($context["column_type"] ?? null)) && is_string($_v22 = "timestamp") && str_starts_with($_v21, $_v22)))) {
// line 83
yield " ";
$context["the_class"] = (($context["the_class"] ?? null) . " datetimefield");
// line 84
yield " ";
} elseif ((is_string($_v23 = ($context["column_type"] ?? null)) && is_string($_v24 = "bit") && str_starts_with($_v23, $_v24))) {
// line 85
yield " ";
$context["the_class"] = (($context["the_class"] ?? null) . " bit");
// line 86
yield " ";
}
// line 87
yield " <input type=\"text\"
name=\"criteriaValues[";
// line 88
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["column_index"] ?? null), "html", null, true);
yield "]\"
data-type=\"";
// line 89
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["column_data_type"] ?? null), "html", null, true);
yield "\"
";
// line 90
yield ($context["html_attributes"] ?? null);
yield "
size=\"40\"
class=\"";
// line 92
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["the_class"] ?? null), "html", null, true);
yield "\"
id=\"";
// line 93
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["column_id"] ?? null), "html", null, true);
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["column_index"] ?? null), "html", null, true);
yield "\"
";
// line 94
if (CoreExtension::getAttribute($this->env, $this->source, ($context["criteria_values"] ?? null), ($context["column_index"] ?? null), [], "array", true, true, false, 94)) {
// line 95
yield " value=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((($_v25 = ($context["criteria_values"] ?? null)) && is_array($_v25) || $_v25 instanceof ArrayAccess ? ($_v25[($context["column_index"] ?? null)] ?? null) : null), "html", null, true);
yield "\"";
}
// line 96
yield ">
";
}
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "table/search/input_box.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 291 => 96, 286 => 95, 284 => 94, 279 => 93, 275 => 92, 270 => 90, 266 => 89, 262 => 88, 259 => 87, 256 => 86, 253 => 85, 250 => 84, 247 => 83, 244 => 82, 241 => 81, 238 => 80, 235 => 79, 231 => 77, 225 => 76, 219 => 73, 214 => 72, 208 => 69, 203 => 68, 201 => 67, 200 => 66, 198 => 65, 194 => 64, 191 => 63, 189 => 62, 184 => 60, 178 => 58, 173 => 57, 167 => 55, 162 => 54, 160 => 53, 158 => 52, 156 => 46, 153 => 45, 150 => 44, 147 => 43, 145 => 42, 144 => 41, 138 => 38, 135 => 37, 133 => 36, 129 => 35, 123 => 32, 120 => 31, 118 => 30, 112 => 27, 108 => 26, 104 => 25, 102 => 24, 99 => 23, 96 => 22, 90 => 21, 88 => 20, 81 => 18, 77 => 17, 72 => 16, 69 => 15, 67 => 14, 63 => 12, 61 => 11, 60 => 9, 59 => 8, 58 => 7, 57 => 6, 52 => 5, 47 => 4, 44 => 3, 42 => 2,);
}
public function getSourceContext(): Source
{
return new Source("", "table/search/input_box.twig", "/usr/share/phpmyadmin/templates/table/search/input_box.twig");
}
}