<?php

/* @UVDeskSupportCenter/Knowledgebase/article.html.twig */
class __TwigTemplate_34389fcc105a64c8f50906543faeca5c86e136fe4047b487e40a74adbcee7071 extends Twig_Template
{
    private $source;

    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        // line 1
        $this->parent = $this->loadTemplate("@UVDeskSupportCenter/Templates/layout.html.twig", "@UVDeskSupportCenter/Knowledgebase/article.html.twig", 1);
        $this->blocks = [
            'canonical' => [$this, 'block_canonical'],
            'ogcanonical' => [$this, 'block_ogcanonical'],
            'title' => [$this, 'block_title'],
            'ogtitle' => [$this, 'block_ogtitle'],
            'twtitle' => [$this, 'block_twtitle'],
            'metaDescription' => [$this, 'block_metaDescription'],
            'metaKeywords' => [$this, 'block_metaKeywords'],
            'body' => [$this, 'block_body'],
            'footer' => [$this, 'block_footer'],
        ];
    }

    protected function doGetParent(array $context)
    {
        return "@UVDeskSupportCenter/Templates/layout.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new Twig_Profiler_Profile($this->getTemplateName(), "template", "@UVDeskSupportCenter/Knowledgebase/article.html.twig"));

        // line 3
        if (twig_get_attribute($this->env, $this->source, ($context["article"] ?? null), "slug", [])) {
        }
        // line 1
        $this->parent->display($context, array_merge($this->blocks, $blocks));
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    // line 4
    public function block_canonical($context, array $blocks = [])
    {
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "canonical"));

        echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("helpdesk_knowledgebase_read_slug_article", ["slug" => twig_get_attribute($this->env, $this->source, ($context["article"] ?? null), "slug", [])]), "html", null, true);
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    // line 5
    public function block_ogcanonical($context, array $blocks = [])
    {
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "ogcanonical"));

        echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("helpdesk_knowledgebase_read_slug_article", ["slug" => twig_get_attribute($this->env, $this->source, ($context["article"] ?? null), "slug", [])]), "html", null, true);
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    // line 8
    public function block_title($context, array $blocks = [])
    {
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "title"));

        echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, ($context["article"] ?? null), "metaTitle", [])) ? (twig_get_attribute($this->env, $this->source, ($context["article"] ?? null), "metaTitle", [])) : (twig_get_attribute($this->env, $this->source, ($context["article"] ?? null), "name", []))), "html", null, true);
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    // line 9
    public function block_ogtitle($context, array $blocks = [])
    {
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "ogtitle"));

        echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, ($context["article"] ?? null), "metaTitle", [])) ? (twig_get_attribute($this->env, $this->source, ($context["article"] ?? null), "metaTitle", [])) : (twig_get_attribute($this->env, $this->source, ($context["article"] ?? null), "name", []))), "html", null, true);
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    // line 10
    public function block_twtitle($context, array $blocks = [])
    {
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "twtitle"));

        echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, ($context["article"] ?? null), "metaTitle", [])) ? (twig_get_attribute($this->env, $this->source, ($context["article"] ?? null), "metaTitle", [])) : (twig_get_attribute($this->env, $this->source, ($context["article"] ?? null), "name", []))), "html", null, true);
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    // line 11
    public function block_metaDescription($context, array $blocks = [])
    {
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "metaDescription"));

        echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, ($context["article"] ?? null), "metaDescription", [])) ? (twig_get_attribute($this->env, $this->source, ($context["article"] ?? null), "metaDescription", [])) : (twig_join_filter(twig_get_attribute($this->env, $this->source, ($context["uvdesk_service"] ?? null), "createConentToKeywords", [0 => twig_get_attribute($this->env, $this->source, ($context["article"] ?? null), "content", []), 1 => 255, 2 => true], "method"), " "))), "html", null, true);
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    // line 12
    public function block_metaKeywords($context, array $blocks = [])
    {
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "metaKeywords"));

        echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, ($context["article"] ?? null), "keywords", [])) ? (twig_get_attribute($this->env, $this->source, ($context["article"] ?? null), "keywords", [])) : (twig_get_attribute($this->env, $this->source, ($context["uvdesk_service"] ?? null), "createConentToKeywords", [0 => twig_get_attribute($this->env, $this->source, ($context["article"] ?? null), "content", [])], "method"))), "html", null, true);
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    // line 14
    public function block_body($context, array $blocks = [])
    {
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "body"));

        // line 15
        echo "\t<div class=\"uv-paper-article\">
\t\t<div class=\"uv-paper-section\">
\t\t\t<section>
\t\t\t\t<h1 ";
        // line 18
        if (twig_get_attribute($this->env, $this->source, ($context["article"] ?? null), "stared", [])) {
            echo "class=\"uv-starred\"";
        }
        echo ">";
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["article"] ?? null), "name", []), "html", null, true);
        echo "</h1>
\t\t\t\t<p>";
        // line 19
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["article"] ?? null), "content", []), "html", null, true);
        echo "</p>
\t\t\t\t<div class=\"uv-author\">
\t\t\t\t\t";
        // line 21
        if (((isset($context["articleAuthor"]) || array_key_exists("articleAuthor", $context)) &&  !twig_test_empty(($context["articleAuthor"] ?? null)))) {
            // line 22
            echo "\t\t\t\t\t\t<div class=\"uv-author-avatar\">
\t\t\t\t\t\t\t";
            // line 23
            if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["articleAuthor"] ?? null), "user", [], "any", false, true), "profileImage", [], "any", true, true) && twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["articleAuthor"] ?? null), "user", []), "profileImage", []))) {
                // line 24
                echo "\t\t\t\t\t\t\t\t<img src=\"";
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["articleAuthor"] ?? null), "user", []), "profileImage", []), "html", null, true);
                echo "\">
\t\t\t\t\t\t\t";
            } else {
                // line 26
                echo "\t\t\t\t\t\t\t\t<img src=\"";
                echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(($context["default_customer_image_path"] ?? null)), "html", null, true);
                echo "\">
\t\t\t\t\t\t\t";
            }
            // line 28
            echo "\t\t\t\t\t\t</div>
\t\t\t\t\t\t<div class=\"uv-author-info\">
\t\t\t\t\t\t\t<p>";
            // line 30
            echo twig_escape_filter($this->env, twig_capitalize_string_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["articleAuthor"] ?? null), "firstName", [])), "html", null, true);
            echo " ";
            echo twig_escape_filter($this->env, twig_capitalize_string_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["articleAuthor"] ?? null), "lastName", [])), "html", null, true);
            echo "</p>
\t\t\t\t\t\t\t<p><span>";
            // line 31
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Published on"), "html", null, true);
            echo " -</span> ";
            echo twig_escape_filter($this->env, ($context["dateAdded"] ?? null), "html", null, true);
            echo "</p>
\t\t\t\t\t\t</div>
\t\t\t\t\t";
        }
        // line 34
        echo "

\t\t\t\t</div>
\t\t\t</section>

\t\t\t<section class=\"uv-editor\" style=\"overflow-x: auto;\">
\t\t\t\t";
        // line 40
        echo twig_get_attribute($this->env, $this->source, ($context["article"] ?? null), "content", []);
        echo "
\t\t\t</section>

\t\t\t";
        // line 43
        if (((isset($context["feedbacks"]) || array_key_exists("feedbacks", $context)) && (twig_get_attribute($this->env, $this->source, ($context["feedbacks"] ?? null), "enabled", []) == true))) {
            // line 44
            echo "\t\t\t\t<section id=\"feedbacks\" class=\"article-feedbacks\">
\t\t\t\t\t";
            // line 45
            if ((twig_get_attribute($this->env, $this->source, ($context["feedbacks"] ?? null), "submitted", []) == true)) {
                // line 46
                echo "\t\t\t\t\t\t<p>Thank you for your feedback!</p>
\t\t\t\t\t";
            }
            // line 48
            echo "\t\t\t\t</section>
\t\t\t";
        }
        // line 50
        echo "
\t\t\t";
        // line 72
        echo "\t\t</div>

\t\t";
        // line 74
        $this->loadTemplate("@UVDeskSupportCenter/Templates/sidepanel.html.twig", "@UVDeskSupportCenter/Knowledgebase/article.html.twig", 74)->display($context);
        // line 75
        echo "\t</div>
\t";
        // line 76
        $this->displayParentBlock("body", $context, $blocks);
        echo "
";
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    // line 79
    public function block_footer($context, array $blocks = [])
    {
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "footer"));

        // line 80
        echo "\t";
        $this->displayParentBlock("footer", $context, $blocks);
        echo "

\t";
        // line 83
        echo "\t";
        if ((((isset($context["feedbacks"]) || array_key_exists("feedbacks", $context)) && (twig_get_attribute($this->env, $this->source, ($context["feedbacks"] ?? null), "enabled", []) == true)) && (twig_get_attribute($this->env, $this->source, ($context["feedbacks"] ?? null), "submitted", []) == false))) {
            // line 84
            echo "\t\t<script id=\"article_feedback_template\" type=\"text/template\">
\t\t\t<p>Was this article helpful?</p>
\t\t\t<ul>
\t\t\t\t<li class=\"uv-btn-small article-badge-pta\" data-feedback=\"positive\">Yes</li>
\t\t\t\t<li class=\"uv-btn-small article-badge-pta\" data-feedback=\"negative\">No</li>
\t\t\t</ul>
\t\t</script>

\t\t<script type=\"text/javascript\">
\t\t\t\$(function() {
\t\t\t\tvar ArticleFeedback = Backbone.View.extend({
\t\t\t\t\tel: \$(\"#feedbacks\"),
\t\t\t\t\tfeedbacks: {positive: 0, negative: 0, collection: []},
\t\t\t\t\ttemplate: _.template(\$(\"#article_feedback_template\").html()),
\t\t\t\t\tevents: {
\t\t\t\t\t\t'click .article-badge-pta': 'ratingsPTA',
\t\t\t\t\t},
\t\t\t\t\tinitialize: function() {
\t\t\t\t\t\t";
            // line 102
            if (((isset($context["feedbacks"]) || array_key_exists("feedbacks", $context)) &&  !twig_test_empty(twig_get_attribute($this->env, $this->source, ($context["feedbacks"] ?? null), "article", [])))) {
                // line 103
                echo "\t\t\t\t\t\t\tthis.feedbacks = ";
                echo json_encode(twig_get_attribute($this->env, $this->source, ($context["feedbacks"] ?? null), "article", []));
                echo ";
\t\t\t\t\t\t";
            }
            // line 105
            echo "
\t\t\t\t\t\tthis.render();
\t\t\t\t\t},
\t\t\t\t\trender: function() {
\t\t\t\t\t\tthis.\$el.html(this.template());
\t\t\t\t\t},
\t\t\t\t\tratingsPTA: function(e) {
\t\t\t\t\t\tvar self = this;
\t\t\t\t\t\tvar feedbackType = \$(e.currentTarget).data('feedback');

\t\t\t\t\t\t\$.ajax({
\t\t\t\t\t\t\turl: \"";
            // line 116
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("helpdesk_knowledgebase_rate_article", ["articleId" => twig_get_attribute($this->env, $this->source, ($context["article"] ?? null), "id", [])]), "html", null, true);
            echo "\",
\t\t\t\t\t\t\tmethod: 'POST',
\t\t\t\t\t\t\tdata: {
\t\t\t\t\t\t\t\tfeedback: feedbackType,
\t\t\t\t\t\t\t},
\t\t\t\t\t\t\tsuccess: function(response) {
\t\t\t\t\t\t\t\tthis.\$el.html('');
\t\t\t\t\t\t\t\tapp.appView.renderResponseAlert(response);
\t\t\t\t\t\t\t},
\t\t\t\t\t\t\terror: function(response) {
\t\t\t\t\t\t\t\tresponse = \$.parseJSON(response.responseText);

\t\t\t\t\t\t\t\t// app.appView.hideLoader();
\t\t\t\t\t\t\t\tapp.appView.renderResponseAlert(response);
\t\t\t\t\t\t\t}
\t\t\t\t\t\t});
\t\t\t\t\t},
\t\t\t\t});

\t\t\t\tvar articleFeedback = new ArticleFeedback();
\t\t\t});
\t\t</script>
\t";
        }
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    public function getTemplateName()
    {
        return "@UVDeskSupportCenter/Knowledgebase/article.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  301 => 116,  288 => 105,  282 => 103,  280 => 102,  260 => 84,  257 => 83,  251 => 80,  245 => 79,  236 => 76,  233 => 75,  231 => 74,  227 => 72,  224 => 50,  220 => 48,  216 => 46,  214 => 45,  211 => 44,  209 => 43,  203 => 40,  195 => 34,  187 => 31,  181 => 30,  177 => 28,  171 => 26,  165 => 24,  163 => 23,  160 => 22,  158 => 21,  153 => 19,  145 => 18,  140 => 15,  134 => 14,  122 => 12,  110 => 11,  98 => 10,  86 => 9,  74 => 8,  62 => 5,  50 => 4,  43 => 1,  40 => 3,  15 => 1,);
    }

    public function getSourceContext()
    {
        return new Twig_Source("{% extends \"@UVDeskSupportCenter/Templates/layout.html.twig\" %}

{% if article.slug %}
\t{% block canonical %}{{ url('helpdesk_knowledgebase_read_slug_article', {'slug':article.slug }) }}{% endblock %}
\t{% block ogcanonical %}{{ url('helpdesk_knowledgebase_read_slug_article', {'slug':article.slug }) }}{% endblock %}
{% endif %}

{% block title %}{{ article.metaTitle ? article.metaTitle : article.name }}{% endblock %}
{% block ogtitle %}{{ article.metaTitle ? article.metaTitle : article.name }}{% endblock %}
{% block twtitle %}{{ article.metaTitle ? article.metaTitle : article.name }}{% endblock %}
{% block metaDescription %}{{ article.metaDescription ? article.metaDescription : uvdesk_service.createConentToKeywords(article.content, 255, true)|join(' ') }}{% endblock %}
{% block metaKeywords %}{{ article.keywords ? : uvdesk_service.createConentToKeywords(article.content) }}{% endblock %}

{% block body %}
\t<div class=\"uv-paper-article\">
\t\t<div class=\"uv-paper-section\">
\t\t\t<section>
\t\t\t\t<h1 {% if article.stared %}class=\"uv-starred\"{% endif %}>{{ article.name }}</h1>
\t\t\t\t<p>{{ article.content }}</p>
\t\t\t\t<div class=\"uv-author\">
\t\t\t\t\t{% if articleAuthor is defined and articleAuthor is not empty %}
\t\t\t\t\t\t<div class=\"uv-author-avatar\">
\t\t\t\t\t\t\t{% if articleAuthor.user.profileImage is defined and articleAuthor.user.profileImage %}
\t\t\t\t\t\t\t\t<img src=\"{{articleAuthor.user.profileImage}}\">
\t\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t\t<img src=\"{{ asset(default_customer_image_path) }}\">
\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<div class=\"uv-author-info\">
\t\t\t\t\t\t\t<p>{{ articleAuthor.firstName | capitalize }} {{ articleAuthor.lastName | capitalize }}</p>
\t\t\t\t\t\t\t<p><span>{{\"Published on\"|trans}} -</span> {{dateAdded}}</p>
\t\t\t\t\t\t</div>
\t\t\t\t\t{% endif %}


\t\t\t\t</div>
\t\t\t</section>

\t\t\t<section class=\"uv-editor\" style=\"overflow-x: auto;\">
\t\t\t\t{{ article.content|raw }}
\t\t\t</section>

\t\t\t{% if feedbacks is defined and feedbacks.enabled == true %}
\t\t\t\t<section id=\"feedbacks\" class=\"article-feedbacks\">
\t\t\t\t\t{% if feedbacks.submitted == true %}
\t\t\t\t\t\t<p>Thank you for your feedback!</p>
\t\t\t\t\t{% endif %}
\t\t\t\t</section>
\t\t\t{% endif %}

\t\t\t{# {% set companyDisqus = application_service.getCompanyDisqus() %}
\t\t\t{% if companyDisqus is defined and companyDisqus is not empty %}
\t\t\t\t{% if companyDisqus.ticketConversion is defined and companyDisqus.ticketConversion == true %}
\t\t\t\t\t<section class=\"disqus-thread\">
\t\t\t\t\t\t{{ knp_disqus_render(companyDisqus.website, {'id': \"article-{{ article.id }}\", 'limit': 10, 'newCommentCallbackFunctionName': 'disqusCommentCallback'}) }}
\t\t\t\t\t</section>

\t\t\t\t\t<script type=\"text/javascript\">
\t\t\t\t\t\tfunction disqusCommentCallback() {
\t\t\t\t\t\t\t// Set delay for disqus to update comments
\t\t\t\t\t\t\tsetTimeout(function() {
\t\t\t\t\t\t\t\t\$.get(\"{{ url('app_webhook_callback', {'applicationRouteName': 'disqus-engage'}) }}\");
\t\t\t\t\t\t\t}, 2000);
\t\t\t\t\t\t}
\t\t\t\t\t</script>
\t\t\t\t{% else %}
\t\t\t\t\t<section class=\"disqus-thread\">
\t\t\t\t\t\t{{ knp_disqus_render(companyDisqus.website, {'id': \"article-{{ article.id }}\", 'limit': 10}) }}
\t\t\t\t\t</section>
\t\t\t\t{% endif %}
\t\t\t{% endif %} #}
\t\t</div>

\t\t{% include \"@UVDeskSupportCenter/Templates/sidepanel.html.twig\" %}
\t</div>
\t{{ parent() }}
{% endblock %}

{% block footer %}
\t{{ parent() }}

\t{# Article Feedbacks #}
\t{% if feedbacks is defined and feedbacks.enabled == true and feedbacks.submitted == false %}
\t\t<script id=\"article_feedback_template\" type=\"text/template\">
\t\t\t<p>Was this article helpful?</p>
\t\t\t<ul>
\t\t\t\t<li class=\"uv-btn-small article-badge-pta\" data-feedback=\"positive\">Yes</li>
\t\t\t\t<li class=\"uv-btn-small article-badge-pta\" data-feedback=\"negative\">No</li>
\t\t\t</ul>
\t\t</script>

\t\t<script type=\"text/javascript\">
\t\t\t\$(function() {
\t\t\t\tvar ArticleFeedback = Backbone.View.extend({
\t\t\t\t\tel: \$(\"#feedbacks\"),
\t\t\t\t\tfeedbacks: {positive: 0, negative: 0, collection: []},
\t\t\t\t\ttemplate: _.template(\$(\"#article_feedback_template\").html()),
\t\t\t\t\tevents: {
\t\t\t\t\t\t'click .article-badge-pta': 'ratingsPTA',
\t\t\t\t\t},
\t\t\t\t\tinitialize: function() {
\t\t\t\t\t\t{% if feedbacks is defined and feedbacks.article is not empty %}
\t\t\t\t\t\t\tthis.feedbacks = {{ feedbacks.article|json_encode|raw }};
\t\t\t\t\t\t{% endif %}

\t\t\t\t\t\tthis.render();
\t\t\t\t\t},
\t\t\t\t\trender: function() {
\t\t\t\t\t\tthis.\$el.html(this.template());
\t\t\t\t\t},
\t\t\t\t\tratingsPTA: function(e) {
\t\t\t\t\t\tvar self = this;
\t\t\t\t\t\tvar feedbackType = \$(e.currentTarget).data('feedback');

\t\t\t\t\t\t\$.ajax({
\t\t\t\t\t\t\turl: \"{{ url('helpdesk_knowledgebase_rate_article', {'articleId': article.id}) }}\",
\t\t\t\t\t\t\tmethod: 'POST',
\t\t\t\t\t\t\tdata: {
\t\t\t\t\t\t\t\tfeedback: feedbackType,
\t\t\t\t\t\t\t},
\t\t\t\t\t\t\tsuccess: function(response) {
\t\t\t\t\t\t\t\tthis.\$el.html('');
\t\t\t\t\t\t\t\tapp.appView.renderResponseAlert(response);
\t\t\t\t\t\t\t},
\t\t\t\t\t\t\terror: function(response) {
\t\t\t\t\t\t\t\tresponse = \$.parseJSON(response.responseText);

\t\t\t\t\t\t\t\t// app.appView.hideLoader();
\t\t\t\t\t\t\t\tapp.appView.renderResponseAlert(response);
\t\t\t\t\t\t\t}
\t\t\t\t\t\t});
\t\t\t\t\t},
\t\t\t\t});

\t\t\t\tvar articleFeedback = new ArticleFeedback();
\t\t\t});
\t\t</script>
\t{% endif %}
{% endblock %}
", "@UVDeskSupportCenter/Knowledgebase/article.html.twig", "/home/users/akshay.kumar/Workstation/apps/uvdesk/releases/uvdesk_community_01_development_php_72/vendor/uvdesk/support-center-bundle/Resources/views/Knowledgebase/article.html.twig");
    }
}
