var/cache/dev/twig/ea/ea13edfb47e43e7f6feadd2c3e84e82e6af18beb1d551170d7eb61c7110b33d2.php line 50

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. /* TroikaRealEstateBundle:About:news.html.twig */
  14. class __TwigTemplate_f87798f25a6118c515012ae24221cabac49b6f5107942310905f6b908ab6d531 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.             'title' => [$this'block_title'],
  24.             'description' => [$this'block_description'],
  25.             'main' => [$this'block_main'],
  26.         ];
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 1
  31.         return "TroikaRealEstateBundle:Default:layout.html.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""TroikaRealEstateBundle:About:news.html.twig"));
  38.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""TroikaRealEstateBundle:About:news.html.twig"));
  40.         $this->parent $this->loadTemplate("TroikaRealEstateBundle:Default:layout.html.twig""TroikaRealEstateBundle:About:news.html.twig"1);
  41.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  42.         
  43.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  44.         
  45.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  46.     }
  47.     // line 3
  48.     public function block_title($context, array $blocks = [])
  49.     {
  50.         $macros $this->macros;
  51.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  52.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  53.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  54.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  55.         if ((isset($context["year"]) || array_key_exists("year"$context) ? $context["year"] : (function () { throw new RuntimeError('Variable "year" does not exist.'3$this->source); })())) {
  56.             echo "Новости «Troika Estate» за ";
  57.             echo twig_escape_filter($this->env, (isset($context["year"]) || array_key_exists("year"$context) ? $context["year"] : (function () { throw new RuntimeError('Variable "year" does not exist.'3$this->source); })()), "html"nulltrue);
  58.             echo " год";
  59.         } else {
  60.             echo "Новости «Troika Estate»";
  61.         }
  62.         
  63.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  64.         
  65.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  66.     }
  67.     // line 4
  68.     public function block_description($context, array $blocks = [])
  69.     {
  70.         $macros $this->macros;
  71.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  72.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""description"));
  73.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  74.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""description"));
  75.         if ((isset($context["year"]) || array_key_exists("year"$context) ? $context["year"] : (function () { throw new RuntimeError('Variable "year" does not exist.'4$this->source); })())) {
  76.             echo "Новости на рынке элитной недвижимости за ";
  77.             echo twig_escape_filter($this->env, (isset($context["year"]) || array_key_exists("year"$context) ? $context["year"] : (function () { throw new RuntimeError('Variable "year" does not exist.'4$this->source); })()), "html"nulltrue);
  78.             echo " год";
  79.         } else {
  80.             echo "Узнать о последних новостях на рынке недвижимости можно легко на сайте. Здесь собраны самые актуальные предложения о строительстве, продаже или аренде недвижимости.";
  81.         }
  82.         
  83.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  84.         
  85.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  86.     }
  87.     // line 6
  88.     public function block_main($context, array $blocks = [])
  89.     {
  90.         $macros $this->macros;
  91.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  92.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  93.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  94.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  95.         // line 7
  96.         echo "  <div id=\"content\" class=\"content\">
  97.     <div class=\"wrapper news\">
  98.       <ul class=\"hb hide__phone  hbtmfix\">
  99.         <li><a href=\"/\">Элитная недвижимость</a></li>
  100.         ";
  101.         // line 11
  102.         if ((isset($context["year"]) || array_key_exists("year"$context) ? $context["year"] : (function () { throw new RuntimeError('Variable "year" does not exist.'11$this->source); })())) {
  103.             // line 12
  104.             echo "          <li><a href=\"/news/\">Блог</a></li>
  105.           <li class=\"current\">";
  106.             // line 13
  107.             echo twig_escape_filter($this->env, (isset($context["year"]) || array_key_exists("year"$context) ? $context["year"] : (function () { throw new RuntimeError('Variable "year" does not exist.'13$this->source); })()), "html"nulltrue);
  108.             echo "</li>
  109.         ";
  110.         } else {
  111.             // line 15
  112.             echo "          <li class=\"current\">Блог</li>
  113.         ";
  114.         }
  115.         // line 17
  116.         echo "      </ul>
  117.       <h1>Блог ";
  118.         // line 18
  119.         if ((isset($context["year"]) || array_key_exists("year"$context) ? $context["year"] : (function () { throw new RuntimeError('Variable "year" does not exist.'18$this->source); })())) {
  120.             echo twig_escape_filter($this->env, (isset($context["year"]) || array_key_exists("year"$context) ? $context["year"] : (function () { throw new RuntimeError('Variable "year" does not exist.'18$this->source); })()), "html"nulltrue);
  121.             echo " год";
  122.         }
  123.         echo "</h1>
  124.       <div id=\"layout\" class=\"layout layout__column-left\">
  125.         <div class=\"layout-column-left\">
  126.           <div id=\"btn-delivery\" class=\"btn btn-orange btn__block\" style=\"margin-bottom: 12px\">подписаться</div>
  127.           <div class=\"panel panel__white panel__list hide__phone hide__tablet\">
  128.             <ul class=\"list__clean fontOpenSans lh24\">
  129.               <li><a href=\"/news/2019/\" class=\"link link__underlined\">2019 год</a></li>
  130.               <li><a href=\"/news/2020/\" class=\"link link__underlined\">2020 год</a></li>
  131.             </ul>
  132.           </div>
  133.           <div class=\"block hide__phone hide__tablet\">
  134.             ";
  135.         // line 30
  136.         echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("TroikaRealEstateBundle:Banner:getBanner", ["banner" => 3]));
  137.         echo "
  138.           </div>
  139.         </div>
  140.         <div>
  141.           <div class=\"block block-select hide__desktop\">
  142.             <select name=\"\" id=\"news-select\">
  143.               <option
  144.                   value=\"all\" ";
  145.         // line 37
  146.         if ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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.'37$this->source); })()), "request", [], "any"falsefalsefalse37), "attributes", [], "any"falsefalsefalse37), "get", [=> "_route"], "method"falsefalsefalse37) == "troika_news")) {
  147.             echo " selected=\"selected\"";
  148.         }
  149.         echo ">
  150.                 Все новости
  151.               </option>
  152.               <option value=\"2019\" ";
  153.         // line 40
  154.         if ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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.'40$this->source); })()), "request", [], "any"falsefalsefalse40), "attributes", [], "any"falsefalsefalse40), "get", [=> "year"], "method"falsefalsefalse40) == "2019")) {
  155.             echo " selected=\"selected\"";
  156.         }
  157.         echo ">
  158.                 2019
  159.                 год
  160.               </option>
  161.               <option value=\"2020\" ";
  162.         // line 44
  163.         if ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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.'44$this->source); })()), "request", [], "any"falsefalsefalse44), "attributes", [], "any"falsefalsefalse44), "get", [=> "year"], "method"falsefalsefalse44) == "2020")) {
  164.             echo " selected=\"selected\"";
  165.         }
  166.         echo ">
  167.                 2020
  168.                 год
  169.               </option>
  170.             </select>
  171.           </div>
  172.           <div class=\"cards cards__list cards__list__news\">
  173.             ";
  174.         // line 52
  175.         $context['_parent'] = $context;
  176.         $context['_seq'] = twig_ensure_traversable((isset($context["news"]) || array_key_exists("news"$context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.'52$this->source); })()));
  177.         foreach ($context['_seq'] as $context["_key"] => $context["article"]) {
  178.             // line 53
  179.             echo "              <div class=\"cards-item\">
  180.                 <div style=\"height: 248px;\" class=\"cards-item-image\">
  181.                   ";
  182.             // line 55
  183.             $context['_parent'] = $context;
  184.             $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source$context["article"], "photos", [], "any"falsefalsefalse55));
  185.             foreach ($context['_seq'] as $context["_key"] => $context["photo"]) {
  186.                 // line 56
  187.                 echo "                    ";
  188.                 if (twig_get_attribute($this->env$this->source$context["photo"], "main", [], "any"falsefalsefalse56)) {
  189.                     // line 57
  190.                     echo "                      <a style=\"text-decoration:none;\" href=\"/news/";
  191.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["article"], "slug", [], "any"falsefalsefalse57), "html"nulltrue);
  192.                     echo "-";
  193.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["article"], "id", [], "any"falsefalsefalse57), "html"nulltrue);
  194.                     echo "\">
  195.                         <img src=\"/cache";
  196.                     // line 58
  197.                     echo twig_escape_filter($this->envtwig_replace_filter(twig_get_attribute($this->env$this->source$context["photo"], "webPathImage", [], "any"falsefalsefalse58), ["." => "_720x496."]), "html"nulltrue);
  198.                     echo "\" alt=\"\">
  199.                       </a>
  200.                     ";
  201.                 }
  202.                 // line 61
  203.                 echo "                  ";
  204.             }
  205.             $_parent $context['_parent'];
  206.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['photo'], $context['_parent'], $context['loop']);
  207.             $context array_intersect_key($context$_parent) + $_parent;
  208.             // line 62
  209.             echo "                </div>
  210.                 <div class=\"cards-item-text\">
  211.                   <h2>";
  212.             // line 64
  213.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["article"], "name", [], "any"falsefalsefalse64), "html"nulltrue);
  214.             echo "</h2>
  215.                   <!--noindex-->
  216.                   <span class=\"text\">
  217.                                 ";
  218.             // line 67
  219.             echo twig_get_attribute($this->env$this->source$context["article"], "shortText", [], "any"falsefalsefalse67);
  220.             echo "
  221.                                 </span>
  222.                   <!--/noindex-->
  223.                   <p>
  224.                     <a href=\"/news/";
  225.             // line 71
  226.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["article"], "slug", [], "any"falsefalsefalse71), "html"nulltrue);
  227.             echo "-";
  228.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["article"], "id", [], "any"falsefalsefalse71), "html"nulltrue);
  229.             echo "\" class=\"link orange\"><i
  230.                           class=\"fa fa-file-text-o\"></i> читать статью полностью &rsaquo;</a>
  231.                     <span class=\"gray-dark pull-right small-text font12\">";
  232.             // line 73
  233.             echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->source$context["article"], "date", [], "any"falsefalsefalse73), "d.m.Y"), "html"nulltrue);
  234.             echo "</span>
  235.                   </p>
  236.                 </div>
  237.               </div>
  238.             ";
  239.         }
  240.         $_parent $context['_parent'];
  241.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['article'], $context['_parent'], $context['loop']);
  242.         $context array_intersect_key($context$_parent) + $_parent;
  243.         // line 78
  244.         echo "          </div>
  245.           <div class=\"pages\">
  246.             ";
  247.         // line 80
  248.         echo $this->extensions['Knp\Bundle\PaginatorBundle\Twig\Extension\PaginationExtension']->render($this->env, (isset($context["news"]) || array_key_exists("news"$context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.'80$this->source); })()));
  249.         echo "
  250.           </div>
  251.         </div>
  252.       </div>
  253.     </div>
  254.   </div>
  255.   <div class=\"modal fade\" id=\"deliveryNews\">
  256.     <div class=\"modal-dialog\">
  257.       <div class=\"modal-content\">
  258.         <div class=\"modal-header\">
  259.           <h4 class=\"modal-title\" style=\"font-size: 18px; font-weight: 100;\">подписаться на аналитику</h4>
  260.         </div>
  261.         <div class=\"modal-body\">
  262.           <div id=\"newsModalError\" class=\"panel-container error-content ModalError\">
  263.             <p></p>
  264.           </div>
  265.           <div class=\"panel-container__left\">
  266.             <div class=\"panel-container modal-panel\">
  267.               <input type=\"text\" class=\"control control__icon-before\" placeholder=\"Имя\" id=\"dName\">
  268.               <i class=\"fa fa__control fa-user pull-left gray-dark\"></i>
  269.             </div>
  270.             <div class=\"panel-container modal-panel\">
  271.               <input type=\"text\" class=\"control control__icon-before\" placeholder=\"Компания\" id=\"dCompany\">
  272.               <i class=\"fa fa__control fa-home pull-left gray-dark\"></i>
  273.             </div>
  274.             <div class=\"panel-container modal-panel\">
  275.               <input type=\"text\" class=\"control control__icon-before\" placeholder=\"E-mail\" id=\"dMail\">
  276.               <i class=\"fa fa__control fa-envelope pull-left gray-dark\"></i>
  277.             </div>
  278.           </div>
  279.         </div>
  280.         <div class=\"modal-footer\">
  281.           <div class=\"btn\" id=\"btn-ok\" style=\"width: 280px;\">подписаться</div>
  282.         </div>
  283.       </div><!-- /.modal-content -->
  284.     </div><!-- /.modal-dialog -->
  285.   </div><!-- /.modal -->
  286.   <script>
  287.       \$('#btn-delivery').on('click', function () {
  288.           \$('#deliveryNews').modal();
  289.           \$('#deliveryNews h4.modal-title').text('подписаться на новости');
  290.           \$('#btn-ok').on('click', function () {
  291.               \$('.error').each(function () {
  292.                   \$(this).removeClass('error');
  293.               });
  294.               error = 0;
  295.               errorText = '';
  296.               if (\$.trim(\$('#dName').val()) == '') {
  297.                   error = 1;
  298.                   errorText += 'Не заполнено поле \"Имя\" \\n';
  299.                   \$('#dName').addClass('error');
  300.               }
  301.               if (\$.trim(\$('#dCompany').val()) == '') {
  302.                   error = 1;
  303.                   errorText += 'Не заполнено поле \"Компания\" \\n';
  304.                   \$('#dCompany').addClass('error');
  305.               }
  306.               if (!isValidMail(\$('#dMail').val())) {
  307.                   error = 1;
  308.                   errorText += 'Не заполнено поле \"E-mail\" \\n';
  309.                   \$('#dMail').addClass('error');
  310.               }
  311.               console.log(errorText);
  312.               if (error != 1) {
  313.                   \$('#newsModalError').html('');
  314.                   \$('#newsModalError').hide();
  315.                   \$.ajax({
  316.                       url: '/api/newsClient',
  317.                       type: 'POST',
  318.                       data: {
  319.                           name: \$('#dName').val(),
  320.                           company: \$('#dCompany').val(),
  321.                           mail: \$('#dMail').val()
  322.                       }
  323.                   }).done(function () {
  324.                       \$('#deliveryNews').modal('hide');
  325.                       \$('#questionSuccessModal').modal();
  326.                       \$('#questionSuccessModal h4.modal-title').text('вы подписаны');
  327.                       \$('#questionSuccessModal .modal-body').text('Спасибо!');
  328.                       \$('#quest-close').click(function () {
  329.                           \$('#questionSuccessModal').modal('hide');
  330.                       });
  331.                       \$('#btn-ok').off('click');
  332.                   });
  333.               } else {
  334.                   \$('#newsModalError').html(errorText);
  335.                   \$('#newsModalError').html(\$('#newsModalError').html().replace(/\\n/g, '<br/>'));
  336.                   \$('#newsModalError').show();
  337.               }
  338.           });
  339.       });
  340.   </script>
  341.   <style>
  342.     @media (max-width: 700px) {
  343.       .cards.cards__list.cards__list__news .cards-item .cards-item-text p {
  344.         text-align: left;
  345.         font-size: 12px;
  346.         line-height: 18px;
  347.         letter-spacing: 0.3px;
  348.       }
  349.       .cards.cards__list.cards__list__news .cards-item .cards-item-text h4 {
  350.         font-size: 18px;
  351.       }
  352.     }
  353.     @media (min-width: 700px) {
  354.       .cards.cards__list.cards__list__news .cards-item .cards-item-text p {
  355.         text-align: justify;
  356.         font-size: 15px;
  357.         line-height: 18px;
  358.       }
  359.       .cards.cards__list.cards__list__news .cards-item .cards-item-text h4 {
  360.         font-size: 17px;
  361.       }
  362.     }
  363.   </style>
  364. ";
  365.         
  366.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  367.         
  368.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  369.     }
  370.     public function getTemplateName()
  371.     {
  372.         return "TroikaRealEstateBundle:About:news.html.twig";
  373.     }
  374.     public function isTraitable()
  375.     {
  376.         return false;
  377.     }
  378.     public function getDebugInfo()
  379.     {
  380.         return array (  274 => 80,  270 => 78,  259 => 73,  252 => 71,  245 => 67,  239 => 64,  235 => 62,  229 => 61,  223 => 58,  216 => 57,  213 => 56,  209 => 55,  205 => 53,  201 => 52,  188 => 44,  179 => 40,  171 => 37,  161 => 30,  143 => 18,  140 => 17,  136 => 15,  131 => 13,  128 => 12,  126 => 11,  120 => 7,  110 => 6,  85 => 4,  60 => 3,  37 => 1,);
  381.     }
  382.     public function getSourceContext()
  383.     {
  384.         return new Source("{% extends 'TroikaRealEstateBundle:Default:layout.html.twig' %}
  385. {% block title %}{% if year %}Новости «Troika Estate» за {{ year }} год{% else %}Новости «Troika Estate»{% endif %}{% endblock %}
  386. {% block description %}{% if year %}Новости на рынке элитной недвижимости за {{ year }} год{% else %}Узнать о последних новостях на рынке недвижимости можно легко на сайте. Здесь собраны самые актуальные предложения о строительстве, продаже или аренде недвижимости.{% endif %}
  387. {% endblock %}
  388. {% block main %}
  389.   <div id=\"content\" class=\"content\">
  390.     <div class=\"wrapper news\">
  391.       <ul class=\"hb hide__phone  hbtmfix\">
  392.         <li><a href=\"/\">Элитная недвижимость</a></li>
  393.         {% if year %}
  394.           <li><a href=\"/news/\">Блог</a></li>
  395.           <li class=\"current\">{{ year }}</li>
  396.         {% else %}
  397.           <li class=\"current\">Блог</li>
  398.         {% endif %}
  399.       </ul>
  400.       <h1>Блог {% if year %}{{ year }} год{% endif %}</h1>
  401.       <div id=\"layout\" class=\"layout layout__column-left\">
  402.         <div class=\"layout-column-left\">
  403.           <div id=\"btn-delivery\" class=\"btn btn-orange btn__block\" style=\"margin-bottom: 12px\">подписаться</div>
  404.           <div class=\"panel panel__white panel__list hide__phone hide__tablet\">
  405.             <ul class=\"list__clean fontOpenSans lh24\">
  406.               <li><a href=\"/news/2019/\" class=\"link link__underlined\">2019 год</a></li>
  407.               <li><a href=\"/news/2020/\" class=\"link link__underlined\">2020 год</a></li>
  408.             </ul>
  409.           </div>
  410.           <div class=\"block hide__phone hide__tablet\">
  411.             {{ render(controller('TroikaRealEstateBundle:Banner:getBanner', { 'banner': 3 })) }}
  412.           </div>
  413.         </div>
  414.         <div>
  415.           <div class=\"block block-select hide__desktop\">
  416.             <select name=\"\" id=\"news-select\">
  417.               <option
  418.                   value=\"all\" {% if app.request.attributes.get('_route') == \"troika_news\" %} selected=\"selected\"{% endif %}>
  419.                 Все новости
  420.               </option>
  421.               <option value=\"2019\" {% if app.request.attributes.get('year') == \"2019\" %} selected=\"selected\"{% endif %}>
  422.                 2019
  423.                 год
  424.               </option>
  425.               <option value=\"2020\" {% if app.request.attributes.get('year') == \"2020\" %} selected=\"selected\"{% endif %}>
  426.                 2020
  427.                 год
  428.               </option>
  429.             </select>
  430.           </div>
  431.           <div class=\"cards cards__list cards__list__news\">
  432.             {% for article in news %}
  433.               <div class=\"cards-item\">
  434.                 <div style=\"height: 248px;\" class=\"cards-item-image\">
  435.                   {% for photo in article.photos %}
  436.                     {% if photo.main %}
  437.                       <a style=\"text-decoration:none;\" href=\"/news/{{ article.slug }}-{{ article.id }}\">
  438.                         <img src=\"/cache{{ photo.webPathImage|replace({\".\" : \"_720x496.\"}) }}\" alt=\"\">
  439.                       </a>
  440.                     {% endif %}
  441.                   {% endfor %}
  442.                 </div>
  443.                 <div class=\"cards-item-text\">
  444.                   <h2>{{ article.name }}</h2>
  445.                   <!--noindex-->
  446.                   <span class=\"text\">
  447.                                 {{ article.shortText | raw }}
  448.                                 </span>
  449.                   <!--/noindex-->
  450.                   <p>
  451.                     <a href=\"/news/{{ article.slug }}-{{ article.id }}\" class=\"link orange\"><i
  452.                           class=\"fa fa-file-text-o\"></i> читать статью полностью &rsaquo;</a>
  453.                     <span class=\"gray-dark pull-right small-text font12\">{{ article.date | date(\"d.m.Y\") }}</span>
  454.                   </p>
  455.                 </div>
  456.               </div>
  457.             {% endfor %}
  458.           </div>
  459.           <div class=\"pages\">
  460.             {{ knp_pagination_render(news) }}
  461.           </div>
  462.         </div>
  463.       </div>
  464.     </div>
  465.   </div>
  466.   <div class=\"modal fade\" id=\"deliveryNews\">
  467.     <div class=\"modal-dialog\">
  468.       <div class=\"modal-content\">
  469.         <div class=\"modal-header\">
  470.           <h4 class=\"modal-title\" style=\"font-size: 18px; font-weight: 100;\">подписаться на аналитику</h4>
  471.         </div>
  472.         <div class=\"modal-body\">
  473.           <div id=\"newsModalError\" class=\"panel-container error-content ModalError\">
  474.             <p></p>
  475.           </div>
  476.           <div class=\"panel-container__left\">
  477.             <div class=\"panel-container modal-panel\">
  478.               <input type=\"text\" class=\"control control__icon-before\" placeholder=\"Имя\" id=\"dName\">
  479.               <i class=\"fa fa__control fa-user pull-left gray-dark\"></i>
  480.             </div>
  481.             <div class=\"panel-container modal-panel\">
  482.               <input type=\"text\" class=\"control control__icon-before\" placeholder=\"Компания\" id=\"dCompany\">
  483.               <i class=\"fa fa__control fa-home pull-left gray-dark\"></i>
  484.             </div>
  485.             <div class=\"panel-container modal-panel\">
  486.               <input type=\"text\" class=\"control control__icon-before\" placeholder=\"E-mail\" id=\"dMail\">
  487.               <i class=\"fa fa__control fa-envelope pull-left gray-dark\"></i>
  488.             </div>
  489.           </div>
  490.         </div>
  491.         <div class=\"modal-footer\">
  492.           <div class=\"btn\" id=\"btn-ok\" style=\"width: 280px;\">подписаться</div>
  493.         </div>
  494.       </div><!-- /.modal-content -->
  495.     </div><!-- /.modal-dialog -->
  496.   </div><!-- /.modal -->
  497.   <script>
  498.       \$('#btn-delivery').on('click', function () {
  499.           \$('#deliveryNews').modal();
  500.           \$('#deliveryNews h4.modal-title').text('подписаться на новости');
  501.           \$('#btn-ok').on('click', function () {
  502.               \$('.error').each(function () {
  503.                   \$(this).removeClass('error');
  504.               });
  505.               error = 0;
  506.               errorText = '';
  507.               if (\$.trim(\$('#dName').val()) == '') {
  508.                   error = 1;
  509.                   errorText += 'Не заполнено поле \"Имя\" \\n';
  510.                   \$('#dName').addClass('error');
  511.               }
  512.               if (\$.trim(\$('#dCompany').val()) == '') {
  513.                   error = 1;
  514.                   errorText += 'Не заполнено поле \"Компания\" \\n';
  515.                   \$('#dCompany').addClass('error');
  516.               }
  517.               if (!isValidMail(\$('#dMail').val())) {
  518.                   error = 1;
  519.                   errorText += 'Не заполнено поле \"E-mail\" \\n';
  520.                   \$('#dMail').addClass('error');
  521.               }
  522.               console.log(errorText);
  523.               if (error != 1) {
  524.                   \$('#newsModalError').html('');
  525.                   \$('#newsModalError').hide();
  526.                   \$.ajax({
  527.                       url: '/api/newsClient',
  528.                       type: 'POST',
  529.                       data: {
  530.                           name: \$('#dName').val(),
  531.                           company: \$('#dCompany').val(),
  532.                           mail: \$('#dMail').val()
  533.                       }
  534.                   }).done(function () {
  535.                       \$('#deliveryNews').modal('hide');
  536.                       \$('#questionSuccessModal').modal();
  537.                       \$('#questionSuccessModal h4.modal-title').text('вы подписаны');
  538.                       \$('#questionSuccessModal .modal-body').text('Спасибо!');
  539.                       \$('#quest-close').click(function () {
  540.                           \$('#questionSuccessModal').modal('hide');
  541.                       });
  542.                       \$('#btn-ok').off('click');
  543.                   });
  544.               } else {
  545.                   \$('#newsModalError').html(errorText);
  546.                   \$('#newsModalError').html(\$('#newsModalError').html().replace(/\\n/g, '<br/>'));
  547.                   \$('#newsModalError').show();
  548.               }
  549.           });
  550.       });
  551.   </script>
  552.   <style>
  553.     @media (max-width: 700px) {
  554.       .cards.cards__list.cards__list__news .cards-item .cards-item-text p {
  555.         text-align: left;
  556.         font-size: 12px;
  557.         line-height: 18px;
  558.         letter-spacing: 0.3px;
  559.       }
  560.       .cards.cards__list.cards__list__news .cards-item .cards-item-text h4 {
  561.         font-size: 18px;
  562.       }
  563.     }
  564.     @media (min-width: 700px) {
  565.       .cards.cards__list.cards__list__news .cards-item .cards-item-text p {
  566.         text-align: justify;
  567.         font-size: 15px;
  568.         line-height: 18px;
  569.       }
  570.       .cards.cards__list.cards__list__news .cards-item .cards-item-text h4 {
  571.         font-size: 17px;
  572.       }
  573.     }
  574.   </style>
  575. {% endblock %}""TroikaRealEstateBundle:About:news.html.twig""/home/troikaestate/public_html/src/Troika/RealEstateBundle/Resources/views/About/news.html.twig");
  576.     }
  577. }