<?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;
/* pages/searchresult.html.twig */
class __TwigTemplate_a0dd7918b4b5ff1a5b910362a011b2a35655ad960c70d423153b83966f79a927 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'stylesheets' => [$this, 'block_stylesheets'],
'body' => [$this, 'block_body'],
'javascripts_end' => [$this, 'block_javascripts_end'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "base.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "pages/searchresult.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "pages/searchresult.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "pages/searchresult.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 3
public function block_stylesheets($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
// line 4
echo " ";
$this->displayParentBlock("stylesheets", $context, $blocks);
echo "
<link rel=\"stylesheet\" type=\"text/css\" href=\"";
// line 6
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("vendors/DataTables/DataTables-1.10.18/css/dataTables.bootstrap4.css"), "html", null, true);
echo "\"/>
<style>
.table td {
padding: .1rem;
}
.dtr-title{
display: none !important;
min-width: 0px !important;
font-weight: bold;
}
.child{
border-top: none !important;
}
table.dataTable thead .sorting:before, table.dataTable thead .sorting_asc:before, table.dataTable thead .sorting_desc:before, table.dataTable thead .sorting_asc_disabled:before, table.dataTable thead .sorting_desc_disabled:before {
right: 1em;
content: none;
}
table.dataTable thead .sorting:after, table.dataTable thead .sorting_asc:after, table.dataTable thead .sorting_desc:after, table.dataTable thead .sorting_asc_disabled:after, table.dataTable thead .sorting_desc_disabled:after {
right: 0.5em;
content: none;
}
.child-container{
padding: 0 !important;
}
table.row-detail {
border-collapse: collapse;
width: 100%;
}
table.row-detail td {
padding: 5px 10px !important;
border-right: 1px solid #ddd;
}
table.dataTable.dtr-inline.collapsed>tbody>tr>td:first-child, table.dataTable.dtr-inline.collapsed>tbody>tr>th:first-child {
position: relative;
padding-left: 30px;
cursor: pointer;
}
table.dataTable.dtr-inline.collapsed>tbody>tr>td:first-child, table.dataTable.dtr-inline.collapsed>tbody>tr>th:first-child {
position: relative;
padding-left: 30px;
cursor: pointer;
}
#dtHorses_filter input {
padding: .5rem .75rem;
font-size: 1rem;
line-height: 1.25;
color: #495057;
background-color: #fff;
background-image: none;
background-clip: padding-box;
border: 1px solid rgba(0, 0, 0, 0.15);
border-radius: .25rem;
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s
}
</style>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 71
public function block_body($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 72
echo "
<section class=\"fashion-area section-gap pt-10\" id=\"fashion\" style=\"padding-top: 40px;\">
<div class=\"container\">
<div class=\"row\">
<div class=\"col-md-12 col-md-offset-0\">
<div class=\"x_panel\">
<div class=\"x_title\">
";
// line 79
if ((0 === twig_compare((isset($context["horse"]) || array_key_exists("horse", $context) ? $context["horse"] : (function () { throw new RuntimeError('Variable "horse" does not exist.', 79, $this->source); })()), "all"))) {
// line 80
echo " <h3>Hestefakta</h3>
<br>
";
}
// line 83
echo "
<div class=\"clearfix\"></div>
</div>
<div class=\"x_content\">
";
// line 89
if ((0 === twig_compare((isset($context["horse"]) || array_key_exists("horse", $context) ? $context["horse"] : (function () { throw new RuntimeError('Variable "horse" does not exist.', 89, $this->source); })()), "all"))) {
// line 90
echo " <div class=\"row\">
<div class=\"col-12 col-lg-6 col-md-6 col-sm-12\">
<form method=\"post\" action=\"";
// line 92
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_search", ["kind" => "horse"]);
echo "\">
<div class=\"col-lg-12 col-sm-auto input-group mb-3 pl-0\" >
<input type=\"text\" class=\"form-control\" aria-label=\"Search for horse\" aria-describedby=\"basic-addon2\" value=\"";
// line 94
echo twig_escape_filter($this->env, (isset($context["searchfor"]) || array_key_exists("searchfor", $context) ? $context["searchfor"] : (function () { throw new RuntimeError('Variable "searchfor" does not exist.', 94, $this->source); })()), "html", null, true);
echo "\" placeholder=\"Søk etter hest/kusk/trener\" name=\"horse_name\" style=\"padding: .3rem;font-size: .9rem;\">
<div class=\"input-group-append\">
<button class=\"btn btn-outline-danger\" type=\"submit\"><i class=\"fa fa-search\"></i></button>
</div>
</div>
</form>
</div>
</div>
";
// line 104
if (twig_get_attribute($this->env, $this->source, ($context["result"] ?? null), "horses", [], "array", true, true, false, 104)) {
// line 105
echo " ";
if ((1 === twig_compare(twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["result"]) || array_key_exists("result", $context) ? $context["result"] : (function () { throw new RuntimeError('Variable "result" does not exist.', 105, $this->source); })()), "horses", [], "array", false, false, false, 105)), 0))) {
// line 106
echo " <b>Hest</b><br>
";
// line 107
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["result"]) || array_key_exists("result", $context) ? $context["result"] : (function () { throw new RuntimeError('Variable "result" does not exist.', 107, $this->source); })()), "horses", [], "array", false, false, false, 107));
foreach ($context['_seq'] as $context["_key"] => $context["r"]) {
// line 108
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_horses", ["horse" => twig_get_attribute($this->env, $this->source, $context["r"], "id", [], "any", false, false, false, 108)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["r"], "hor_name", [], "any", false, false, false, 108), "html", null, true);
echo "</a><br>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['r'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 110
echo " <br>
";
}
// line 112
echo "
";
// line 113
if ((1 === twig_compare(twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["result"]) || array_key_exists("result", $context) ? $context["result"] : (function () { throw new RuntimeError('Variable "result" does not exist.', 113, $this->source); })()), "trainers", [], "array", false, false, false, 113)), 0))) {
// line 114
echo " <b>Trener</b><br>
";
// line 115
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["result"]) || array_key_exists("result", $context) ? $context["result"] : (function () { throw new RuntimeError('Variable "result" does not exist.', 115, $this->source); })()), "trainers", [], "array", false, false, false, 115));
foreach ($context['_seq'] as $context["_key"] => $context["r"]) {
// line 116
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_trainer", ["trainer" => twig_get_attribute($this->env, $this->source, $context["r"], "id", [], "any", false, false, false, 116)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["r"], "tra_lastname", [], "any", false, false, false, 116), "html", null, true);
echo ", ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["r"], "tra_firstname", [], "any", false, false, false, 116), "html", null, true);
echo "</a><br>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['r'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 118
echo " <br>
";
}
// line 120
echo "
";
// line 121
if ((1 === twig_compare(twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["result"]) || array_key_exists("result", $context) ? $context["result"] : (function () { throw new RuntimeError('Variable "result" does not exist.', 121, $this->source); })()), "drivers", [], "array", false, false, false, 121)), 0))) {
// line 122
echo " <b>Kusk</b><br>
";
// line 123
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["result"]) || array_key_exists("result", $context) ? $context["result"] : (function () { throw new RuntimeError('Variable "result" does not exist.', 123, $this->source); })()), "drivers", [], "array", false, false, false, 123));
foreach ($context['_seq'] as $context["_key"] => $context["r"]) {
// line 124
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_driver", ["driver" => twig_get_attribute($this->env, $this->source, $context["r"], "id", [], "any", false, false, false, 124)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["r"], "dri_lastname", [], "any", false, false, false, 124), "html", null, true);
echo ", ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["r"], "dri_firstname", [], "any", false, false, false, 124), "html", null, true);
echo "</a><br>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['r'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 126
echo " <br>
";
}
// line 128
echo " ";
}
// line 129
echo "
</div>
";
} else {
// line 132
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["horse"]) || array_key_exists("horse", $context) ? $context["horse"] : (function () { throw new RuntimeError('Variable "horse" does not exist.', 132, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["a"]) {
// line 133
echo " <div class=\"x_title\">
<div style=\"width: 100%;\">
<div style=\"width: 78%;display: inline-block;margin: 0px;padding: 0px;\"><h3>";
// line 135
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["a"], "hor_name", [], "any", false, false, false, 135), "html", null, true);
echo "</h3></div>
<div style=\"text-align: right;width: 20%; display: inline-block;margin: 0px;padding: 0px;\"><h4><span style=\"text-align: right\"><a href=\"";
// line 136
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_horses", ["horse" => "all"]);
echo "\"><i class=\"fas fa-search\"></i></a></span></h4></div>
</div>
<div class=\"clearfix\"></div>
</div>
<div class=\"x_content\">
<div class=\"col-lg-12\">
<div class=\"row\">
<div class=\"col-12 mt-3 pl-0\">
";
// line 144
if ((isset($context["father"]) || array_key_exists("father", $context) ? $context["father"] : (function () { throw new RuntimeError('Variable "father" does not exist.', 144, $this->source); })())) {
// line 145
echo " <strong>e</strong> <a href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_horses", ["horse" => twig_get_attribute($this->env, $this->source, (isset($context["father"]) || array_key_exists("father", $context) ? $context["father"] : (function () { throw new RuntimeError('Variable "father" does not exist.', 145, $this->source); })()), "getId", [], "method", false, false, false, 145)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["father"]) || array_key_exists("father", $context) ? $context["father"] : (function () { throw new RuntimeError('Variable "father" does not exist.', 145, $this->source); })()), "getHorName", [], "method", false, false, false, 145), "html", null, true);
echo "</a>
";
}
// line 147
echo " <br>
";
// line 148
if ((isset($context["mother"]) || array_key_exists("mother", $context) ? $context["mother"] : (function () { throw new RuntimeError('Variable "mother" does not exist.', 148, $this->source); })())) {
// line 149
echo " <strong>u</strong> <a href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_horses", ["horse" => twig_get_attribute($this->env, $this->source, (isset($context["mother"]) || array_key_exists("mother", $context) ? $context["mother"] : (function () { throw new RuntimeError('Variable "mother" does not exist.', 149, $this->source); })()), "getId", [], "method", false, false, false, 149)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["mother"]) || array_key_exists("mother", $context) ? $context["mother"] : (function () { throw new RuntimeError('Variable "mother" does not exist.', 149, $this->source); })()), "getHorName", [], "method", false, false, false, 149), "html", null, true);
echo "</a>
";
}
// line 151
echo " ";
if ((isset($context["grandfather"]) || array_key_exists("grandfather", $context) ? $context["grandfather"] : (function () { throw new RuntimeError('Variable "grandfather" does not exist.', 151, $this->source); })())) {
// line 152
echo " <br>
<strong>e</strong> <a href=\"";
// line 153
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_horses", ["horse" => twig_get_attribute($this->env, $this->source, (isset($context["grandfather"]) || array_key_exists("grandfather", $context) ? $context["grandfather"] : (function () { throw new RuntimeError('Variable "grandfather" does not exist.', 153, $this->source); })()), "id", [], "any", false, false, false, 153)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["grandfather"]) || array_key_exists("grandfather", $context) ? $context["grandfather"] : (function () { throw new RuntimeError('Variable "grandfather" does not exist.', 153, $this->source); })()), "getHorName", [], "method", false, false, false, 153), "html", null, true);
echo "</a>
";
}
// line 155
echo " <br>
<br>
<strong>Oppdretter: </strong> ";
// line 157
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["a"], "bre_name", [], "any", false, false, false, 157), "html", null, true);
echo "<br>
<strong>Trener: </strong>
";
// line 159
if (twig_get_attribute($this->env, $this->source, $context["a"], "traid", [], "any", false, false, false, 159)) {
// line 160
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_trainer", ["trainer" => twig_get_attribute($this->env, $this->source, $context["a"], "traid", [], "any", false, false, false, 160)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["a"], "tra_firstname", [], "any", false, false, false, 160), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["a"], "tra_lastname", [], "any", false, false, false, 160), "html", null, true);
echo "</a>
";
}
// line 162
echo " </div>
<!--
<div class=\"col-sm-2 col-3 pl-0 mt-3\">
<strong>Oppdretter</strong>
</div>
<div class=\"col-sm-10 col-9 mt-3\">
";
// line 169
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["a"], "bre_name", [], "any", false, false, false, 169), "html", null, true);
echo "
</div>
<div class=\"col-sm-2 col-3 pl-0\">
<strong>Trener</strong>
</div>
<div class=\"col-sm-10 col-9\">
";
// line 175
if (twig_get_attribute($this->env, $this->source, $context["a"], "traid", [], "any", false, false, false, 175)) {
// line 176
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_trainer", ["trainer" => twig_get_attribute($this->env, $this->source, $context["a"], "traid", [], "any", false, false, false, 176)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["a"], "tra_firstname", [], "any", false, false, false, 176), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["a"], "tra_lastname", [], "any", false, false, false, 176), "html", null, true);
echo "</a>
";
}
// line 178
echo " </div>
";
// line 179
if ((isset($context["father"]) || array_key_exists("father", $context) ? $context["father"] : (function () { throw new RuntimeError('Variable "father" does not exist.', 179, $this->source); })())) {
// line 180
echo " <div class=\"col-sm-2 col-3 pl-0 mt-3\">
<strong>e</strong>
</div>
<div class=\"col-sm-10 col-9 mt-3\">
<a href=\"";
// line 184
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_horses", ["horse" => twig_get_attribute($this->env, $this->source, (isset($context["father"]) || array_key_exists("father", $context) ? $context["father"] : (function () { throw new RuntimeError('Variable "father" does not exist.', 184, $this->source); })()), "getId", [], "method", false, false, false, 184)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["father"]) || array_key_exists("father", $context) ? $context["father"] : (function () { throw new RuntimeError('Variable "father" does not exist.', 184, $this->source); })()), "getHorName", [], "method", false, false, false, 184), "html", null, true);
echo "</a>
</div>
";
}
// line 187
echo " ";
if ((isset($context["mother"]) || array_key_exists("mother", $context) ? $context["mother"] : (function () { throw new RuntimeError('Variable "mother" does not exist.', 187, $this->source); })())) {
// line 188
echo " <div class=\"col-sm-2 col-3 pl-0\">
<strong>u</strong>
</div>
<div class=\"col-sm-10 col-9\">
<a href=\"";
// line 192
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_horses", ["horse" => twig_get_attribute($this->env, $this->source, (isset($context["mother"]) || array_key_exists("mother", $context) ? $context["mother"] : (function () { throw new RuntimeError('Variable "mother" does not exist.', 192, $this->source); })()), "getId", [], "method", false, false, false, 192)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["mother"]) || array_key_exists("mother", $context) ? $context["mother"] : (function () { throw new RuntimeError('Variable "mother" does not exist.', 192, $this->source); })()), "getHorName", [], "method", false, false, false, 192), "html", null, true);
echo "</a>
</div>
";
}
// line 195
echo " ";
if ((isset($context["grandfather"]) || array_key_exists("grandfather", $context) ? $context["grandfather"] : (function () { throw new RuntimeError('Variable "grandfather" does not exist.', 195, $this->source); })())) {
// line 196
echo " <div class=\"col-sm-2 col-3 pl-0\">
<strong>e</strong>
</div>
<div class=\"col-sm-10 col-9\">
<a href=\"";
// line 200
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_horses", ["horse" => twig_get_attribute($this->env, $this->source, (isset($context["grandfather"]) || array_key_exists("grandfather", $context) ? $context["grandfather"] : (function () { throw new RuntimeError('Variable "grandfather" does not exist.', 200, $this->source); })()), "id", [], "any", false, false, false, 200)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["grandfather"]) || array_key_exists("grandfather", $context) ? $context["grandfather"] : (function () { throw new RuntimeError('Variable "grandfather" does not exist.', 200, $this->source); })()), "getHorName", [], "method", false, false, false, 200), "html", null, true);
echo "</a>
</div>
";
}
// line 203
echo " -->
<div class=\"col-lg-12 pl-0 mt-30\" style=\"width: 100%; overflow: auto\">
<div class=\"row\">
<div class=\"col-6 col-lg-2 col-sm-6 test1 mb-3\"></div>
<div class=\"col-6 col-lg-2 col-sm-6 test3 mb-3\"></div>
<div class=\"col-6 col-lg-2 col-sm-6 test8 mb-3\"></div>
<div class=\"col-6 col-lg-2 col-sm-6 test10 mb-3\"></div>
<div class=\"col-6 col-lg-2 col-sm-6 test15 mb-3\"></div>
</div>
<table class=\"table table-hover table-responsive-sm display responsive\" id=\"dtHorses\">
<thead>
<tr>
<th class=\"all\">Løpsdag</th>
<th class=\"all\"></th>
<th class=\"all\">Bane</th>
<th class=\"all\"></th>
<th class=\"all\">Kusk</th>
<th class=\"all\">Trener</th>
<th class=\"all\">Spor</th>
<th class=\"all\">Dist</th>
<th class=\"all\"></th>
<th class=\"all\">Start</th>
<th class=\"all\"></th>
<th class=\"all\" style=\"text-align: center;\">Plass</th>
<th class=\"all\">Tid</th>
<th class=\"all\" style=\"text-align: right;\">Fpr</th>
<th class=\"all\" style=\"text-align: center;\">Odds</th>
<th class=\"all\" style=\"text-align: center;\">Forhold</th>
<th class=\"all\" style=\"white-space: nowrap;\">M-tider</th>
<th class=\"all\">Monté</th>
<th class=\"none\"></th>
</tr>
</thead>
<tbody>
";
// line 238
$context["c"] = 0;
// line 239
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["info"]) || array_key_exists("info", $context) ? $context["info"] : (function () { throw new RuntimeError('Variable "info" does not exist.', 239, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
// line 240
echo "
<!--
";
// line 242
if (((0 === twig_compare(twig_get_attribute($this->env, $this->source, $context["i"], "res_scratched", [], "any", false, false, false, 242), "1")) || (0 === twig_compare(twig_get_attribute($this->env, $this->source, $context["i"], "res_disq", [], "any", false, false, false, 242), "1")))) {
// line 243
echo " ";
$context["st"] = "background-color:#FDD";
// line 244
echo " ";
} else {
// line 245
echo " ";
$context["st"] = "";
// line 246
echo " ";
}
// line 247
echo " -->
";
// line 249
if ((0 === twig_compare(twig_get_attribute($this->env, $this->source, $context["i"], "res_disq", [], "any", false, false, false, 249), "1"))) {
// line 250
echo " ";
$context["pl"] = "-";
// line 251
echo " ";
$context["km"] = twig_get_attribute($this->env, $this->source, $context["i"], "res_displaykmtime", [], "any", false, false, false, 251);
// line 252
echo " ";
$context["st"] = "";
// line 253
echo " ";
} elseif ((0 === twig_compare(twig_get_attribute($this->env, $this->source, $context["i"], "res_scratched", [], "any", false, false, false, 253), "1"))) {
// line 254
echo " ";
$context["pl"] = "-";
// line 255
echo " ";
$context["km"] = "str";
// line 256
echo " ";
$context["st"] = "background-color:#FDD";
// line 257
echo " ";
} elseif ((0 === twig_compare(twig_get_attribute($this->env, $this->source, $context["i"], "res_earnedmoney", [], "any", false, false, false, 257), "0"))) {
// line 258
echo " ";
$context["pl"] = "0";
// line 259
echo " ";
} else {
// line 260
echo " ";
$context["pl"] = twig_get_attribute($this->env, $this->source, $context["i"], "res_place", [], "any", false, false, false, 260);
// line 261
echo " ";
$context["km"] = twig_get_attribute($this->env, $this->source, $context["i"], "res_displaykmtime", [], "any", false, false, false, 261);
// line 262
echo " ";
$context["st"] = "";
// line 263
echo " ";
}
// line 264
echo "
<tr style=\"";
// line 269
echo twig_escape_filter($this->env, (isset($context["st"]) || array_key_exists("st", $context) ? $context["st"] : (function () { throw new RuntimeError('Variable "st" does not exist.', 269, $this->source); })()), "html", null, true);
echo "\" >
<td style=\"white-space: nowrap;\">
";
// line 271
if (twig_get_attribute($this->env, $this->source, $context["i"], "mee_id", [], "any", false, false, false, 271)) {
// line 272
echo " <span id=\"";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["i"], "mee_date", [], "any", false, false, false, 272), "ymd"), "html", null, true);
echo "\" style=\"display: none\">";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["i"], "mee_date", [], "any", false, false, false, 272), "ymd"), "html", null, true);
echo "</span><a href=\"/tips/";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["i"], "mee_id", [], "any", false, false, false, 272), "html", null, true);
echo "?resultat=&lop=";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["i"], "res_raceno", [], "any", false, false, false, 272), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["i"], "mee_date", [], "any", false, false, false, 272), "dmy"), "html", null, true);
echo "-";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["i"], "res_raceno", [], "any", false, false, false, 272), "html", null, true);
echo "</a>
";
} else {
// line 274
echo " ";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["i"], "mee_date", [], "any", false, false, false, 274), "dmy"), "html", null, true);
echo "-";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["i"], "res_raceno", [], "any", false, false, false, 274), "html", null, true);
echo "
";
}
// line 276
echo " </td>
<td style=\"text-align: left\">
";
// line 278
if (((0 === twig_compare(twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["i"], "mee_date", [], "any", false, false, false, 278), "m"), 12)) || (-1 === twig_compare(twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["i"], "mee_date", [], "any", false, false, false, 278), "m"), 3)))) {
// line 279
echo " Vinter
";
} elseif ((-1 === twig_compare(twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, // line 280
$context["i"], "mee_date", [], "any", false, false, false, 280), "m"), 6))) {
// line 281
echo " Vår
";
} elseif ((-1 === twig_compare(twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, // line 282
$context["i"], "mee_date", [], "any", false, false, false, 282), "m"), 9))) {
// line 283
echo " Sommer
";
} else {
// line 285
echo " Høst
";
}
// line 287
echo " </td>
<td style=\"white-space: nowrap;\">
";
// line 289
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["i"], "trk_code", [], "any", false, false, false, 289), "html", null, true);
echo "
</td>
<td style=\"white-space: nowrap;\">
";
// line 292
echo twig_escape_filter($this->env, twig_replace_filter(twig_get_attribute($this->env, $this->source, $context["i"], "trk_trackname", [], "any", false, false, false, 292), [" Travbane" => "", " Travpark" => "", " Tråvpark" => "", " Galoppbane" => ""]), "html", null, true);
echo "
</td>
<td style=\"white-space: nowrap;\">
";
// line 295
$context["first"] = twig_slice($this->env, twig_get_attribute($this->env, $this->source, $context["i"], "dri_firstname", [], "any", false, false, false, 295), 0, 2);
// line 296
echo " ";
$context["last"] = twig_slice($this->env, twig_get_attribute($this->env, $this->source, $context["i"], "dri_lastname", [], "any", false, false, false, 296), 0, 3);
// line 297
echo " <a href=\"/driver/";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["i"], "driid", [], "any", false, false, false, 297), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, (isset($context["first"]) || array_key_exists("first", $context) ? $context["first"] : (function () { throw new RuntimeError('Variable "first" does not exist.', 297, $this->source); })()), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, (isset($context["last"]) || array_key_exists("last", $context) ? $context["last"] : (function () { throw new RuntimeError('Variable "last" does not exist.', 297, $this->source); })()), "html", null, true);
echo "</a>
</td>
<td style=\"white-space: nowrap;\">
<a href=\"";
// line 300
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_trainer", ["trainer" => twig_get_attribute($this->env, $this->source, $context["i"], "traid", [], "any", false, false, false, 300)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["i"], "tra_shortname", [], "any", false, false, false, 300), "html", null, true);
echo "</a>
</td>
<td style=\"white-space: nowrap;\">
";
// line 303
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["i"], "res_startnumber", [], "any", false, false, false, 303), "html", null, true);
echo "
</td>
<td style=\"white-space: nowrap;\">
";
// line 306
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["i"], "res_distance", [], "any", false, false, false, 306), "html", null, true);
echo "
</td>
<td style=\"white-space: nowrap;\" class=\"none\">
";
// line 309
if ((1 === twig_compare(twig_get_attribute($this->env, $this->source, $context["i"], "res_distance", [], "any", false, false, false, 309), 2399))) {
// line 310
echo " Lang
";
} elseif ((1 === twig_compare(twig_get_attribute($this->env, $this->source, // line 311
$context["i"], "res_distance", [], "any", false, false, false, 311), 1799))) {
// line 312
echo " Mellom
";
} else {
// line 314
echo " Sprint
";
}
// line 316
echo " </td>
<td style=\"white-space: nowrap; text-align: center;\">
";
// line 318
echo twig_escape_filter($this->env, twig_upper_filter($this->env, twig_get_attribute($this->env, $this->source, $context["i"], "rac_startmethod_code", [], "any", false, false, false, 318)), "html", null, true);
echo "
</td>
<td style=\"white-space: nowrap;\" class=\"\">
";
// line 321
if ((0 === twig_compare(twig_get_attribute($this->env, $this->source, $context["i"], "rac_startmethod_code", [], "any", false, false, false, 321), "v"))) {
// line 322
echo " Volte
";
} else {
// line 324
echo " Auto
";
}
// line 326
echo " </td>
<td style=\"text-align:center;white-space: nowrap;\">
";
// line 328
echo twig_escape_filter($this->env, (isset($context["pl"]) || array_key_exists("pl", $context) ? $context["pl"] : (function () { throw new RuntimeError('Variable "pl" does not exist.', 328, $this->source); })()), "html", null, true);
echo "
</td>
<td style=\"white-space: nowrap;\">
";
// line 331
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["i"], "res_displaykmtime", [], "any", false, false, false, 331), "html", null, true);
echo "
</td>
<td style=\"text-align:right;white-space: nowrap;\">
";
// line 334
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["arr"]) || array_key_exists("arr", $context) ? $context["arr"] : (function () { throw new RuntimeError('Variable "arr" does not exist.', 334, $this->source); })()), (isset($context["c"]) || array_key_exists("c", $context) ? $context["c"] : (function () { throw new RuntimeError('Variable "c" does not exist.', 334, $this->source); })()), [], "array", false, false, false, 334), 0, ",", " "), "html", null, true);
echo "
</td>
<td style=\"text-align:center;white-space: nowrap;\">
";
// line 337
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["i"], "res_odds", [], "any", false, false, false, 337), "html", null, true);
echo "
</td>
<td style=\"text-align:left;white-space: nowrap;\">
";
// line 340
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["i"], "trc_condition", [], "any", false, false, false, 340), "html", null, true);
echo "
</td>
<td style=\"white-space: nowrap;\">
";
// line 343
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["i"], "sta_pass500", [], "any", false, false, false, 343), "html", null, true);
echo "-";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["i"], "sta_pass1000", [], "any", false, false, false, 343), "html", null, true);
echo "
";
// line 344
if (twig_get_attribute($this->env, $this->source, $context["i"], "sta_pass500", [], "any", false, false, false, 344)) {
// line 345
echo "<!-- COULD BE HERE -->
";
}
// line 347
echo " </td>
<td style=\"white-space: nowrap;text-align: center\">
";
// line 349
if (twig_get_attribute($this->env, $this->source, $context["i"], "rac_monterace", [], "any", false, false, false, 349)) {
// line 350
echo " <i class=\"fas fa-times\"></i>
";
}
// line 352
echo " </td>
<td>";
// line 353
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["i"], "sta_comment", [], "any", false, false, false, 353), "html", null, true);
echo "</td>
</tr>
";
// line 356
$context["c"] = ((isset($context["c"]) || array_key_exists("c", $context) ? $context["c"] : (function () { throw new RuntimeError('Variable "c" does not exist.', 356, $this->source); })()) + 1);
// line 357
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 358
echo " </tbody>
</table>
</div>
</div>
</div>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['a'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 365
echo " ";
}
// line 366
echo " </div>
</div>
</div>
</div>
</section>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 373
public function block_javascripts_end($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts_end"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts_end"));
// line 374
echo " ";
$this->displayParentBlock("javascripts_end", $context, $blocks);
echo "
<script src=\"https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js\"></script>
<script src=\"https://cdn.datatables.net/responsive/2.2.3/js/dataTables.responsive.min.js\"></script>
<script>
\$(document).ready(function() {
\$('#dtHorses').DataTable( {
responsive: {
details: {
display: \$.fn.dataTable.Responsive.display.childRowImmediate,
type: 'none',
target: ''
}
},
order: [[ 0, \"desc\" ]],
dom: 'Bfrtip',
language: {
buttons: {
pageLength: {
_: \"Vis %d\",
'-1': \"Alle\"
}
}
},
paging: false,
info: false,
pageLength: -1,
oLanguage: {
\"sSearch\": \"\"
},
columnDefs: [
{
\"targets\": [ 1,3,8,10 ],
\"visible\": false,
}
],
initComplete: function () {
\$i = 0;
this.api().columns().every( function () {
var title = '';
if(\$i == 1 || \$i == 3 || \$i == 8 || \$i == 10 || \$i == 15){
if(\$i == 1){
title = 'Årstid';
} else if(\$i == 3) {
title = 'Bane';
} else if(\$i == 8) {
title = 'Distanse';
} else if (\$i == 10){
title = 'Starttype';
} else if (\$i == 15){
title = 'Baneforhold';
}
var column = this;
var select = \$('<select class=\"form-control\"><option value=\"\">'+title+'</option></select>')
.appendTo( \$('.test'+\$i).empty() )
// .appendTo( \$(column.footer()).empty() )
.on( 'change', function () {
var val = \$.fn.dataTable.util.escapeRegex(
\$(this).val()
);
column
.search( val ? '^'+val+'\$' : '', true, false )
.draw();
} );
column.data().unique().sort().each( function ( d, j ) {
select.append( '<option value=\"'+d+'\">'+d+'</option>' )
} );
}
\$i++;
} );
}
});
});
/*
*/
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "pages/searchresult.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 837 => 374, 827 => 373, 812 => 366, 809 => 365, 797 => 358, 791 => 357, 789 => 356, 783 => 353, 780 => 352, 776 => 350, 774 => 349, 770 => 347, 766 => 345, 764 => 344, 758 => 343, 752 => 340, 746 => 337, 740 => 334, 734 => 331, 728 => 328, 724 => 326, 720 => 324, 716 => 322, 714 => 321, 708 => 318, 704 => 316, 700 => 314, 696 => 312, 694 => 311, 691 => 310, 689 => 309, 683 => 306, 677 => 303, 669 => 300, 658 => 297, 655 => 296, 653 => 295, 647 => 292, 641 => 289, 637 => 287, 633 => 285, 629 => 283, 627 => 282, 624 => 281, 622 => 280, 619 => 279, 617 => 278, 613 => 276, 605 => 274, 589 => 272, 587 => 271, 582 => 269, 575 => 264, 572 => 263, 569 => 262, 566 => 261, 563 => 260, 560 => 259, 557 => 258, 554 => 257, 551 => 256, 548 => 255, 545 => 254, 542 => 253, 539 => 252, 536 => 251, 533 => 250, 531 => 249, 527 => 247, 524 => 246, 521 => 245, 518 => 244, 515 => 243, 513 => 242, 509 => 240, 504 => 239, 502 => 238, 465 => 203, 457 => 200, 451 => 196, 448 => 195, 440 => 192, 434 => 188, 431 => 187, 423 => 184, 417 => 180, 415 => 179, 412 => 178, 402 => 176, 400 => 175, 391 => 169, 382 => 162, 372 => 160, 370 => 159, 365 => 157, 361 => 155, 354 => 153, 351 => 152, 348 => 151, 340 => 149, 338 => 148, 335 => 147, 327 => 145, 325 => 144, 314 => 136, 310 => 135, 306 => 133, 301 => 132, 296 => 129, 293 => 128, 289 => 126, 276 => 124, 272 => 123, 269 => 122, 267 => 121, 264 => 120, 260 => 118, 247 => 116, 243 => 115, 240 => 114, 238 => 113, 235 => 112, 231 => 110, 220 => 108, 216 => 107, 213 => 106, 210 => 105, 208 => 104, 195 => 94, 190 => 92, 186 => 90, 184 => 89, 176 => 83, 171 => 80, 169 => 79, 160 => 72, 150 => 71, 76 => 6, 70 => 4, 60 => 3, 37 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'base.html.twig' %}
{% block stylesheets %}
{{ parent() }}
<link rel=\"stylesheet\" type=\"text/css\" href=\"{{ asset('vendors/DataTables/DataTables-1.10.18/css/dataTables.bootstrap4.css') }}\"/>
<style>
.table td {
padding: .1rem;
}
.dtr-title{
display: none !important;
min-width: 0px !important;
font-weight: bold;
}
.child{
border-top: none !important;
}
table.dataTable thead .sorting:before, table.dataTable thead .sorting_asc:before, table.dataTable thead .sorting_desc:before, table.dataTable thead .sorting_asc_disabled:before, table.dataTable thead .sorting_desc_disabled:before {
right: 1em;
content: none;
}
table.dataTable thead .sorting:after, table.dataTable thead .sorting_asc:after, table.dataTable thead .sorting_desc:after, table.dataTable thead .sorting_asc_disabled:after, table.dataTable thead .sorting_desc_disabled:after {
right: 0.5em;
content: none;
}
.child-container{
padding: 0 !important;
}
table.row-detail {
border-collapse: collapse;
width: 100%;
}
table.row-detail td {
padding: 5px 10px !important;
border-right: 1px solid #ddd;
}
table.dataTable.dtr-inline.collapsed>tbody>tr>td:first-child, table.dataTable.dtr-inline.collapsed>tbody>tr>th:first-child {
position: relative;
padding-left: 30px;
cursor: pointer;
}
table.dataTable.dtr-inline.collapsed>tbody>tr>td:first-child, table.dataTable.dtr-inline.collapsed>tbody>tr>th:first-child {
position: relative;
padding-left: 30px;
cursor: pointer;
}
#dtHorses_filter input {
padding: .5rem .75rem;
font-size: 1rem;
line-height: 1.25;
color: #495057;
background-color: #fff;
background-image: none;
background-clip: padding-box;
border: 1px solid rgba(0, 0, 0, 0.15);
border-radius: .25rem;
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s
}
</style>
{% endblock %}
{% block body %}
<section class=\"fashion-area section-gap pt-10\" id=\"fashion\" style=\"padding-top: 40px;\">
<div class=\"container\">
<div class=\"row\">
<div class=\"col-md-12 col-md-offset-0\">
<div class=\"x_panel\">
<div class=\"x_title\">
{% if horse == 'all' %}
<h3>Hestefakta</h3>
<br>
{% endif %}
<div class=\"clearfix\"></div>
</div>
<div class=\"x_content\">
{% if horse == 'all' %}
<div class=\"row\">
<div class=\"col-12 col-lg-6 col-md-6 col-sm-12\">
<form method=\"post\" action=\"{{ path('app_search', {kind: 'horse' }) }}\">
<div class=\"col-lg-12 col-sm-auto input-group mb-3 pl-0\" >
<input type=\"text\" class=\"form-control\" aria-label=\"Search for horse\" aria-describedby=\"basic-addon2\" value=\"{{ searchfor }}\" placeholder=\"Søk etter hest/kusk/trener\" name=\"horse_name\" style=\"padding: .3rem;font-size: .9rem;\">
<div class=\"input-group-append\">
<button class=\"btn btn-outline-danger\" type=\"submit\"><i class=\"fa fa-search\"></i></button>
</div>
</div>
</form>
</div>
</div>
{% if (result['horses'] is defined) %}
{% if ((result['horses'] | length) > 0) %}
<b>Hest</b><br>
{% for r in result['horses'] %}
<a href=\"{{ path('app_horses', { horse: r.id}) }}\">{{ r.hor_name }}</a><br>
{% endfor %}
<br>
{% endif %}
{% if ((result['trainers'] | length) > 0) %}
<b>Trener</b><br>
{% for r in result['trainers'] %}
<a href=\"{{ path('app_trainer', { trainer: r.id }) }}\">{{ r.tra_lastname }}, {{ r.tra_firstname }}</a><br>
{% endfor %}
<br>
{% endif %}
{% if ((result['drivers'] | length) > 0) %}
<b>Kusk</b><br>
{% for r in result['drivers'] %}
<a href=\"{{ path('app_driver', { driver: r.id }) }}\">{{ r.dri_lastname }}, {{ r.dri_firstname }}</a><br>
{% endfor %}
<br>
{% endif %}
{% endif %}
</div>
{% else %}
{% for a in horse %}
<div class=\"x_title\">
<div style=\"width: 100%;\">
<div style=\"width: 78%;display: inline-block;margin: 0px;padding: 0px;\"><h3>{{ a.hor_name }}</h3></div>
<div style=\"text-align: right;width: 20%; display: inline-block;margin: 0px;padding: 0px;\"><h4><span style=\"text-align: right\"><a href=\"{{ path('app_horses', {horse: 'all' }) }}\"><i class=\"fas fa-search\"></i></a></span></h4></div>
</div>
<div class=\"clearfix\"></div>
</div>
<div class=\"x_content\">
<div class=\"col-lg-12\">
<div class=\"row\">
<div class=\"col-12 mt-3 pl-0\">
{% if father %}
<strong>e</strong> <a href=\"{{ path('app_horses', { horse: father.getId()}) }}\">{{ father.getHorName() }}</a>
{% endif %}
<br>
{% if mother %}
<strong>u</strong> <a href=\"{{ path('app_horses', { horse: mother.getId()}) }}\">{{ mother.getHorName() }}</a>
{% endif %}
{% if grandfather %}
<br>
<strong>e</strong> <a href=\"{{ path('app_horses', { horse: grandfather.id }) }}\">{{ grandfather.getHorName() }}</a>
{% endif %}
<br>
<br>
<strong>Oppdretter: </strong> {{ a.bre_name }}<br>
<strong>Trener: </strong>
{% if a.traid %}
<a href=\"{{ path('app_trainer', { trainer: a.traid}) }}\">{{ a.tra_firstname }} {{ a.tra_lastname }}</a>
{% endif %}
</div>
<!--
<div class=\"col-sm-2 col-3 pl-0 mt-3\">
<strong>Oppdretter</strong>
</div>
<div class=\"col-sm-10 col-9 mt-3\">
{{ a.bre_name }}
</div>
<div class=\"col-sm-2 col-3 pl-0\">
<strong>Trener</strong>
</div>
<div class=\"col-sm-10 col-9\">
{% if a.traid %}
<a href=\"{{ path('app_trainer', { trainer: a.traid}) }}\">{{ a.tra_firstname }} {{ a.tra_lastname }}</a>
{% endif %}
</div>
{% if father %}
<div class=\"col-sm-2 col-3 pl-0 mt-3\">
<strong>e</strong>
</div>
<div class=\"col-sm-10 col-9 mt-3\">
<a href=\"{{ path('app_horses', { horse: father.getId()}) }}\">{{ father.getHorName() }}</a>
</div>
{% endif %}
{% if mother %}
<div class=\"col-sm-2 col-3 pl-0\">
<strong>u</strong>
</div>
<div class=\"col-sm-10 col-9\">
<a href=\"{{ path('app_horses', { horse: mother.getId()}) }}\">{{ mother.getHorName() }}</a>
</div>
{% endif %}
{% if grandfather %}
<div class=\"col-sm-2 col-3 pl-0\">
<strong>e</strong>
</div>
<div class=\"col-sm-10 col-9\">
<a href=\"{{ path('app_horses', { horse: grandfather.id }) }}\">{{ grandfather.getHorName() }}</a>
</div>
{% endif %}
-->
<div class=\"col-lg-12 pl-0 mt-30\" style=\"width: 100%; overflow: auto\">
<div class=\"row\">
<div class=\"col-6 col-lg-2 col-sm-6 test1 mb-3\"></div>
<div class=\"col-6 col-lg-2 col-sm-6 test3 mb-3\"></div>
<div class=\"col-6 col-lg-2 col-sm-6 test8 mb-3\"></div>
<div class=\"col-6 col-lg-2 col-sm-6 test10 mb-3\"></div>
<div class=\"col-6 col-lg-2 col-sm-6 test15 mb-3\"></div>
</div>
<table class=\"table table-hover table-responsive-sm display responsive\" id=\"dtHorses\">
<thead>
<tr>
<th class=\"all\">Løpsdag</th>
<th class=\"all\"></th>
<th class=\"all\">Bane</th>
<th class=\"all\"></th>
<th class=\"all\">Kusk</th>
<th class=\"all\">Trener</th>
<th class=\"all\">Spor</th>
<th class=\"all\">Dist</th>
<th class=\"all\"></th>
<th class=\"all\">Start</th>
<th class=\"all\"></th>
<th class=\"all\" style=\"text-align: center;\">Plass</th>
<th class=\"all\">Tid</th>
<th class=\"all\" style=\"text-align: right;\">Fpr</th>
<th class=\"all\" style=\"text-align: center;\">Odds</th>
<th class=\"all\" style=\"text-align: center;\">Forhold</th>
<th class=\"all\" style=\"white-space: nowrap;\">M-tider</th>
<th class=\"all\">Monté</th>
<th class=\"none\"></th>
</tr>
</thead>
<tbody>
{% set c = 0 %}
{% for i in info %}
<!--
{% if i.res_scratched == '1' or i.res_disq == '1' %}
{% set st = 'background-color:#FDD' %}
{% else %}
{% set st = '' %}
{% endif %}
-->
{% if i.res_disq == '1' %}
{% set pl = '-' %}
{% set km = i.res_displaykmtime %}
{% set st = '' %}
{% elseif i.res_scratched == '1' %}
{% set pl = '-' %}
{% set km = 'str' %}
{% set st = 'background-color:#FDD' %}
{% elseif i.res_earnedmoney == '0' %}
{% set pl = '0' %}
{% else %}
{% set pl = i.res_place %}
{% set km = i.res_displaykmtime %}
{% set st = '' %}
{% endif %}
<tr style=\"{{ st }}\" >
<td style=\"white-space: nowrap;\">
{% if i.mee_id %}
<span id=\"{{ i.mee_date|date('ymd') }}\" style=\"display: none\">{{ i.mee_date|date('ymd') }}</span><a href=\"/tips/{{ i.mee_id }}?resultat=&lop={{ i.res_raceno}}\">{{ i.mee_date|date('dmy') }}-{{ i.res_raceno}}</a>
{% else %}
{{ i.mee_date|date('dmy') }}-{{ i.res_raceno}}
{% endif %}
</td>
<td style=\"text-align: left\">
{% if (i.mee_date|date('m') == 12) or (i.mee_date|date('m') < 3 )%}
Vinter
{% elseif (i.mee_date|date('m') < 6 )%}
Vår
{% elseif (i.mee_date|date('m') < 9 )%}
Sommer
{% else %}
Høst
{% endif %}
</td>
<td style=\"white-space: nowrap;\">
{{ i.trk_code }}
</td>
<td style=\"white-space: nowrap;\">
{{ i.trk_trackname|replace({' Travbane': '', ' Travpark': '', ' Tråvpark': '', ' Galoppbane': '', }) }}
</td>
<td style=\"white-space: nowrap;\">
{% set first = i.dri_firstname|slice(0, 2) %}
{% set last = i.dri_lastname|slice(0, 3) %}
<a href=\"/driver/{{ i.driid }}\">{{ first }} {{ last }}</a>
</td>
<td style=\"white-space: nowrap;\">
<a href=\"{{ path('app_trainer', { trainer: i.traid}) }}\">{{ i.tra_shortname }}</a>
</td>
<td style=\"white-space: nowrap;\">
{{ i.res_startnumber}}
</td>
<td style=\"white-space: nowrap;\">
{{ i.res_distance }}
</td>
<td style=\"white-space: nowrap;\" class=\"none\">
{% if i.res_distance > 2399 %}
Lang
{% elseif i.res_distance > 1799 %}
Mellom
{% else %}
Sprint
{% endif %}
</td>
<td style=\"white-space: nowrap; text-align: center;\">
{{ i.rac_startmethod_code|upper}}
</td>
<td style=\"white-space: nowrap;\" class=\"\">
{% if i.rac_startmethod_code == 'v' %}
Volte
{% else %}
Auto
{% endif %}
</td>
<td style=\"text-align:center;white-space: nowrap;\">
{{ pl }}
</td>
<td style=\"white-space: nowrap;\">
{{ i.res_displaykmtime }}
</td>
<td style=\"text-align:right;white-space: nowrap;\">
{{ arr[c]|number_format(0, ',', ' ') }}
</td>
<td style=\"text-align:center;white-space: nowrap;\">
{{ i.res_odds }}
</td>
<td style=\"text-align:left;white-space: nowrap;\">
{{ i.trc_condition }}
</td>
<td style=\"white-space: nowrap;\">
{{ i.sta_pass500 }}-{{ i.sta_pass1000 }}
{% if i.sta_pass500 %}
<!-- COULD BE HERE -->
{% endif %}
</td>
<td style=\"white-space: nowrap;text-align: center\">
{% if i.rac_monterace %}
<i class=\"fas fa-times\"></i>
{% endif %}
</td>
<td>{{ i.sta_comment }}</td>
</tr>
{% set c = c+1 %}
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
{% endfor %}
{% endif %}
</div>
</div>
</div>
</div>
</section>
{% endblock %}
{% block javascripts_end %}
{{ parent() }}
<script src=\"https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js\"></script>
<script src=\"https://cdn.datatables.net/responsive/2.2.3/js/dataTables.responsive.min.js\"></script>
<script>
\$(document).ready(function() {
\$('#dtHorses').DataTable( {
responsive: {
details: {
display: \$.fn.dataTable.Responsive.display.childRowImmediate,
type: 'none',
target: ''
}
},
order: [[ 0, \"desc\" ]],
dom: 'Bfrtip',
language: {
buttons: {
pageLength: {
_: \"Vis %d\",
'-1': \"Alle\"
}
}
},
paging: false,
info: false,
pageLength: -1,
oLanguage: {
\"sSearch\": \"\"
},
columnDefs: [
{
\"targets\": [ 1,3,8,10 ],
\"visible\": false,
}
],
initComplete: function () {
\$i = 0;
this.api().columns().every( function () {
var title = '';
if(\$i == 1 || \$i == 3 || \$i == 8 || \$i == 10 || \$i == 15){
if(\$i == 1){
title = 'Årstid';
} else if(\$i == 3) {
title = 'Bane';
} else if(\$i == 8) {
title = 'Distanse';
} else if (\$i == 10){
title = 'Starttype';
} else if (\$i == 15){
title = 'Baneforhold';
}
var column = this;
var select = \$('<select class=\"form-control\"><option value=\"\">'+title+'</option></select>')
.appendTo( \$('.test'+\$i).empty() )
// .appendTo( \$(column.footer()).empty() )
.on( 'change', function () {
var val = \$.fn.dataTable.util.escapeRegex(
\$(this).val()
);
column
.search( val ? '^'+val+'\$' : '', true, false )
.draw();
} );
column.data().unique().sort().each( function ( d, j ) {
select.append( '<option value=\"'+d+'\">'+d+'</option>' )
} );
}
\$i++;
} );
}
});
});
/*
*/
</script>
{% endblock %}
", "pages/searchresult.html.twig", "/var/www/html/hestefaktaDEV/templates/pages/searchresult.html.twig");
}
}