<?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;
/* admin/person/persons_balance.html.twig */
class __TwigTemplate_b252e464afc0018b926a09788f5dc161 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'content' => [$this, 'block_content'],
'addJs' => [$this, 'block_addJs'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "admin/base.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "admin/person/persons_balance.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "admin/person/persons_balance.html.twig"));
$this->parent = $this->loadTemplate("admin/base.html.twig", "admin/person/persons_balance.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
public function block_title($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
yield "Баланс средств";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield '';
}
// line 5
public function block_content($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 6
yield " <h1 class=\"h3 mb-2 text-gray-800\">Баланс средств</h1>
<div class=\"card shadow mb-4 mt-4\">
<div class=\"card-header py-3\">
<h6 class=\"m-0 font-weight-bold text-primary\">Баланс средств</h6>
</div>
<div class=\"card-body\">
<div id=\"persons-balance-table-filters\" class=\"mb-4 d-flex align-items-center\" style=\"gap: 20px; flex-wrap: wrap;\">
";
// line 14
yield from $this->loadTemplate("components/table_filter.html.twig", "admin/person/persons_balance.html.twig", 14)->unwrap()->yield(CoreExtension::merge($context, ["options" => ["labelText" => "Уровень учащегося", "dropdownIdPrefix" => "level", "allItemsButtonText" => "Все уровни"]]));
// line 19
yield "
";
// line 20
yield from $this->loadTemplate("components/table_filter.html.twig", "admin/person/persons_balance.html.twig", 20)->unwrap()->yield(CoreExtension::merge($context, ["options" => ["labelText" => "Статус учащегося", "dropdownIdPrefix" => "status", "allItemsButtonText" => "Все статусы"]]));
// line 25
yield " </div>
<div class=\"table-responsive\">
";
// line 28
$context["financeCategories"] = CoreExtension::getAttribute($this->env, $this->source, (isset($context["financeCategoryService"]) || array_key_exists("financeCategoryService", $context) ? $context["financeCategoryService"] : (function () { throw new RuntimeError('Variable "financeCategoryService" does not exist.', 28, $this->source); })()), "getAllWithIdKeys", [], "method", false, false, false, 28);
// line 29
yield " ";
$context["hasWithoutFinanceCategory"] = false;
// line 30
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["persons"]) || array_key_exists("persons", $context) ? $context["persons"] : (function () { throw new RuntimeError('Variable "persons" does not exist.', 30, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 31
yield " ";
if (CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["item"], "balance", [], "any", false, true, false, 31), -1, [], "array", true, true, false, 31)) {
// line 32
yield " ";
$context["hasWithoutFinanceCategory"] = true;
// line 33
yield " ";
}
// line 34
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 35
yield "
<table class=\"table table-bordered\" id=\"persons-balance-table\">
<thead>
<tr>
<th data-table-type=\"num\">Номер п/п</th>
<th>Имя</th>
<th data-table-dropdown-id=\"levelDropdown\"
data-table-badge-id=\"levelBadge\"
data-table-dropdown-text-for-all=\"Все уровни\">Уровень учащегося</th>
<th data-export-exclude-col>Статус учащегося</th>
<th data-table-hide-col
data-table-dropdown-id=\"statusDropdown\"
data-table-badge-id=\"statusBadge\"
data-table-dropdown-text-for-all=\"Все статусы\">Статус учащегося (текст)</th>
";
// line 49
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["financeCategories"]) || array_key_exists("financeCategories", $context) ? $context["financeCategories"] : (function () { throw new RuntimeError('Variable "financeCategories" does not exist.', 49, $this->source); })()));
foreach ($context['_seq'] as $context["id"] => $context["fc"]) {
// line 50
yield " <th data-table-type=\"num\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["fc"], "name", [], "any", false, false, false, 50), "html", null, true);
yield "</th>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['id'], $context['fc'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 52
yield " ";
if ((isset($context["hasWithoutFinanceCategory"]) || array_key_exists("hasWithoutFinanceCategory", $context) ? $context["hasWithoutFinanceCategory"] : (function () { throw new RuntimeError('Variable "hasWithoutFinanceCategory" does not exist.', 52, $this->source); })())) {
// line 53
yield " <th data-table-type=\"num\">Без статьи финансов</th>
";
}
// line 55
yield " </tr>
</thead>
<tbody>
";
// line 58
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["persons"]) || array_key_exists("persons", $context) ? $context["persons"] : (function () { throw new RuntimeError('Variable "persons" does not exist.', 58, $this->source); })()));
$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["item"]) {
// line 59
yield " ";
$context["student"] = CoreExtension::getAttribute($this->env, $this->source, $context["item"], "student", [], "any", false, false, false, 59);
// line 60
yield " <tr>
<td>";
// line 61
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 61), "html", null, true);
yield "</td>
<td>";
// line 62
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\AppExtension']->getFirstLastNameWithOld($context["item"], false, true), "html", null, true);
yield "</td>
<td>";
// line 63
(((isset($context["student"]) || array_key_exists("student", $context) ? $context["student"] : (function () { throw new RuntimeError('Variable "student" does not exist.', 63, $this->source); })())) ? (yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["student"]) || array_key_exists("student", $context) ? $context["student"] : (function () { throw new RuntimeError('Variable "student" does not exist.', 63, $this->source); })()), "level", [], "any", false, false, false, 63), "html", null, true)) : (yield "–"));
yield "</td>
<td>
<span class=\"btn btn-";
// line 65
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "virtualStudentStatusCssClass", [], "any", false, false, false, 65), "html", null, true);
yield " btn-icon-split w-max cursor-default\">
<span class=\"icon text-white-50\"><i class=\"fas fa-tag\"></i></span>
<span class=\"text\">";
// line 67
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "virtualStudentStatusText", [], "any", false, false, false, 67), "html", null, true);
yield "</span>
</span>
</td>
<td>";
// line 70
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "virtualStudentStatusText", [], "any", false, false, false, 70), "html", null, true);
yield "</td>
";
// line 71
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["financeCategories"]) || array_key_exists("financeCategories", $context) ? $context["financeCategories"] : (function () { throw new RuntimeError('Variable "financeCategories" does not exist.', 71, $this->source); })()));
foreach ($context['_seq'] as $context["fcId"] => $context["fc"]) {
// line 72
yield " <td>";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["item"], "balance", [], "any", false, true, false, 72), $context["fcId"], [], "array", true, true, false, 72)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["item"], "balance", [], "any", false, true, false, 72), $context["fcId"], [], "array", false, false, false, 72), 0)) : (0)), "html", null, true);
yield "</td>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['fcId'], $context['fc'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 74
yield " ";
if ((isset($context["hasWithoutFinanceCategory"]) || array_key_exists("hasWithoutFinanceCategory", $context) ? $context["hasWithoutFinanceCategory"] : (function () { throw new RuntimeError('Variable "hasWithoutFinanceCategory" does not exist.', 74, $this->source); })())) {
// line 75
yield " ";
if (CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["item"], "balance", [], "any", false, true, false, 75), -1, [], "array", true, true, false, 75)) {
// line 76
yield " <td>";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["item"], "balance", [], "any", false, false, false, 76), -1, [], "array", false, false, false, 76), "html", null, true);
yield "</td>
";
} else {
// line 78
yield " <td>0</td>
";
}
// line 80
yield " ";
}
// line 81
yield " </tr>
";
++$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['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 83
yield " </tbody>
</table>
</div>
</div>
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield '';
}
// line 90
public function block_addJs($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "addJs"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "addJs"));
// line 91
yield " <script>
let table = new CustomDataTable('#persons-balance-table', {
drawRowNumbersForColIndex: 0,
});
table.initDataTable();
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "admin/person/persons_balance.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 303 => 91, 293 => 90, 277 => 83, 262 => 81, 259 => 80, 255 => 78, 249 => 76, 246 => 75, 243 => 74, 234 => 72, 230 => 71, 226 => 70, 220 => 67, 215 => 65, 210 => 63, 206 => 62, 202 => 61, 199 => 60, 196 => 59, 179 => 58, 174 => 55, 170 => 53, 167 => 52, 158 => 50, 154 => 49, 138 => 35, 132 => 34, 129 => 33, 126 => 32, 123 => 31, 118 => 30, 115 => 29, 113 => 28, 108 => 25, 106 => 20, 103 => 19, 101 => 14, 91 => 6, 81 => 5, 61 => 3, 38 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'admin/base.html.twig' %}
{% block title %}Баланс средств{% endblock %}
{% block content %}
<h1 class=\"h3 mb-2 text-gray-800\">Баланс средств</h1>
<div class=\"card shadow mb-4 mt-4\">
<div class=\"card-header py-3\">
<h6 class=\"m-0 font-weight-bold text-primary\">Баланс средств</h6>
</div>
<div class=\"card-body\">
<div id=\"persons-balance-table-filters\" class=\"mb-4 d-flex align-items-center\" style=\"gap: 20px; flex-wrap: wrap;\">
{% include 'components/table_filter.html.twig' with { options: {
labelText: 'Уровень учащегося',
dropdownIdPrefix: 'level',
allItemsButtonText: 'Все уровни',
}} %}
{% include 'components/table_filter.html.twig' with { options: {
labelText: 'Статус учащегося',
dropdownIdPrefix: 'status',
allItemsButtonText: 'Все статусы',
}} %}
</div>
<div class=\"table-responsive\">
{% set financeCategories = financeCategoryService.getAllWithIdKeys() %}
{% set hasWithoutFinanceCategory = false %}
{% for item in persons %}
{% if item.balance[-1] is defined %}
{% set hasWithoutFinanceCategory = true %}
{% endif %}
{% endfor %}
<table class=\"table table-bordered\" id=\"persons-balance-table\">
<thead>
<tr>
<th data-table-type=\"num\">Номер п/п</th>
<th>Имя</th>
<th data-table-dropdown-id=\"levelDropdown\"
data-table-badge-id=\"levelBadge\"
data-table-dropdown-text-for-all=\"Все уровни\">Уровень учащегося</th>
<th data-export-exclude-col>Статус учащегося</th>
<th data-table-hide-col
data-table-dropdown-id=\"statusDropdown\"
data-table-badge-id=\"statusBadge\"
data-table-dropdown-text-for-all=\"Все статусы\">Статус учащегося (текст)</th>
{% for id, fc in financeCategories %}
<th data-table-type=\"num\">{{ fc.name }}</th>
{% endfor %}
{% if hasWithoutFinanceCategory %}
<th data-table-type=\"num\">Без статьи финансов</th>
{% endif %}
</tr>
</thead>
<tbody>
{% for item in persons %}
{% set student = item.student %}
<tr>
<td>{{ loop.index }}</td>
<td>{{ getFirstLastNameWithOld(item, false, true) }}</td>
<td>{{ student ? student.level : '–' }}</td>
<td>
<span class=\"btn btn-{{ item.virtualStudentStatusCssClass }} btn-icon-split w-max cursor-default\">
<span class=\"icon text-white-50\"><i class=\"fas fa-tag\"></i></span>
<span class=\"text\">{{ item.virtualStudentStatusText }}</span>
</span>
</td>
<td>{{ item.virtualStudentStatusText }}</td>
{% for fcId, fc in financeCategories %}
<td>{{ item.balance[fcId]|default(0) }}</td>
{% endfor %}
{% if hasWithoutFinanceCategory %}
{% if item.balance[-1] is defined %}
<td>{{ item.balance[-1] }}</td>
{% else %}
<td>0</td>
{% endif %}
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endblock %}
{% block addJs %}
<script>
let table = new CustomDataTable('#persons-balance-table', {
drawRowNumbersForColIndex: 0,
});
table.initDataTable();
</script>
{% endblock %}
", "admin/person/persons_balance.html.twig", "/home/sariato/www/dev.centr.sariato.ru/templates/admin/person/persons_balance.html.twig");
}
}