var/cache/test/twig/cb/cb21aee39844badce2035c83afc590a5.php line 242

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* @ProductsSchoolNow/dashboard/default/main.html.twig */
  14. class __TwigTemplate_759d521f55862c765832447053fff48c extends \Twig\Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'header' => [$this'block_header'],
  24.             'content' => [$this'block_content'],
  25.             'modals' => [$this'block_modals'],
  26.         ];
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 1
  31.         return "@ProductsSchoolNow/base.html.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@ProductsSchoolNow/dashboard/default/main.html.twig"));
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@ProductsSchoolNow/dashboard/default/main.html.twig"));
  40.         // line 3
  41.         $this->extensions['App\Twig\Extension\DomExtension']->dom_title_($context"section""Dashboard");
  42.         // line 5
  43.         $context["compose"] = ((array_key_exists("compose"$context)) ? ((isset($context["compose"]) || array_key_exists("compose"$context) ? $context["compose"] : (function () { throw new RuntimeError('Variable "compose" does not exist.'5$this->source); })())) : (true));
  44.         // line 6
  45.         $context["actions"] = ((array_key_exists("actions"$context)) ? ((isset($context["actions"]) || array_key_exists("actions"$context) ? $context["actions"] : (function () { throw new RuntimeError('Variable "actions" does not exist.'6$this->source); })())) : (true));
  46.         // line 1
  47.         $this->parent $this->loadTemplate("@ProductsSchoolNow/base.html.twig""@ProductsSchoolNow/dashboard/default/main.html.twig"1);
  48.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  49.         
  50.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  51.         
  52.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  53.     }
  54.     // line 7
  55.     public function block_header($context, array $blocks = [])
  56.     {
  57.         $macros $this->macros;
  58.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  59.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""header"));
  60.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  61.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""header"));
  62.         // line 8
  63.         echo "    ";
  64.         if ((twig_length_filter($this->env, (isset($context["announcements"]) || array_key_exists("announcements"$context) ? $context["announcements"] : (function () { throw new RuntimeError('Variable "announcements" does not exist.'8$this->source); })())) > 0)) {
  65.             // line 9
  66.             echo "        <div class=\"feeds__area\">
  67.             ";
  68.             // line 10
  69.             $context['_parent'] = $context;
  70.             $context['_seq'] = twig_ensure_traversable((isset($context["announcements"]) || array_key_exists("announcements"$context) ? $context["announcements"] : (function () { throw new RuntimeError('Variable "announcements" does not exist.'10$this->source); })()));
  71.             $context['loop'] = [
  72.               'parent' => $context['_parent'],
  73.               'index0' => 0,
  74.               'index'  => 1,
  75.               'first'  => true,
  76.             ];
  77.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  78.                 $length count($context['_seq']);
  79.                 $context['loop']['revindex0'] = $length 1;
  80.                 $context['loop']['revindex'] = $length;
  81.                 $context['loop']['length'] = $length;
  82.                 $context['loop']['last'] = === $length;
  83.             }
  84.             foreach ($context['_seq'] as $context["_key"] => $context["announcement"]) {
  85.                 // line 11
  86.                 echo "                ";
  87.                 $this->loadTemplate("@ProductsSchoolNow/dashboard/default/main.html.twig""@ProductsSchoolNow/dashboard/default/main.html.twig"11"533964539")->display(twig_array_merge(twig_array_merge($context, ["styles" => twig_get_attribute($this->env$this->source,                 // line 12
  88. $context["announcement"], "state", [], "any"falsefalsefalse12)]), ['_args' => twig_to_array(["styles" => twig_get_attribute($this->env$this->source$context["announcement"], "state", [], "any"falsefalsefalse12)])]));
  89.                 // line 21
  90.                 echo "            ";
  91.                 ++$context['loop']['index0'];
  92.                 ++$context['loop']['index'];
  93.                 $context['loop']['first'] = false;
  94.                 if (isset($context['loop']['length'])) {
  95.                     --$context['loop']['revindex0'];
  96.                     --$context['loop']['revindex'];
  97.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  98.                 }
  99.             }
  100.             $_parent $context['_parent'];
  101.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['announcement'], $context['_parent'], $context['loop']);
  102.             $context array_intersect_key($context$_parent) + $_parent;
  103.             // line 22
  104.             echo "        </div>
  105.     ";
  106.         }
  107.         
  108.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  109.         
  110.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  111.     }
  112.     // line 25
  113.     public function block_content($context, array $blocks = [])
  114.     {
  115.         $macros $this->macros;
  116.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  117.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  118.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  119.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  120.         // line 26
  121.         echo "    <div class=\"feeds__area\">
  122.         ";
  123.         // line 27
  124.         if ((array_key_exists("form"$context) && (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'27$this->source); })()))) {
  125.             // line 28
  126.             echo "            ";
  127.             $this->loadTemplate("@ui2022/schoolnow/feed__search__box.html.twig""@ProductsSchoolNow/dashboard/default/main.html.twig"28)->display(twig_array_merge(twig_array_merge($context, ["form" =>             // line 29
  128. (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); })())])]));
  129.             // line 31
  130.             echo "        ";
  131.         }
  132.         // line 32
  133.         echo "        ";
  134.         if ((isset($context["compose"]) || array_key_exists("compose"$context) ? $context["compose"] : (function () { throw new RuntimeError('Variable "compose" does not exist.'32$this->source); })())) {
  135.             // line 33
  136.             echo "            <div class=\"feeds__compose\">
  137.                 ";
  138.             // line 34
  139.             if ((isset($context["isGrantedShare"]) || array_key_exists("isGrantedShare"$context) ? $context["isGrantedShare"] : (function () { throw new RuntimeError('Variable "isGrantedShare" does not exist.'34$this->source); })())) {
  140.                 // line 35
  141.                 echo "                    ";
  142.                 $this->loadTemplate("@ui2022/schoolnow/feature__button.html.twig""@ProductsSchoolNow/dashboard/default/main.html.twig"35)->display(twig_array_merge(twig_array_merge($context, ["title" => "Share a Post""image" => "/ui2022/images/sharepost.svg""link" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app.schoolnow.dashboard.default.create")]), ['_args' => twig_to_array(["title" => "Share a Post""image" => "/ui2022/images/sharepost.svg""link" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app.schoolnow.dashboard.default.create")])]));
  143.                 // line 40
  144.                 echo "                ";
  145.             }
  146.             // line 41
  147.             echo "                ";
  148.             if ($this->extensions['App\Twig\Extension\SecurityExtension']->maybeGranted([=> "app.notifications.messaging.general"=> "app.notifications.messaging.urgent"])) {
  149.                 // line 42
  150.                 echo "                    ";
  151.                 $this->loadTemplate("@ui2022/schoolnow/feature__button.html.twig""@ProductsSchoolNow/dashboard/default/main.html.twig"42)->display(twig_array_merge(twig_array_merge($context, ["title" => "Send a Message""image" => "/ui2022/images/sendmessage.svg""link" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app.notifications.dashboard.default.select_modal"), "modal" => "modal__new_broadcast"]), ['_args' => twig_to_array(["title" => "Send a Message""image" => "/ui2022/images/sendmessage.svg""link" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app.notifications.dashboard.default.select_modal"), "modal" => "modal__new_broadcast"])]));
  152.                 // line 48
  153.                 echo "                ";
  154.             }
  155.             // line 49
  156.             echo "            </div>
  157.         ";
  158.         }
  159.         // line 51
  160.         echo "        <div id=\"feeds__list\" class=\"feeds__list\">
  161.             ";
  162.         // line 52
  163.         if (array_key_exists("notifications"$context)) {
  164.             // line 53
  165.             echo "                ";
  166.             $context['_parent'] = $context;
  167.             $context['_seq'] = twig_ensure_traversable((isset($context["notifications"]) || array_key_exists("notifications"$context) ? $context["notifications"] : (function () { throw new RuntimeError('Variable "notifications" does not exist.'53$this->source); })()));
  168.             $context['loop'] = [
  169.               'parent' => $context['_parent'],
  170.               'index0' => 0,
  171.               'index'  => 1,
  172.               'first'  => true,
  173.             ];
  174.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  175.                 $length count($context['_seq']);
  176.                 $context['loop']['revindex0'] = $length 1;
  177.                 $context['loop']['revindex'] = $length;
  178.                 $context['loop']['length'] = $length;
  179.                 $context['loop']['last'] = === $length;
  180.             }
  181.             foreach ($context['_seq'] as $context["_key"] => $context["notification"]) {
  182.                 // line 54
  183.                 echo "                    ";
  184.                 $this->loadTemplate("@ProductsSchoolNow/dashboard/default/_entry.html.twig""@ProductsSchoolNow/dashboard/default/main.html.twig"54)->display(twig_array_merge(twig_array_merge($context, ["entry" =>                 // line 55
  185. $context["notification"], "type" => "notification""modal" => "feed-entry-modal""actions" => []]), ['_args' => twig_to_array(["entry" => $context["notification"], "type" => "notification""modal" => "feed-entry-modal""actions" => []])]));
  186.                 // line 60
  187.                 echo "                ";
  188.                 ++$context['loop']['index0'];
  189.                 ++$context['loop']['index'];
  190.                 $context['loop']['first'] = false;
  191.                 if (isset($context['loop']['length'])) {
  192.                     --$context['loop']['revindex0'];
  193.                     --$context['loop']['revindex'];
  194.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  195.                 }
  196.             }
  197.             $_parent $context['_parent'];
  198.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['notification'], $context['_parent'], $context['loop']);
  199.             $context array_intersect_key($context$_parent) + $_parent;
  200.             // line 61
  201.             echo "            ";
  202.         }
  203.         // line 62
  204.         echo "            ";
  205.         if (twig_length_filter($this->env, (isset($context["feed"]) || array_key_exists("feed"$context) ? $context["feed"] : (function () { throw new RuntimeError('Variable "feed" does not exist.'62$this->source); })()))) {
  206.             // line 63
  207.             echo "                ";
  208.             $context['_parent'] = $context;
  209.             $context['_seq'] = twig_ensure_traversable((isset($context["feed"]) || array_key_exists("feed"$context) ? $context["feed"] : (function () { throw new RuntimeError('Variable "feed" does not exist.'63$this->source); })()));
  210.             $context['loop'] = [
  211.               'parent' => $context['_parent'],
  212.               'index0' => 0,
  213.               'index'  => 1,
  214.               'first'  => true,
  215.             ];
  216.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  217.                 $length count($context['_seq']);
  218.                 $context['loop']['revindex0'] = $length 1;
  219.                 $context['loop']['revindex'] = $length;
  220.                 $context['loop']['length'] = $length;
  221.                 $context['loop']['last'] = === $length;
  222.             }
  223.             foreach ($context['_seq'] as $context["_key"] => $context["entry"]) {
  224.                 // line 64
  225.                 echo "                    ";
  226.                 if (twig_get_attribute($this->env$this->source$context["entry"], "entry", [], "any"truetruefalse64)) {
  227.                     // line 65
  228.                     echo "                        ";
  229.                     $context["entry"] = twig_get_attribute($this->env$this->source$context["entry"], "entry", [], "any"falsefalsefalse65);
  230.                     // line 66
  231.                     echo "                    ";
  232.                 }
  233.                 // line 67
  234.                 echo "
  235.                     ";
  236.                 // line 68
  237.                 $context["attributes"] = $this->extensions['App\Twig\Extension\SecurityExtension']->attributesExpression([=> ((twig_get_attribute($this->env$this->source,                 // line 69
  238. $context["entry"], "department", [], "any"falsefalsefalse69)) ? (twig_sprintf("campussuite.cms.container.%s.manage"twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["entry"], "department", [], "any"falsefalsefalse69), "type", [], "any"falsefalsefalse69))) : (null)), => "campussuite.cms.module.manage"]);
  239.                 // line 72
  240.                 echo "
  241.                     ";
  242.                 // line 73
  243.                 $context["socialPostCount"] = 0;
  244.                 // line 74
  245.                 echo "                    ";
  246.                 if ((((twig_get_attribute($this->env$this->source$context["entry"], "object", [], "any"truetruefalse74) &&  !twig_test_empty(twig_get_attribute($this->env$this->source$context["entry"], "object", [], "any"falsefalsefalse74))) && twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["entry"], "object", [], "any"falsetruefalse74), "socialPosts", [], "any"truetruefalse74)) &&  !twig_test_empty(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["entry"], "object", [], "any"falsefalsefalse74), "socialPosts", [], "any"falsefalsefalse74)))) {
  247.                     // line 75
  248.                     echo "                        ";
  249.                     $context["socialPostCount"] = twig_length_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["entry"], "object", [], "any"falsefalsefalse75), "socialPosts", [], "any"falsefalsefalse75));
  250.                     // line 76
  251.                     echo "                    ";
  252.                 }
  253.                 // line 77
  254.                 echo "                    ";
  255.                 $context["subMenuItems"] = [];
  256.                 // line 78
  257.                 echo "                    ";
  258.                 if ((< (isset($context["socialPostCount"]) || array_key_exists("socialPostCount"$context) ? $context["socialPostCount"] : (function () { throw new RuntimeError('Variable "socialPostCount" does not exist.'78$this->source); })()))) {
  259.                     // line 79
  260.                     echo "                        ";
  261.                     $context["subMenuItems"] = twig_array_merge((isset($context["subMenuItems"]) || array_key_exists("subMenuItems"$context) ? $context["subMenuItems"] : (function () { throw new RuntimeError('Variable "subMenuItems" does not exist.'79$this->source); })()), [=> ["title" => (("Social Posts (" .                     // line 82
  262. (isset($context["socialPostCount"]) || array_key_exists("socialPostCount"$context) ? $context["socialPostCount"] : (function () { throw new RuntimeError('Variable "socialPostCount" does not exist.'82$this->source); })())) . ")"), "link" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app.schoolnow.dashboard.default.social_accounts", ["entry" => twig_get_attribute($this->env$this->source,                     // line 84
  263. $context["entry"], "id", [], "any"falsefalsefalse84)]), "modal" => "feed-entry-modal2"]]);
  264.                     // line 90
  265.                     echo "                    ";
  266.                 }
  267.                 // line 91
  268.                 echo "                    ";
  269.                 $context["subMenuItems"] = twig_array_merge((isset($context["subMenuItems"]) || array_key_exists("subMenuItems"$context) ? $context["subMenuItems"] : (function () { throw new RuntimeError('Variable "subMenuItems" does not exist.'91$this->source); })()), [=> ["title" => "Delete""link" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app.schoolnow.dashboard.default.delete", ["entry" => twig_get_attribute($this->env$this->source,                 // line 96
  270. $context["entry"], "id", [], "any"falsefalsefalse96)]), "modal" => "feed-entry-modal2"]]);
  271.                 // line 102
  272.                 echo "                    ";
  273.                 $this->loadTemplate("@ProductsSchoolNow/dashboard/default/_entry.html.twig""@ProductsSchoolNow/dashboard/default/main.html.twig"102)->display(twig_array_merge(twig_array_merge($context, ["entry" =>                 // line 103
  274. $context["entry"], "type" => (( !twig_get_attribute($this->env$this->source,                 // line 104
  275. $context["entry"], "type", [], "any"truetruefalse104)) ? ("notification") : (null)), "modal" => "feed-entry-modal""actions" => ((                // line 106
  276. (isset($context["actions"]) || array_key_exists("actions"$context) ? $context["actions"] : (function () { throw new RuntimeError('Variable "actions" does not exist.'106$this->source); })())) ? (twig_array_filter($this->env, [=> (( !twig_get_attribute($this->env$this->source,                 // line 107
  277. $context["entry"], "type", [], "any"truetruefalse107)) ? (null) : ((($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("app.feed.pin")) ? (["icon" => "icon-pin""toggled" => twig_get_attribute($this->env$this->source,                 // line 109
  278. $context["entry"], "pinned", [], "any"falsefalsefalse109), "toggler" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app.schoolnow.dashboard.default.pin", ["entry" => twig_get_attribute($this->env$this->source,                 // line 111
  279. $context["entry"], "id", [], "any"falsefalsefalse111)])]) : (null)))), => (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted(                // line 114
  280. (isset($context["attributes"]) || array_key_exists("attributes"$context) ? $context["attributes"] : (function () { throw new RuntimeError('Variable "attributes" does not exist.'114$this->source); })()), [=> $context["entry"], => twig_get_attribute($this->env$this->source$context["entry"], "department", [], "any"falsefalsefalse114)])) ? (["title" => "More""items" =>                 // line 116
  281. (isset($context["subMenuItems"]) || array_key_exists("subMenuItems"$context) ? $context["subMenuItems"] : (function () { throw new RuntimeError('Variable "subMenuItems" does not exist.'116$this->source); })())]) : (null)), => (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted(                // line 118
  282. (isset($context["attributes"]) || array_key_exists("attributes"$context) ? $context["attributes"] : (function () { throw new RuntimeError('Variable "attributes" does not exist.'118$this->source); })()), [=> $context["entry"], => twig_get_attribute($this->env$this->source$context["entry"], "department", [], "any"falsefalsefalse118)])) ? (["title" => "Edit""link" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app.schoolnow.dashboard.default.update", ["entry" => twig_get_attribute($this->env$this->source,                 // line 121
  283. $context["entry"], "id", [], "any"falsefalsefalse121)])]) : (null))],                 // line 124
  284. 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.'124$this->source); })())); })) : (null))]), ['_args' => twig_to_array(["entry" =>                 // line 103
  285. $context["entry"], "type" => (( !twig_get_attribute($this->env$this->source,                 // line 104
  286. $context["entry"], "type", [], "any"truetruefalse104)) ? ("notification") : (null)), "modal" => "feed-entry-modal""actions" => ((                // line 106
  287. (isset($context["actions"]) || array_key_exists("actions"$context) ? $context["actions"] : (function () { throw new RuntimeError('Variable "actions" does not exist.'106$this->source); })())) ? (twig_array_filter($this->env, [=> (( !twig_get_attribute($this->env$this->source,                 // line 107
  288. $context["entry"], "type", [], "any"truetruefalse107)) ? (null) : ((($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("app.feed.pin")) ? (["icon" => "icon-pin""toggled" => twig_get_attribute($this->env$this->source,                 // line 109
  289. $context["entry"], "pinned", [], "any"falsefalsefalse109), "toggler" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app.schoolnow.dashboard.default.pin", ["entry" => twig_get_attribute($this->env$this->source,                 // line 111
  290. $context["entry"], "id", [], "any"falsefalsefalse111)])]) : (null)))), => (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted(                // line 114
  291. (isset($context["attributes"]) || array_key_exists("attributes"$context) ? $context["attributes"] : (function () { throw new RuntimeError('Variable "attributes" does not exist.'114$this->source); })()), [=> $context["entry"], => twig_get_attribute($this->env$this->source$context["entry"], "department", [], "any"falsefalsefalse114)])) ? (["title" => "More""items" =>                 // line 116
  292. (isset($context["subMenuItems"]) || array_key_exists("subMenuItems"$context) ? $context["subMenuItems"] : (function () { throw new RuntimeError('Variable "subMenuItems" does not exist.'116$this->source); })())]) : (null)), => (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted(                // line 118
  293. (isset($context["attributes"]) || array_key_exists("attributes"$context) ? $context["attributes"] : (function () { throw new RuntimeError('Variable "attributes" does not exist.'118$this->source); })()), [=> $context["entry"], => twig_get_attribute($this->env$this->source$context["entry"], "department", [], "any"falsefalsefalse118)])) ? (["title" => "Edit""link" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app.schoolnow.dashboard.default.update", ["entry" => twig_get_attribute($this->env$this->source,                 // line 121
  294. $context["entry"], "id", [], "any"falsefalsefalse121)])]) : (null))],                 // line 124
  295. 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.'124$this->source); })())); })) : (null))])]));
  296.                 // line 126
  297.                 echo "                ";
  298.                 ++$context['loop']['index0'];
  299.                 ++$context['loop']['index'];
  300.                 $context['loop']['first'] = false;
  301.                 if (isset($context['loop']['length'])) {
  302.                     --$context['loop']['revindex0'];
  303.                     --$context['loop']['revindex'];
  304.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  305.                 }
  306.             }
  307.             $_parent $context['_parent'];
  308.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['entry'], $context['_parent'], $context['loop']);
  309.             $context array_intersect_key($context$_parent) + $_parent;
  310.             // line 127
  311.             echo "            ";
  312.         } else {
  313.             // line 128
  314.             echo "                <p class=\"alert alert-dark text-center\">
  315.                     The search did not find any results.<br />
  316.                     <a href=\"";
  317.             // line 130
  318.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app.schoolnow.dashboard.default.main");
  319.             echo "\">Clear search</a>
  320.                 </p>
  321.             ";
  322.         }
  323.         // line 133
  324.         echo "        </div>
  325.         ";
  326.         // line 134
  327.         if (( !twig_test_empty((isset($context["feed"]) || array_key_exists("feed"$context) ? $context["feed"] : (function () { throw new RuntimeError('Variable "feed" does not exist.'134$this->source); })())) && array_key_exists("pagination"$context))) {
  328.             // line 135
  329.             echo "            ";
  330.             $this->loadTemplate("@ui2022/pagination.html.twig""@ProductsSchoolNow/dashboard/default/main.html.twig"135)->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.'135$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.'135$this->source); })()))]));
  331.             // line 136
  332.             echo "        ";
  333.         }
  334.         // line 137
  335.         echo "    </div>
  336.     <script type=\"text/javascript\">
  337.         (function (window, document, \$, undefined) {
  338.             \$(function () {
  339.                 \$('#feeds__list')
  340.                     .on('done.toggler', '[data-trigger=\"toggler\"]', function (e) {
  341.                         var \$target = \$(e.currentTarget);
  342.                         \$target.closest('.options').find('.feedbox__pinned').toggleClass('pinned', \$target.is(':checked'));
  343.                     })
  344.                 ;
  345.             });
  346.         })(window, document, jQuery);
  347.     </script>
  348. ";
  349.         
  350.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  351.         
  352.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  353.     }
  354.     // line 152
  355.     public function block_modals($context, array $blocks = [])
  356.     {
  357.         $macros $this->macros;
  358.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  359.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""modals"));
  360.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  361.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""modals"));
  362.         // line 153
  363.         echo "    ";
  364.         $this->displayParentBlock("modals"$context$blocks);
  365.         echo "
  366.     ";
  367.         // line 154
  368.         $this->loadTemplate("@ui2022/modal.html.twig""@ProductsSchoolNow/dashboard/default/main.html.twig"154)->display(twig_array_merge(twig_array_merge($context, ["attr" => ["id" => "feed-entry-modal2"]]), ['_args' => twig_to_array(["attr" => ["id" => "feed-entry-modal2"]])]));
  369.         // line 159
  370.         echo "    ";
  371.         $this->loadTemplate("@ui2022/schoolnow/modal--full.html.twig""@ProductsSchoolNow/dashboard/default/main.html.twig"159)->display(twig_array_merge(twig_array_merge($context, ["attr" => ["id" => "feed-entry-modal""class" => "modal-feedpostdetail modal-feeds"]]), ['_args' => twig_to_array(["attr" => ["id" => "feed-entry-modal""class" => "modal-feedpostdetail modal-feeds"]])]));
  372.         // line 165
  373.         echo "    ";
  374.         $this->loadTemplate("@ui2022/modal.html.twig""@ProductsSchoolNow/dashboard/default/main.html.twig"165)->display(twig_array_merge(twig_array_merge($context, ["dialog_styles" => "scrollable centered""attr" => ["id" => "modal__new_broadcast""class" => "modal-ajax"]]), ['_args' => twig_to_array(["dialog_styles" => "scrollable centered""attr" => ["id" => "modal__new_broadcast""class" => "modal-ajax"]])]));
  375.         
  376.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  377.         
  378.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  379.     }
  380.     public function getTemplateName()
  381.     {
  382.         return "@ProductsSchoolNow/dashboard/default/main.html.twig";
  383.     }
  384.     public function isTraitable()
  385.     {
  386.         return false;
  387.     }
  388.     public function getDebugInfo()
  389.     {
  390.         return array (  397 => 165,  394 => 159,  392 => 154,  387 => 153,  377 => 152,  354 => 137,  351 => 136,  348 => 135,  346 => 134,  343 => 133,  337 => 130,  333 => 128,  330 => 127,  316 => 126,  314 => 124,  313 => 121,  312 => 118,  311 => 116,  310 => 114,  309 => 111,  308 => 109,  307 => 107,  306 => 106,  305 => 104,  304 => 103,  303 => 124,  302 => 121,  301 => 118,  300 => 116,  299 => 114,  298 => 111,  297 => 109,  296 => 107,  295 => 106,  294 => 104,  293 => 103,  291 => 102,  289 => 96,  287 => 91,  284 => 90,  282 => 84,  281 => 82,  279 => 79,  276 => 78,  273 => 77,  270 => 76,  267 => 75,  264 => 74,  262 => 73,  259 => 72,  257 => 69,  256 => 68,  253 => 67,  250 => 66,  247 => 65,  244 => 64,  226 => 63,  223 => 62,  220 => 61,  206 => 60,  204 => 55,  202 => 54,  184 => 53,  182 => 52,  179 => 51,  175 => 49,  172 => 48,  169 => 42,  166 => 41,  163 => 40,  160 => 35,  158 => 34,  155 => 33,  152 => 32,  149 => 31,  147 => 29,  145 => 28,  143 => 27,  140 => 26,  130 => 25,  118 => 22,  104 => 21,  102 => 12,  100 => 11,  83 => 10,  80 => 9,  77 => 8,  67 => 7,  56 => 1,  54 => 6,  52 => 5,  50 => 3,  37 => 1,);
  391.     }
  392.     public function getSourceContext()
  393.     {
  394.         return new Source("{% extends '@ProductsSchoolNow/base.html.twig' %}
  395. {% do dom_title_section('Dashboard') %}
  396. {% set compose = (compose is defined) ? compose : true %}
  397. {% set actions = (actions is defined) ? actions : true %}
  398. {% block header %}
  399.     {% if announcements|length > 0 %}
  400.         <div class=\"feeds__area\">
  401.             {% for announcement in announcements %}
  402.                 {% embed '@ui2022/alert.html.twig' with {
  403.                     styles: announcement.state,
  404.                 } %}
  405.                     {% block content %}
  406.                         {% if not (announcement.title starts with 'hideme') %}
  407.                             <h4 class=\"alert-heading\">{{ announcement.title }}</h4>
  408.                         {% endif %}
  409.                         <p>{{ announcement.description|raw }}</p>
  410.                     {% endblock %}
  411.                 {% endembed %}
  412.             {% endfor %}
  413.         </div>
  414.     {% endif %}
  415. {% endblock %}
  416. {% block content %}
  417.     <div class=\"feeds__area\">
  418.         {% if form is defined and form %}
  419.             {% include '@ui2022/schoolnow/feed__search__box.html.twig' with {
  420.                 form: form,
  421.             } %}
  422.         {% endif %}
  423.         {% if compose %}
  424.             <div class=\"feeds__compose\">
  425.                 {% if isGrantedShare %}
  426.                     {% include '@ui2022/schoolnow/feature__button.html.twig' with {
  427.                         title: 'Share a Post',
  428.                         image: '/ui2022/images/sharepost.svg',
  429.                         link: path('app.schoolnow.dashboard.default.create'),
  430.                     } %}
  431.                 {% endif %}
  432.                 {% if maybe_granted(['app.notifications.messaging.general', 'app.notifications.messaging.urgent']) %}
  433.                     {% include '@ui2022/schoolnow/feature__button.html.twig' with {
  434.                         title: 'Send a Message',
  435.                         image: '/ui2022/images/sendmessage.svg',
  436.                         link: path('app.notifications.dashboard.default.select_modal'),
  437.                         modal: 'modal__new_broadcast',
  438.                     } %}
  439.                 {% endif %}
  440.             </div>
  441.         {% endif %}
  442.         <div id=\"feeds__list\" class=\"feeds__list\">
  443.             {% if notifications is defined %}
  444.                 {% for notification in notifications %}
  445.                     {% include '@ProductsSchoolNow/dashboard/default/_entry.html.twig' with {
  446.                         entry: notification,
  447.                         type: 'notification',
  448.                         modal: 'feed-entry-modal',
  449.                         actions: [],
  450.                     } %}
  451.                 {% endfor %}
  452.             {% endif %}
  453.             {% if feed|length %}
  454.                 {% for entry in feed %}
  455.                     {% if entry.entry is defined %}
  456.                         {% set entry = entry.entry %}
  457.                     {% endif %}
  458.                     {% set attributes = attributes_expression([
  459.                         entry.department ? 'campussuite.cms.container.%s.manage'|format(entry.department.type) : null,
  460.                         'campussuite.cms.module.manage',
  461.                     ]) %}
  462.                     {% set socialPostCount = 0 %}
  463.                     {% if (entry.object is defined) and (entry.object is not empty) and (entry.object.socialPosts is defined) and (entry.object.socialPosts is not empty) %}
  464.                         {% set socialPostCount = entry.object.socialPosts|length %}
  465.                     {% endif %}
  466.                     {% set subMenuItems = [] %}
  467.                     {% if 0 < socialPostCount %}
  468.                         {% set subMenuItems = subMenuItems|merge(
  469.                             [
  470.                                 {
  471.                                     title: 'Social Posts (' ~ socialPostCount ~ ')',
  472.                                     link: path('app.schoolnow.dashboard.default.social_accounts', {
  473.                                         entry: entry.id
  474.                                     }),
  475.                                     modal: 'feed-entry-modal2',
  476.                                 },
  477.                             ]
  478.                         ) %}
  479.                     {% endif %}
  480.                     {% set subMenuItems = subMenuItems|merge(
  481.                         [
  482.                             {
  483.                                 title: 'Delete',
  484.                                 link: path('app.schoolnow.dashboard.default.delete', {
  485.                                     entry: entry.id,
  486.                                 }),
  487.                                 modal: 'feed-entry-modal2',
  488.                             },
  489.                         ]
  490.                     ) %}
  491.                     {% include '@ProductsSchoolNow/dashboard/default/_entry.html.twig' with {
  492.                         entry: entry,
  493.                         type: entry.type is not defined ? 'notification' : null,
  494.                         modal: 'feed-entry-modal',
  495.                         actions: actions ? [
  496.                             entry.type is not defined ? null : is_granted('app.feed.pin') ? {
  497.                                 icon: 'icon-pin',
  498.                                 toggled: entry.pinned,
  499.                                 toggler: path('app.schoolnow.dashboard.default.pin', {
  500.                                     entry: entry.id,
  501.                                 }),
  502.                             } : null,
  503.                             is_granted(attributes, [entry, entry.department]) ? {
  504.                                 title: 'More',
  505.                                 items: subMenuItems,
  506.                             } : null,
  507.                             is_granted(attributes, [entry, entry.department]) ? {
  508.                                 title: 'Edit',
  509.                                 link: path('app.schoolnow.dashboard.default.update', {
  510.                                     entry: entry.id,
  511.                                 }),
  512.                             } : null,
  513.                         ]|filter((v) => v is not empty) : null,
  514.                     } %}
  515.                 {% endfor %}
  516.             {% else %}
  517.                 <p class=\"alert alert-dark text-center\">
  518.                     The search did not find any results.<br />
  519.                     <a href=\"{{ path('app.schoolnow.dashboard.default.main') }}\">Clear search</a>
  520.                 </p>
  521.             {% endif %}
  522.         </div>
  523.         {% if feed is not empty and pagination is defined %}
  524.             {% include '@ui2022/pagination.html.twig' with pagination %}
  525.         {% endif %}
  526.     </div>
  527.     <script type=\"text/javascript\">
  528.         (function (window, document, \$, undefined) {
  529.             \$(function () {
  530.                 \$('#feeds__list')
  531.                     .on('done.toggler', '[data-trigger=\"toggler\"]', function (e) {
  532.                         var \$target = \$(e.currentTarget);
  533.                         \$target.closest('.options').find('.feedbox__pinned').toggleClass('pinned', \$target.is(':checked'));
  534.                     })
  535.                 ;
  536.             });
  537.         })(window, document, jQuery);
  538.     </script>
  539. {% endblock %}
  540. {% block modals %}
  541.     {{ parent() }}
  542.     {% include '@ui2022/modal.html.twig' with {
  543.         attr: {
  544.             id: 'feed-entry-modal2',
  545.         },
  546.     } %}
  547.     {% include '@ui2022/schoolnow/modal--full.html.twig' with {
  548.         attr: {
  549.             id: 'feed-entry-modal',
  550.             class: 'modal-feedpostdetail modal-feeds',
  551.         },
  552.     } %}
  553.     {% include '@ui2022/modal.html.twig' with {
  554.         dialog_styles: 'scrollable centered',
  555.         attr: {
  556.             id: 'modal__new_broadcast',
  557.             class: 'modal-ajax',
  558.         },
  559.     } %}
  560. {% endblock %}
  561. ""@ProductsSchoolNow/dashboard/default/main.html.twig""/var/www/campussuite/src/Products/SchoolNowBundle/Resources/views/dashboard/default/main.html.twig");
  562.     }
  563. }
  564. /* @ProductsSchoolNow/dashboard/default/main.html.twig */
  565. class __TwigTemplate_759d521f55862c765832447053fff48c___533964539 extends \Twig\Template
  566. {
  567.     private $source;
  568.     private $macros = [];
  569.     public function __construct(Environment $env)
  570.     {
  571.         parent::__construct($env);
  572.         $this->source $this->getSourceContext();
  573.         $this->blocks = [
  574.             'content' => [$this'block_content'],
  575.         ];
  576.     }
  577.     protected function doGetParent(array $context)
  578.     {
  579.         // line 11
  580.         return "@ui2022/alert.html.twig";
  581.     }
  582.     protected function doDisplay(array $context, array $blocks = [])
  583.     {
  584.         $macros $this->macros;
  585.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  586.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@ProductsSchoolNow/dashboard/default/main.html.twig"));
  587.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  588.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@ProductsSchoolNow/dashboard/default/main.html.twig"));
  589.         $this->parent $this->loadTemplate("@ui2022/alert.html.twig""@ProductsSchoolNow/dashboard/default/main.html.twig"11);
  590.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  591.         
  592.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  593.         
  594.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  595.     }
  596.     // line 14
  597.     public function block_content($context, array $blocks = [])
  598.     {
  599.         $macros $this->macros;
  600.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  601.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  602.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  603.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  604.         // line 15
  605.         echo "                        ";
  606.         if ( !(is_string($__internal_compile_0 twig_get_attribute($this->env$this->source, (isset($context["announcement"]) || array_key_exists("announcement"$context) ? $context["announcement"] : (function () { throw new RuntimeError('Variable "announcement" does not exist.'15$this->source); })()), "title", [], "any"falsefalsefalse15)) && is_string($__internal_compile_1 "hideme") && ('' === $__internal_compile_1 || === strpos($__internal_compile_0$__internal_compile_1)))) {
  607.             // line 16
  608.             echo "                            <h4 class=\"alert-heading\">";
  609.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["announcement"]) || array_key_exists("announcement"$context) ? $context["announcement"] : (function () { throw new RuntimeError('Variable "announcement" does not exist.'16$this->source); })()), "title", [], "any"falsefalsefalse16), "html"nulltrue);
  610.             echo "</h4>
  611.                         ";
  612.         }
  613.         // line 18
  614.         echo "                        <p>";
  615.         echo twig_get_attribute($this->env$this->source, (isset($context["announcement"]) || array_key_exists("announcement"$context) ? $context["announcement"] : (function () { throw new RuntimeError('Variable "announcement" does not exist.'18$this->source); })()), "description", [], "any"falsefalsefalse18);
  616.         echo "</p>
  617.                     ";
  618.         
  619.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  620.         
  621.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  622.     }
  623.     public function getTemplateName()
  624.     {
  625.         return "@ProductsSchoolNow/dashboard/default/main.html.twig";
  626.     }
  627.     public function isTraitable()
  628.     {
  629.         return false;
  630.     }
  631.     public function getDebugInfo()
  632.     {
  633.         return array (  663 => 18,  657 => 16,  654 => 15,  644 => 14,  621 => 11,  397 => 165,  394 => 159,  392 => 154,  387 => 153,  377 => 152,  354 => 137,  351 => 136,  348 => 135,  346 => 134,  343 => 133,  337 => 130,  333 => 128,  330 => 127,  316 => 126,  314 => 124,  313 => 121,  312 => 118,  311 => 116,  310 => 114,  309 => 111,  308 => 109,  307 => 107,  306 => 106,  305 => 104,  304 => 103,  303 => 124,  302 => 121,  301 => 118,  300 => 116,  299 => 114,  298 => 111,  297 => 109,  296 => 107,  295 => 106,  294 => 104,  293 => 103,  291 => 102,  289 => 96,  287 => 91,  284 => 90,  282 => 84,  281 => 82,  279 => 79,  276 => 78,  273 => 77,  270 => 76,  267 => 75,  264 => 74,  262 => 73,  259 => 72,  257 => 69,  256 => 68,  253 => 67,  250 => 66,  247 => 65,  244 => 64,  226 => 63,  223 => 62,  220 => 61,  206 => 60,  204 => 55,  202 => 54,  184 => 53,  182 => 52,  179 => 51,  175 => 49,  172 => 48,  169 => 42,  166 => 41,  163 => 40,  160 => 35,  158 => 34,  155 => 33,  152 => 32,  149 => 31,  147 => 29,  145 => 28,  143 => 27,  140 => 26,  130 => 25,  118 => 22,  104 => 21,  102 => 12,  100 => 11,  83 => 10,  80 => 9,  77 => 8,  67 => 7,  56 => 1,  54 => 6,  52 => 5,  50 => 3,  37 => 1,);
  634.     }
  635.     public function getSourceContext()
  636.     {
  637.         return new Source("{% extends '@ProductsSchoolNow/base.html.twig' %}
  638. {% do dom_title_section('Dashboard') %}
  639. {% set compose = (compose is defined) ? compose : true %}
  640. {% set actions = (actions is defined) ? actions : true %}
  641. {% block header %}
  642.     {% if announcements|length > 0 %}
  643.         <div class=\"feeds__area\">
  644.             {% for announcement in announcements %}
  645.                 {% embed '@ui2022/alert.html.twig' with {
  646.                     styles: announcement.state,
  647.                 } %}
  648.                     {% block content %}
  649.                         {% if not (announcement.title starts with 'hideme') %}
  650.                             <h4 class=\"alert-heading\">{{ announcement.title }}</h4>
  651.                         {% endif %}
  652.                         <p>{{ announcement.description|raw }}</p>
  653.                     {% endblock %}
  654.                 {% endembed %}
  655.             {% endfor %}
  656.         </div>
  657.     {% endif %}
  658. {% endblock %}
  659. {% block content %}
  660.     <div class=\"feeds__area\">
  661.         {% if form is defined and form %}
  662.             {% include '@ui2022/schoolnow/feed__search__box.html.twig' with {
  663.                 form: form,
  664.             } %}
  665.         {% endif %}
  666.         {% if compose %}
  667.             <div class=\"feeds__compose\">
  668.                 {% if isGrantedShare %}
  669.                     {% include '@ui2022/schoolnow/feature__button.html.twig' with {
  670.                         title: 'Share a Post',
  671.                         image: '/ui2022/images/sharepost.svg',
  672.                         link: path('app.schoolnow.dashboard.default.create'),
  673.                     } %}
  674.                 {% endif %}
  675.                 {% if maybe_granted(['app.notifications.messaging.general', 'app.notifications.messaging.urgent']) %}
  676.                     {% include '@ui2022/schoolnow/feature__button.html.twig' with {
  677.                         title: 'Send a Message',
  678.                         image: '/ui2022/images/sendmessage.svg',
  679.                         link: path('app.notifications.dashboard.default.select_modal'),
  680.                         modal: 'modal__new_broadcast',
  681.                     } %}
  682.                 {% endif %}
  683.             </div>
  684.         {% endif %}
  685.         <div id=\"feeds__list\" class=\"feeds__list\">
  686.             {% if notifications is defined %}
  687.                 {% for notification in notifications %}
  688.                     {% include '@ProductsSchoolNow/dashboard/default/_entry.html.twig' with {
  689.                         entry: notification,
  690.                         type: 'notification',
  691.                         modal: 'feed-entry-modal',
  692.                         actions: [],
  693.                     } %}
  694.                 {% endfor %}
  695.             {% endif %}
  696.             {% if feed|length %}
  697.                 {% for entry in feed %}
  698.                     {% if entry.entry is defined %}
  699.                         {% set entry = entry.entry %}
  700.                     {% endif %}
  701.                     {% set attributes = attributes_expression([
  702.                         entry.department ? 'campussuite.cms.container.%s.manage'|format(entry.department.type) : null,
  703.                         'campussuite.cms.module.manage',
  704.                     ]) %}
  705.                     {% set socialPostCount = 0 %}
  706.                     {% if (entry.object is defined) and (entry.object is not empty) and (entry.object.socialPosts is defined) and (entry.object.socialPosts is not empty) %}
  707.                         {% set socialPostCount = entry.object.socialPosts|length %}
  708.                     {% endif %}
  709.                     {% set subMenuItems = [] %}
  710.                     {% if 0 < socialPostCount %}
  711.                         {% set subMenuItems = subMenuItems|merge(
  712.                             [
  713.                                 {
  714.                                     title: 'Social Posts (' ~ socialPostCount ~ ')',
  715.                                     link: path('app.schoolnow.dashboard.default.social_accounts', {
  716.                                         entry: entry.id
  717.                                     }),
  718.                                     modal: 'feed-entry-modal2',
  719.                                 },
  720.                             ]
  721.                         ) %}
  722.                     {% endif %}
  723.                     {% set subMenuItems = subMenuItems|merge(
  724.                         [
  725.                             {
  726.                                 title: 'Delete',
  727.                                 link: path('app.schoolnow.dashboard.default.delete', {
  728.                                     entry: entry.id,
  729.                                 }),
  730.                                 modal: 'feed-entry-modal2',
  731.                             },
  732.                         ]
  733.                     ) %}
  734.                     {% include '@ProductsSchoolNow/dashboard/default/_entry.html.twig' with {
  735.                         entry: entry,
  736.                         type: entry.type is not defined ? 'notification' : null,
  737.                         modal: 'feed-entry-modal',
  738.                         actions: actions ? [
  739.                             entry.type is not defined ? null : is_granted('app.feed.pin') ? {
  740.                                 icon: 'icon-pin',
  741.                                 toggled: entry.pinned,
  742.                                 toggler: path('app.schoolnow.dashboard.default.pin', {
  743.                                     entry: entry.id,
  744.                                 }),
  745.                             } : null,
  746.                             is_granted(attributes, [entry, entry.department]) ? {
  747.                                 title: 'More',
  748.                                 items: subMenuItems,
  749.                             } : null,
  750.                             is_granted(attributes, [entry, entry.department]) ? {
  751.                                 title: 'Edit',
  752.                                 link: path('app.schoolnow.dashboard.default.update', {
  753.                                     entry: entry.id,
  754.                                 }),
  755.                             } : null,
  756.                         ]|filter((v) => v is not empty) : null,
  757.                     } %}
  758.                 {% endfor %}
  759.             {% else %}
  760.                 <p class=\"alert alert-dark text-center\">
  761.                     The search did not find any results.<br />
  762.                     <a href=\"{{ path('app.schoolnow.dashboard.default.main') }}\">Clear search</a>
  763.                 </p>
  764.             {% endif %}
  765.         </div>
  766.         {% if feed is not empty and pagination is defined %}
  767.             {% include '@ui2022/pagination.html.twig' with pagination %}
  768.         {% endif %}
  769.     </div>
  770.     <script type=\"text/javascript\">
  771.         (function (window, document, \$, undefined) {
  772.             \$(function () {
  773.                 \$('#feeds__list')
  774.                     .on('done.toggler', '[data-trigger=\"toggler\"]', function (e) {
  775.                         var \$target = \$(e.currentTarget);
  776.                         \$target.closest('.options').find('.feedbox__pinned').toggleClass('pinned', \$target.is(':checked'));
  777.                     })
  778.                 ;
  779.             });
  780.         })(window, document, jQuery);
  781.     </script>
  782. {% endblock %}
  783. {% block modals %}
  784.     {{ parent() }}
  785.     {% include '@ui2022/modal.html.twig' with {
  786.         attr: {
  787.             id: 'feed-entry-modal2',
  788.         },
  789.     } %}
  790.     {% include '@ui2022/schoolnow/modal--full.html.twig' with {
  791.         attr: {
  792.             id: 'feed-entry-modal',
  793.             class: 'modal-feedpostdetail modal-feeds',
  794.         },
  795.     } %}
  796.     {% include '@ui2022/modal.html.twig' with {
  797.         dialog_styles: 'scrollable centered',
  798.         attr: {
  799.             id: 'modal__new_broadcast',
  800.             class: 'modal-ajax',
  801.         },
  802.     } %}
  803. {% endblock %}
  804. ""@ProductsSchoolNow/dashboard/default/main.html.twig""/var/www/campussuite/src/Products/SchoolNowBundle/Resources/views/dashboard/default/main.html.twig");
  805.     }
  806. }