<?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;
/* @App/dashboard/websites/content/_list_legacy.html.twig */
class __TwigTemplate_4063c1d45b82d1d4e2a63f90ee396f46 extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'content' => [$this, 'block_content'],
'modals' => [$this, 'block_modals'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@App/dashboard/websites/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", "@App/dashboard/websites/content/_list_legacy.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@App/dashboard/websites/content/_list_legacy.html.twig"));
// line 3
$this->extensions['App\Twig\Extension\DomExtension']->dom_title_($context, "section", "Dashboard");
// line 1
$this->parent = $this->loadTemplate("@App/dashboard/websites/base.html.twig", "@App/dashboard/websites/content/_list_legacy.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// 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
echo " <div class=\"row mb-4\">
<div class=\"col text-right\">
";
// line 8
if (twig_length_filter($this->env, (isset($context["sites"]) || array_key_exists("sites", $context) ? $context["sites"] : (function () { throw new RuntimeError('Variable "sites" does not exist.', 8, $this->source); })()))) {
// line 9
echo " ";
$this->loadTemplate("@ui2022/button--a.html.twig", "@App/dashboard/websites/content/_list_legacy.html.twig", 9)->display(twig_array_merge(twig_array_merge($context, ["text" => "View Site", "link" => twig_get_attribute($this->env, $this->source, $this->env->getFunction('web_url_catchall')->getCallable()(twig_get_attribute($this->env, $this->source, // line 11
(isset($context["sites"]) || array_key_exists("sites", $context) ? $context["sites"] : (function () { throw new RuntimeError('Variable "sites" does not exist.', 11, $this->source); })()), 0, [], "array", false, false, false, 11)), "withQueryParameter", [0 => "_mimic", 1 => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 11, $this->source); })()), "user", [], "any", false, false, false, 11), "uid", [], "any", false, false, false, 11)], "method", false, false, false, 11), "styles" => "gray", "attr" => ["class" => "mr-3"]]), ['_args' => twig_to_array(["text" => "View Site", "link" => twig_get_attribute($this->env, $this->source, $this->env->getFunction('web_url_catchall')->getCallable()(twig_get_attribute($this->env, $this->source, (isset($context["sites"]) || array_key_exists("sites", $context) ? $context["sites"] : (function () { throw new RuntimeError('Variable "sites" does not exist.', 11, $this->source); })()), 0, [], "array", false, false, false, 11)), "withQueryParameter", [0 => "_mimic", 1 => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 11, $this->source); })()), "user", [], "any", false, false, false, 11), "uid", [], "any", false, false, false, 11)], "method", false, false, false, 11), "styles" => "gray", "attr" => ["class" => "mr-3"]])]));
// line 17
echo " ";
}
// line 18
echo " ";
$this->loadTemplate("@ui2022/button--a.html.twig", "@App/dashboard/websites/content/_list_legacy.html.twig", 18)->display(twig_array_merge(twig_array_merge($context, ["text" => "+ Add", "link" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app.app.dashboard.websites.content.add"), "styles" => "primary", "modal" => "modal__add"]), ['_args' => twig_to_array(["text" => "+ Add", "link" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app.app.dashboard.websites.content.add"), "styles" => "primary", "modal" => "modal__add"])]));
// line 24
echo " </div>
</div>
<div class=\"row\">
<div class=\"col\">
";
// line 28
$this->loadTemplate("@ui2022/table-filter.html.twig", "@App/dashboard/websites/content/_list_legacy.html.twig", 28)->display(twig_array_merge(twig_array_merge($context, ["form" => // line 29
(isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 29, $this->source); })())]), ['_args' => twig_to_array(["form" => (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 29, $this->source); })())])]));
// line 31
echo " <div id=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 31, $this->source); })()), "vars", [], "any", false, false, false, 31), "id", [], "any", false, false, false, 31), "html", null, true);
echo "__results\">
";
// line 32
$context["headers"] = [0 => ["title" => "Name", "sort" => "name"], 1 => ["title" => "Type", "spacing" => 15], 2 => ["title" => "Last Modified", "spacing" => 25, "sort" => "timestamp"]];
// line 47
echo " ";
$this->loadTemplate("@App/dashboard/websites/content/_list_legacy.html.twig", "@App/dashboard/websites/content/_list_legacy.html.twig", 47, "2126852248")->display(twig_array_merge(twig_array_merge($context, ["form" => // line 48
(isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 48, $this->source); })()), "headers" => // line 49
(isset($context["headers"]) || array_key_exists("headers", $context) ? $context["headers"] : (function () { throw new RuntimeError('Variable "headers" does not exist.', 49, $this->source); })()), "items" => // line 50
(isset($context["items"]) || array_key_exists("items", $context) ? $context["items"] : (function () { throw new RuntimeError('Variable "items" does not exist.', 50, $this->source); })())]), ['_args' => twig_to_array(["form" => // line 48
(isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 48, $this->source); })()), "headers" => // line 49
(isset($context["headers"]) || array_key_exists("headers", $context) ? $context["headers"] : (function () { throw new RuntimeError('Variable "headers" does not exist.', 49, $this->source); })()), "items" => // line 50
(isset($context["items"]) || array_key_exists("items", $context) ? $context["items"] : (function () { throw new RuntimeError('Variable "items" does not exist.', 50, $this->source); })())])]));
// line 117
echo "
";
// line 118
if (( !twig_test_empty((isset($context["items"]) || array_key_exists("items", $context) ? $context["items"] : (function () { throw new RuntimeError('Variable "items" does not exist.', 118, $this->source); })())) && array_key_exists("pagination", $context))) {
// line 119
echo " ";
$this->loadTemplate("@ui2022/pagination.html.twig", "@App/dashboard/websites/content/_list_legacy.html.twig", 119)->display(twig_array_merge(twig_array_merge($context, (isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 119, $this->source); })())), ['_args' => twig_to_array((isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 119, $this->source); })()))]));
// line 120
echo " ";
}
// line 121
echo "
</div>
</div>
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 127
public function block_modals($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", "modals"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "modals"));
// line 128
echo " ";
$this->displayParentBlock("modals", $context, $blocks);
echo "
";
// line 129
$this->loadTemplate("@ui2022/modal.html.twig", "@App/dashboard/websites/content/_list_legacy.html.twig", 129)->display(twig_array_merge(twig_array_merge($context, ["attr" => ["id" => "feed-entry-modal2"]]), ['_args' => twig_to_array(["attr" => ["id" => "feed-entry-modal2"]])]));
// line 134
echo " ";
$this->loadTemplate("@ui2022/modal.html.twig", "@App/dashboard/websites/content/_list_legacy.html.twig", 134)->display(twig_array_merge(twig_array_merge($context, ["dialog_styles" => "scrollable centered", "attr" => ["id" => "modal__add", "class" => "modal-ajax"]]), ['_args' => twig_to_array(["dialog_styles" => "scrollable centered", "attr" => ["id" => "modal__add", "class" => "modal-ajax"]])]));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "@App/dashboard/websites/content/_list_legacy.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 155 => 134, 153 => 129, 148 => 128, 138 => 127, 124 => 121, 121 => 120, 118 => 119, 116 => 118, 113 => 117, 111 => 50, 110 => 49, 109 => 48, 108 => 50, 107 => 49, 106 => 48, 104 => 47, 102 => 32, 97 => 31, 95 => 29, 94 => 28, 88 => 24, 85 => 18, 82 => 17, 80 => 11, 78 => 9, 76 => 8, 72 => 6, 62 => 5, 51 => 1, 49 => 3, 36 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends '@App/dashboard/websites/base.html.twig' %}
{% do dom_title_section('Dashboard') %}
{% block content %}
<div class=\"row mb-4\">
<div class=\"col text-right\">
{% if sites|length %}
{% include '@ui2022/button--a.html.twig' with {
text: 'View Site',
link: web_url_catchall(sites[0]).withQueryParameter('_mimic', app.user.uid),
styles: 'gray',
attr: {
class: 'mr-3',
},
} %}
{% endif %}
{% include '@ui2022/button--a.html.twig' with {
text: '+ Add',
link: path('app.app.dashboard.websites.content.add'),
styles: 'primary',
modal: 'modal__add',
} %}
</div>
</div>
<div class=\"row\">
<div class=\"col\">
{% include '@ui2022/table-filter.html.twig' with {
form: form,
} %}
<div id=\"{{ form.vars.id }}__results\">
{% set headers = [
{
title: 'Name',
sort: 'name',
},
{
title: 'Type',
spacing: 15,
},
{
title: 'Last Modified',
spacing: 25,
sort: 'timestamp',
},
] %}
{% embed '@ui2022/table--search.html.twig' with {
form: form,
headers: headers,
items: items,
} %}
{% block items %}
{% for item in items %}
{% set school = item.container|schoolify %}
{% set link = web_url_view(item) %}
{% set isGranted = is_granted(
attributes_expression([
item.department ? 'campussuite.cms.container.%s.manage'|format(item.department.type) : null,
'campussuite.cms.module.manage',
'campussuite.cms.modules.page.manage',
]),
[item, item.department],
) %}
<tr>
{% include '@ui2022/table__item__cell--status.html.twig' with {
title: item.data.ui,
link: link ? link.withQueryParameter('_mimic', app.user.uid) : null,
actions: [],
status: (not item.placeholder) ? 'sent' : 'draft',
subtext: (not item.placeholder) ? 'Published' : 'Draft',
subicon: school ? 'icon-ui-board' : 'icon-folder',
subinfo: (not school) ? item.container.name : (
(school.department and school.department is same as (item.container))
? school.name
: '%s > %s'|format(
school.name,
item.container.name
)
),
actions: [
isGranted ? {
text: 'More',
dropdown: {
items: [
{
text: 'Delete',
link: path(paths.delete|format(item.discr), {
object: item.id,
}),
modal: 'feed-entry-modal2',
},
],
},
} : null,
isGranted ? {
text: 'Edit',
link: path(paths.update|format(item.discr), {
object: item.id,
}),
} : null,
]|filter((v) => v is not empty),
} %}
<td>
{{ 'app.content.types.%s'|format(item.discr)|trans }}
</td>
<td>
{{ item.timestampedAt|ui_relativeDate }}
{% if item.blamedBy %}
<div class=\"font-12\">{{ item.blamedBy.displayName }}</div>
{% endif %}
</td>
</tr>
{% endfor %}
{% endblock %}
{% endembed %}
{% if items is not empty and pagination is defined %}
{% include '@ui2022/pagination.html.twig' with pagination %}
{% endif %}
</div>
</div>
</div>
{% endblock %}
{% block modals %}
{{ parent() }}
{% include '@ui2022/modal.html.twig' with {
attr: {
id: 'feed-entry-modal2',
},
} %}
{% include '@ui2022/modal.html.twig' with {
dialog_styles: 'scrollable centered',
attr: {
id: 'modal__add',
class: 'modal-ajax',
},
} %}
{% endblock %}
", "@App/dashboard/websites/content/_list_legacy.html.twig", "/var/www/campussuite/src/App/Resources/views/dashboard/websites/content/_list_legacy.html.twig");
}
}
/* @App/dashboard/websites/content/_list_legacy.html.twig */
class __TwigTemplate_4063c1d45b82d1d4e2a63f90ee396f46___2126852248 extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'items' => [$this, 'block_items'],
];
}
protected function doGetParent(array $context)
{
// line 47
return "@ui2022/table--search.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", "@App/dashboard/websites/content/_list_legacy.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@App/dashboard/websites/content/_list_legacy.html.twig"));
$this->parent = $this->loadTemplate("@ui2022/table--search.html.twig", "@App/dashboard/websites/content/_list_legacy.html.twig", 47);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 52
public function block_items($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", "items"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "items"));
// line 53
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["items"]) || array_key_exists("items", $context) ? $context["items"] : (function () { throw new RuntimeError('Variable "items" does not exist.', 53, $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 54
echo " ";
$context["school"] = $this->extensions['App\Twig\Extension\MiscellaneousExtension']->schoolify(twig_get_attribute($this->env, $this->source, $context["item"], "container", [], "any", false, false, false, 54));
// line 55
echo " ";
$context["link"] = $this->env->getFunction('web_url_view')->getCallable()($context["item"]);
// line 56
echo "
";
// line 57
$context["isGranted"] = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted($this->extensions['App\Twig\Extension\SecurityExtension']->attributesExpression([0 => ((twig_get_attribute($this->env, $this->source, // line 59
$context["item"], "department", [], "any", false, false, false, 59)) ? (twig_sprintf("campussuite.cms.container.%s.manage", twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "department", [], "any", false, false, false, 59), "type", [], "any", false, false, false, 59))) : (null)), 1 => "campussuite.cms.module.manage", 2 => "campussuite.cms.modules.page.manage"]), [0 => // line 63
$context["item"], 1 => twig_get_attribute($this->env, $this->source, $context["item"], "department", [], "any", false, false, false, 63)]);
// line 65
echo " <tr>
";
// line 66
$this->loadTemplate("@ui2022/table__item__cell--status.html.twig", "@App/dashboard/websites/content/_list_legacy.html.twig", 66)->display(twig_array_merge(twig_array_merge($context, ["title" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 67
$context["item"], "data", [], "any", false, false, false, 67), "ui", [], "any", false, false, false, 67), "link" => (( // line 68
(isset($context["link"]) || array_key_exists("link", $context) ? $context["link"] : (function () { throw new RuntimeError('Variable "link" does not exist.', 68, $this->source); })())) ? (twig_get_attribute($this->env, $this->source, (isset($context["link"]) || array_key_exists("link", $context) ? $context["link"] : (function () { throw new RuntimeError('Variable "link" does not exist.', 68, $this->source); })()), "withQueryParameter", [0 => "_mimic", 1 => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 68, $this->source); })()), "user", [], "any", false, false, false, 68), "uid", [], "any", false, false, false, 68)], "method", false, false, false, 68)) : (null)), "actions" => [], "status" => (( !twig_get_attribute($this->env, $this->source, // line 70
$context["item"], "placeholder", [], "any", false, false, false, 70)) ? ("sent") : ("draft")), "subtext" => (( !twig_get_attribute($this->env, $this->source, // line 71
$context["item"], "placeholder", [], "any", false, false, false, 71)) ? ("Published") : ("Draft")), "subicon" => (( // line 72
(isset($context["school"]) || array_key_exists("school", $context) ? $context["school"] : (function () { throw new RuntimeError('Variable "school" does not exist.', 72, $this->source); })())) ? ("icon-ui-board") : ("icon-folder")), "subinfo" => (( ! // line 73
(isset($context["school"]) || array_key_exists("school", $context) ? $context["school"] : (function () { throw new RuntimeError('Variable "school" does not exist.', 73, $this->source); })())) ? (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "container", [], "any", false, false, false, 73), "name", [], "any", false, false, false, 73)) : ((((twig_get_attribute($this->env, $this->source, // line 74
(isset($context["school"]) || array_key_exists("school", $context) ? $context["school"] : (function () { throw new RuntimeError('Variable "school" does not exist.', 74, $this->source); })()), "department", [], "any", false, false, false, 74) && (twig_get_attribute($this->env, $this->source, (isset($context["school"]) || array_key_exists("school", $context) ? $context["school"] : (function () { throw new RuntimeError('Variable "school" does not exist.', 74, $this->source); })()), "department", [], "any", false, false, false, 74) === twig_get_attribute($this->env, $this->source, $context["item"], "container", [], "any", false, false, false, 74)))) ? (twig_get_attribute($this->env, $this->source, // line 75
(isset($context["school"]) || array_key_exists("school", $context) ? $context["school"] : (function () { throw new RuntimeError('Variable "school" does not exist.', 75, $this->source); })()), "name", [], "any", false, false, false, 75)) : (twig_sprintf("%s > %s", twig_get_attribute($this->env, $this->source, // line 77
(isset($context["school"]) || array_key_exists("school", $context) ? $context["school"] : (function () { throw new RuntimeError('Variable "school" does not exist.', 77, $this->source); })()), "name", [], "any", false, false, false, 77), twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 78
$context["item"], "container", [], "any", false, false, false, 78), "name", [], "any", false, false, false, 78)))))), "actions" => twig_array_filter($this->env, [0 => (( // line 82
(isset($context["isGranted"]) || array_key_exists("isGranted", $context) ? $context["isGranted"] : (function () { throw new RuntimeError('Variable "isGranted" does not exist.', 82, $this->source); })())) ? (["text" => "More", "dropdown" => ["items" => [0 => ["text" => "Delete", "link" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath(twig_sprintf(twig_get_attribute($this->env, $this->source, // line 88
(isset($context["paths"]) || array_key_exists("paths", $context) ? $context["paths"] : (function () { throw new RuntimeError('Variable "paths" does not exist.', 88, $this->source); })()), "delete", [], "any", false, false, false, 88), twig_get_attribute($this->env, $this->source, $context["item"], "discr", [], "any", false, false, false, 88)), ["object" => twig_get_attribute($this->env, $this->source, // line 89
$context["item"], "id", [], "any", false, false, false, 89)]), "modal" => "feed-entry-modal2"]]]]) : (null)), 1 => (( // line 96
(isset($context["isGranted"]) || array_key_exists("isGranted", $context) ? $context["isGranted"] : (function () { throw new RuntimeError('Variable "isGranted" does not exist.', 96, $this->source); })())) ? (["text" => "Edit", "link" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath(twig_sprintf(twig_get_attribute($this->env, $this->source, // line 98
(isset($context["paths"]) || array_key_exists("paths", $context) ? $context["paths"] : (function () { throw new RuntimeError('Variable "paths" does not exist.', 98, $this->source); })()), "update", [], "any", false, false, false, 98), twig_get_attribute($this->env, $this->source, $context["item"], "discr", [], "any", false, false, false, 98)), ["object" => twig_get_attribute($this->env, $this->source, // line 99
$context["item"], "id", [], "any", false, false, false, 99)])]) : (null))], // line 102
function ($__v__) use ($context, $macros) { $context["v"] = $__v__; return !twig_test_empty((isset($context["v"]) || array_key_exists("v", $context) ? $context["v"] : (function () { throw new RuntimeError('Variable "v" does not exist.', 102, $this->source); })())); })]), ['_args' => twig_to_array(["title" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 67
$context["item"], "data", [], "any", false, false, false, 67), "ui", [], "any", false, false, false, 67), "link" => (( // line 68
(isset($context["link"]) || array_key_exists("link", $context) ? $context["link"] : (function () { throw new RuntimeError('Variable "link" does not exist.', 68, $this->source); })())) ? (twig_get_attribute($this->env, $this->source, (isset($context["link"]) || array_key_exists("link", $context) ? $context["link"] : (function () { throw new RuntimeError('Variable "link" does not exist.', 68, $this->source); })()), "withQueryParameter", [0 => "_mimic", 1 => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 68, $this->source); })()), "user", [], "any", false, false, false, 68), "uid", [], "any", false, false, false, 68)], "method", false, false, false, 68)) : (null)), "actions" => [], "status" => (( !twig_get_attribute($this->env, $this->source, // line 70
$context["item"], "placeholder", [], "any", false, false, false, 70)) ? ("sent") : ("draft")), "subtext" => (( !twig_get_attribute($this->env, $this->source, // line 71
$context["item"], "placeholder", [], "any", false, false, false, 71)) ? ("Published") : ("Draft")), "subicon" => (( // line 72
(isset($context["school"]) || array_key_exists("school", $context) ? $context["school"] : (function () { throw new RuntimeError('Variable "school" does not exist.', 72, $this->source); })())) ? ("icon-ui-board") : ("icon-folder")), "subinfo" => (( ! // line 73
(isset($context["school"]) || array_key_exists("school", $context) ? $context["school"] : (function () { throw new RuntimeError('Variable "school" does not exist.', 73, $this->source); })())) ? (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "container", [], "any", false, false, false, 73), "name", [], "any", false, false, false, 73)) : ((((twig_get_attribute($this->env, $this->source, // line 74
(isset($context["school"]) || array_key_exists("school", $context) ? $context["school"] : (function () { throw new RuntimeError('Variable "school" does not exist.', 74, $this->source); })()), "department", [], "any", false, false, false, 74) && (twig_get_attribute($this->env, $this->source, (isset($context["school"]) || array_key_exists("school", $context) ? $context["school"] : (function () { throw new RuntimeError('Variable "school" does not exist.', 74, $this->source); })()), "department", [], "any", false, false, false, 74) === twig_get_attribute($this->env, $this->source, $context["item"], "container", [], "any", false, false, false, 74)))) ? (twig_get_attribute($this->env, $this->source, // line 75
(isset($context["school"]) || array_key_exists("school", $context) ? $context["school"] : (function () { throw new RuntimeError('Variable "school" does not exist.', 75, $this->source); })()), "name", [], "any", false, false, false, 75)) : (twig_sprintf("%s > %s", twig_get_attribute($this->env, $this->source, // line 77
(isset($context["school"]) || array_key_exists("school", $context) ? $context["school"] : (function () { throw new RuntimeError('Variable "school" does not exist.', 77, $this->source); })()), "name", [], "any", false, false, false, 77), twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 78
$context["item"], "container", [], "any", false, false, false, 78), "name", [], "any", false, false, false, 78)))))), "actions" => twig_array_filter($this->env, [0 => (( // line 82
(isset($context["isGranted"]) || array_key_exists("isGranted", $context) ? $context["isGranted"] : (function () { throw new RuntimeError('Variable "isGranted" does not exist.', 82, $this->source); })())) ? (["text" => "More", "dropdown" => ["items" => [0 => ["text" => "Delete", "link" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath(twig_sprintf(twig_get_attribute($this->env, $this->source, // line 88
(isset($context["paths"]) || array_key_exists("paths", $context) ? $context["paths"] : (function () { throw new RuntimeError('Variable "paths" does not exist.', 88, $this->source); })()), "delete", [], "any", false, false, false, 88), twig_get_attribute($this->env, $this->source, $context["item"], "discr", [], "any", false, false, false, 88)), ["object" => twig_get_attribute($this->env, $this->source, // line 89
$context["item"], "id", [], "any", false, false, false, 89)]), "modal" => "feed-entry-modal2"]]]]) : (null)), 1 => (( // line 96
(isset($context["isGranted"]) || array_key_exists("isGranted", $context) ? $context["isGranted"] : (function () { throw new RuntimeError('Variable "isGranted" does not exist.', 96, $this->source); })())) ? (["text" => "Edit", "link" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath(twig_sprintf(twig_get_attribute($this->env, $this->source, // line 98
(isset($context["paths"]) || array_key_exists("paths", $context) ? $context["paths"] : (function () { throw new RuntimeError('Variable "paths" does not exist.', 98, $this->source); })()), "update", [], "any", false, false, false, 98), twig_get_attribute($this->env, $this->source, $context["item"], "discr", [], "any", false, false, false, 98)), ["object" => twig_get_attribute($this->env, $this->source, // line 99
$context["item"], "id", [], "any", false, false, false, 99)])]) : (null))], // line 102
function ($__v__) use ($context, $macros) { $context["v"] = $__v__; return !twig_test_empty((isset($context["v"]) || array_key_exists("v", $context) ? $context["v"] : (function () { throw new RuntimeError('Variable "v" does not exist.', 102, $this->source); })())); })])]));
// line 104
echo " <td>
";
// line 105
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_sprintf("app.content.types.%s", twig_get_attribute($this->env, $this->source, $context["item"], "discr", [], "any", false, false, false, 105))), "html", null, true);
echo "
</td>
<td>
";
// line 108
echo twig_escape_filter($this->env, $this->extensions['Cms\CoreBundle\Service\Twig\DateTimeExtension']->ui_relativeDate(twig_get_attribute($this->env, $this->source, $context["item"], "timestampedAt", [], "any", false, false, false, 108)), "html", null, true);
echo "
";
// line 109
if (twig_get_attribute($this->env, $this->source, $context["item"], "blamedBy", [], "any", false, false, false, 109)) {
// line 110
echo " <div class=\"font-12\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "blamedBy", [], "any", false, false, false, 110), "displayName", [], "any", false, false, false, 110), "html", null, true);
echo "</div>
";
}
// line 112
echo " </td>
</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 115
echo " ";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "@App/dashboard/websites/content/_list_legacy.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 488 => 115, 472 => 112, 466 => 110, 464 => 109, 460 => 108, 454 => 105, 451 => 104, 449 => 102, 448 => 99, 447 => 98, 446 => 96, 445 => 89, 444 => 88, 443 => 82, 442 => 78, 441 => 77, 440 => 75, 439 => 74, 438 => 73, 437 => 72, 436 => 71, 435 => 70, 434 => 68, 433 => 67, 432 => 102, 431 => 99, 430 => 98, 429 => 96, 428 => 89, 427 => 88, 426 => 82, 425 => 78, 424 => 77, 423 => 75, 422 => 74, 421 => 73, 420 => 72, 419 => 71, 418 => 70, 417 => 68, 416 => 67, 415 => 66, 412 => 65, 410 => 63, 409 => 59, 408 => 57, 405 => 56, 402 => 55, 399 => 54, 381 => 53, 371 => 52, 348 => 47, 155 => 134, 153 => 129, 148 => 128, 138 => 127, 124 => 121, 121 => 120, 118 => 119, 116 => 118, 113 => 117, 111 => 50, 110 => 49, 109 => 48, 108 => 50, 107 => 49, 106 => 48, 104 => 47, 102 => 32, 97 => 31, 95 => 29, 94 => 28, 88 => 24, 85 => 18, 82 => 17, 80 => 11, 78 => 9, 76 => 8, 72 => 6, 62 => 5, 51 => 1, 49 => 3, 36 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends '@App/dashboard/websites/base.html.twig' %}
{% do dom_title_section('Dashboard') %}
{% block content %}
<div class=\"row mb-4\">
<div class=\"col text-right\">
{% if sites|length %}
{% include '@ui2022/button--a.html.twig' with {
text: 'View Site',
link: web_url_catchall(sites[0]).withQueryParameter('_mimic', app.user.uid),
styles: 'gray',
attr: {
class: 'mr-3',
},
} %}
{% endif %}
{% include '@ui2022/button--a.html.twig' with {
text: '+ Add',
link: path('app.app.dashboard.websites.content.add'),
styles: 'primary',
modal: 'modal__add',
} %}
</div>
</div>
<div class=\"row\">
<div class=\"col\">
{% include '@ui2022/table-filter.html.twig' with {
form: form,
} %}
<div id=\"{{ form.vars.id }}__results\">
{% set headers = [
{
title: 'Name',
sort: 'name',
},
{
title: 'Type',
spacing: 15,
},
{
title: 'Last Modified',
spacing: 25,
sort: 'timestamp',
},
] %}
{% embed '@ui2022/table--search.html.twig' with {
form: form,
headers: headers,
items: items,
} %}
{% block items %}
{% for item in items %}
{% set school = item.container|schoolify %}
{% set link = web_url_view(item) %}
{% set isGranted = is_granted(
attributes_expression([
item.department ? 'campussuite.cms.container.%s.manage'|format(item.department.type) : null,
'campussuite.cms.module.manage',
'campussuite.cms.modules.page.manage',
]),
[item, item.department],
) %}
<tr>
{% include '@ui2022/table__item__cell--status.html.twig' with {
title: item.data.ui,
link: link ? link.withQueryParameter('_mimic', app.user.uid) : null,
actions: [],
status: (not item.placeholder) ? 'sent' : 'draft',
subtext: (not item.placeholder) ? 'Published' : 'Draft',
subicon: school ? 'icon-ui-board' : 'icon-folder',
subinfo: (not school) ? item.container.name : (
(school.department and school.department is same as (item.container))
? school.name
: '%s > %s'|format(
school.name,
item.container.name
)
),
actions: [
isGranted ? {
text: 'More',
dropdown: {
items: [
{
text: 'Delete',
link: path(paths.delete|format(item.discr), {
object: item.id,
}),
modal: 'feed-entry-modal2',
},
],
},
} : null,
isGranted ? {
text: 'Edit',
link: path(paths.update|format(item.discr), {
object: item.id,
}),
} : null,
]|filter((v) => v is not empty),
} %}
<td>
{{ 'app.content.types.%s'|format(item.discr)|trans }}
</td>
<td>
{{ item.timestampedAt|ui_relativeDate }}
{% if item.blamedBy %}
<div class=\"font-12\">{{ item.blamedBy.displayName }}</div>
{% endif %}
</td>
</tr>
{% endfor %}
{% endblock %}
{% endembed %}
{% if items is not empty and pagination is defined %}
{% include '@ui2022/pagination.html.twig' with pagination %}
{% endif %}
</div>
</div>
</div>
{% endblock %}
{% block modals %}
{{ parent() }}
{% include '@ui2022/modal.html.twig' with {
attr: {
id: 'feed-entry-modal2',
},
} %}
{% include '@ui2022/modal.html.twig' with {
dialog_styles: 'scrollable centered',
attr: {
id: 'modal__add',
class: 'modal-ajax',
},
} %}
{% endblock %}
", "@App/dashboard/websites/content/_list_legacy.html.twig", "/var/www/campussuite/src/App/Resources/views/dashboard/websites/content/_list_legacy.html.twig");
}
}