<?php

/* category.manage.tpl */
class __TwigTemplate_de0ad225dc495f187945df4e938d7dce extends Twig_Template
{
    public function display(array $context)
    {
        // line 1
        echo "<link rel=\"stylesheet\" href=\"Styles/categories.css\" type=\"text/css\" />
<form method=\"post\" id=\"frmCategories\" action=\"index.php?ToDo=deleteCategory\">
<div class=\"row\">
\t<div class=\"col-sm-12\">
\t\t<h4 class=\"page-title\">";
        // line 5
        echo getLang("ViewCategories");
        echo "</h4>
\t\t<p>";
        // line 6
        echo getLang("ManageCatIntro");
        echo "</p>
\t\t";
        // line 7
        echo twig_safe_filter((isset($context['Message']) ? $context['Message'] : null));
        echo "
\t</div>
</div>

<div class=\"row\">
\t<div class=\"col-sm-12\">
\t\t<input type=\"button\" value=\"";
        // line 13
        echo getLang("CreateCategory");
        echo "...\" class=\"btn btn-primary\" onclick=\"document.location.href='index.php?ToDo=createCategory'\" />
\t\t<input type=\"button\" name=\"CancelButton1\" value=\"";
        // line 14
        echo getLang("DeleteSelected");
        echo "\" class=\"btn btn-danger\" onclick=\"ConfirmDeleteSelected()\" ";
        echo twig_safe_filter((isset($context['DisableDelete']) ? $context['DisableDelete'] : null));
        echo " />
\t</div>
</div>
<br />

<div class=\"row\">
\t<div class=\"col-sm-12\">
\t\t<div class=\"panel panel-default\" style=\"display: ";
        // line 21
        echo twig_safe_filter((isset($context['DisplayGrid']) ? $context['DisplayGrid'] : null));
        echo "\">
\t\t\t<div class=\"panel-body pn\">
\t\t\t\t<div class=\"table-responsive\">
\t\t\t\t\t<table class=\"GridPanel SortablePanel table table-striped\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">
\t\t\t\t\t\t<thead>
\t\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t\t<th style=\"padding-left: 5px;\" width=\"1\"><input type=\"checkbox\" id=\"deleteAllToggle\"></th>
\t\t\t\t\t\t\t\t<th class=\"NoWrap\">Nome da categoria</th>
\t\t\t\t\t\t\t\t<th width=\"80\">Produtos</th>
\t\t\t\t\t\t\t\t<th width=\"120\">Visível</th>
\t\t\t\t\t\t\t\t<th width=\"120\">Ação</th>
\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t</thead>
\t\t\t\t\t</table>
\t\t\t\t\t
\t\t\t\t\t";
        // line 36
        echo twig_safe_filter((isset($context['CategoryList']) ? $context['CategoryList'] : null));
        echo "
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</div>
</div>
</form>
";
        // line 43
        $this->env->loadTemplate("category.select.modal.tpl")->display($context);
        echo "
\t<div id=\"reassignModal\" style=\"display: none;\">
\t\t<div class=\"ModalTitle\">";
        // line 46
        echo getLang("ReassignModalTitle");
        echo "</div>
\t\t<div class=\"ModalContent\">
\t\t\t<table class=\"Panel\" width=\"100%\">
\t\t\t\t<tr>
\t\t\t\t\t<td id=\"reassignCategoryModalIntro\">";
        // line 50
        echo getLang("ReassignModalIntro");
        echo "</td>
\t\t\t\t</tr>
\t\t\t\t<tr>
\t\t\t\t\t<td>
\t\t\t\t\t\t<label>
\t\t\t\t\t\t<input type=\"radio\" name=\"reassignOption\" value=\"reassign\" id=\"reassignOption1\" checked=\"checked\"/>
\t\t\t\t\t\t";
        // line 56
        echo getLang("ReassignModalOption1");
        echo "\t\t\t\t\t\t</label>
\t\t\t\t\t\t<div id=\"parentidSelect\" class=\"categoryPickerLinker\" style=\"width: 98% margin: 5px;\"></div>
\t\t\t\t\t</td>
\t\t\t\t</tr>
\t\t\t\t<tr>
\t\t\t\t\t<td>
\t\t\t\t\t\t<label>
\t\t\t\t\t\t\t<input type=\"radio\" name=\"reassignOption\" value=\"delete\" id=\"reassignOption2\" />
\t\t\t\t\t\t\t";
        // line 65
        echo getLang("ReassignModalOption2");
        echo "\t\t\t\t\t\t</label>
\t\t\t\t\t</td>
\t\t\t\t</tr>
\t\t\t</table>
\t\t</div>
\t\t<div class=\"ModalButtonRow\">
\t\t\t<div class=\"FloatLeft\">
\t\t\t\t<img src=\"images/loading.gif\" alt=\"\" style=\"vertical-align: middle; display: none;\" class=\"LoadingIndicator\" />
\t\t\t\t<input type=\"button\" class=\" btn btn-default\" value=\"";
        // line 74
        echo getLang("Cancel");
        echo "\" id=\"cancelStep1\" />
\t\t\t</div>
\t\t\t<input type=\"button\" class=\"btn btn-primary\" value=\"";
        // line 76
        echo getLang("Continue");
        echo " >>\" id=\"continueStep1\" />
\t\t</div>
\t</div>
\t<div id=\"confirmModal\" style=\"display: none;\">
\t\t<div class=\"ModalTitle\">";
        // line 80
        echo getLang("ConfirmModalTitle");
        echo "</div>
\t\t<div class=\"ModalContent\">
\t\t\t<table class=\"Panel\" width=\"100%\">
\t\t\t\t<tr>
\t\t\t\t\t<td id=\"confirmModalIntro\"></td>
\t\t\t\t</tr>
\t\t\t</table>
\t\t</div>
\t\t<div class=\"ModalButtonRow\">
\t\t\t<div class=\"FloatLeft\">
\t\t\t\t<img src=\"images/loading.gif\" alt=\"\" style=\"vertical-align: middle; display: none;\" class=\"LoadingIndicator\" />
\t\t\t\t<input type=\"button\" class=\"CloseButton FormButton btn btn-default\" value=\"";
        // line 91
        echo getLang("Cancel");
        echo "\" id=\"cancelStep2\" />
\t\t\t</div>
\t\t\t<input type=\"button\" class=\"Fbtn btn-primary\" value=\"";
        // line 93
        echo getLang("ConfirmModalButton");
        echo "\" id=\"continueStep2\" />
\t\t</div>
\t</div>
\t<div id=\"progressModal\" style=\"display: none;\">
\t\t<div class=\"ModalTitle\">
\t\t\t";
        // line 98
        echo getLang("CategoriesDeletionInProgress");
        echo "\t\t</div>
\t\t<div class=\"ModalContent\" style=\"padding:10px;\">
\t\t\t<div id=\"deletionStatus\">
\t\t\t\t<div style=\"width: 208px; padding: 0px; margin: 10px auto 10px auto; position: relative; background: url('images/loadingAnimation.gif') no-repeat;\">
\t\t\t\t\t<div id=\"ProgressBarPercentage\" style=\"margin: 0; padding: 0; height: 13px; width: 0%; background: url('images/progressbar.gif') no-repeat; background-color: transparent;\">
\t\t\t\t\t\t&nbsp;
\t\t\t\t\t</div>
\t\t\t\t\t<div style=\"position: absolute; top: 0; text-align: center; width: 208px; font-weight: bold;\" id=\"ProgressPercent\">&nbsp;</div>
\t\t\t\t</div>
\t\t\t\t<div id=\"currentProgress\" style=\"text-align:center;\">
\t\t\t\t\t";
        // line 109
        echo getLang("DeletingProductsCategories");
        echo "\t\t\t\t</div>
\t\t\t</div>
\t\t\t<div class=\"deletionReport\">
\t\t\t\t<p />
\t\t\t\t<div id=\"catStatus\"></div>
\t\t\t\t<div id=\"prodStatus\"></div>
\t\t\t\t<p />
\t\t\t</div>
\t\t</div>
\t</div>

</div>
<script type=\"text/javascript\">
\tlang.categoryVisibleConfirmation = \"";
        // line 123
        echo Interspire_Template_Extension::jsFilter(getLang("CategoryVisibleConfirmation"), "'");
        echo "\";
\tlang.categoryInvisibleConfirmation = \"";
        // line 124
        echo Interspire_Template_Extension::jsFilter(getLang("CategoryInvisibleConfirmation"), "'");
        echo "\";
\tlang.visiblityNotChanged = \"";
        // line 125
        echo Interspire_Template_Extension::jsFilter(getLang("ErrCategoryVisibilityNotChanged"), "'");
        echo "\";
\tlang.clickToHideCategory = \"";
        // line 126
        echo Interspire_Template_Extension::jsFilter(getLang("ClickToHideCategory"), "'");
        echo "\";
\tlang.clickToShowCategory = \"";
        // line 127
        echo Interspire_Template_Extension::jsFilter(getLang("ClickToShowCategory"), "'");
        echo "\";
\tlang.chooseCategoryToDelete = \"";
        // line 128
        echo Interspire_Template_Extension::jsFilter(getLang("ChooseCategoryToDelete"), "'");
        echo "\";
\tlang.chooseCategoryToUpdate = \"";
        // line 129
        echo Interspire_Template_Extension::jsFilter(getLang("ChooseCategoryToUpdate"), "'");
        echo "\";
\tlang.confirmDeleteCategories = \"";
        // line 130
        echo Interspire_Template_Extension::jsFilter(getLang("ConfirmDeleteCategories"), "'");
        echo "\";
\tlang.reassignModalIntro = \"";
        // line 131
        echo Interspire_Template_Extension::jsFilter(getLang("ReassignModalIntro"), "'");
        echo "\";
\tlang.confirmModalIntro = \"";
        // line 132
        echo Interspire_Template_Extension::jsFilter(getLang("ConfirmModalIntro1"), "'");
        echo "\" + \"";
        echo Interspire_Template_Extension::jsFilter(getLang("ConfirmModalIntro2"), "'");
        echo "\" + \"";
        echo Interspire_Template_Extension::jsFilter(getLang("ConfirmModalIntro3"), "'");
        echo "\";
\tlang.confirmCancel = \"";
        // line 133
        echo getLang("ConfirmCancel");
        echo "\";
\tlang.chooseThisCategory = \"";
        // line 134
        echo Interspire_Template_Extension::jsFilter(getLang("ChooseThisCategory"), "'");
        echo "\";
\tlang.categorySelectModalIntro = \"";
        // line 135
        echo Interspire_Template_Extension::jsFilter(getLang("CategoryMappingModalIntro"), "'");
        echo "\";
\tlang.googleCategorySelectModalIntro = \"";
        // line 136
        echo Interspire_Template_Extension::jsFilter(getLang("GoogleCategoryMappingModalIntro"), "'");
        echo "\";
\tlang.categorySelectModalTitle = \"";
        // line 137
        echo Interspire_Template_Extension::jsFilter(getLang("CategoryMappingModalTitle"), "'");
        echo "\";
\tlang.categorySelectLeafCategorySelected = \"";
        // line 138
        echo Interspire_Template_Extension::jsFilter(getLang("CategoryMappingLeafCategorySelected"), "'");
        echo "\";
\tlang.googleCategorySelectLeafCategorySelected = \"";
        // line 139
        echo Interspire_Template_Extension::jsFilter(getLang("GoogleCategoryMappingLeafCategorySelected"), "'");
        echo "\";
\tlang.categorySelectChooseLeafCategory = \"";
        // line 140
        echo Interspire_Template_Extension::jsFilter(getLang("CategoryMappingChooseLeafCategory"), "'");
        echo "\";
\tlang.pleaseSelectReassignCategory = \"";
        // line 141
        echo Interspire_Template_Extension::jsFilter(getLang("PleaseSelectReassignCategory"), "'");
        echo "\";
\tlang.deletingProductsCategories = \"";
        // line 142
        echo Interspire_Template_Extension::jsFilter(getLang("DeletingProductsCategories"), "'");
        echo "\";
\tlang.deletingCategories = \"";
        // line 143
        echo Interspire_Template_Extension::jsFilter(getLang("DeletingCategories"), "'");
        echo "\";
\tlang.reassigningCategories = \"";
        // line 144
        echo Interspire_Template_Extension::jsFilter(getLang("ReassigningCategories"), "'");
        echo "\";
\tlang.ChooseGooglePsCategory = \"";
        // line 145
        echo Interspire_Template_Extension::jsFilter(getLang("ChooseGooglePsCategory"), "'");
        echo "\";
\tlang.ChooseGooglePsCategoryIntro = \"";
        // line 146
        echo Interspire_Template_Extension::jsFilter(getLang("ChooseGooglePsCategoryIntro"), "'");
        echo "\";

\tfunction ConfirmDeleteSelected()
\t{
\t\tvar fp = document.getElementById(\"frmCategories\").elements;
\t\tvar c = 0;

\t\tfor(i = 0; i < fp.length; i++)
\t\t{
\t\t\tif(fp[i].type == \"checkbox\" && fp[i].checked)
\t\t\t\tc++;
\t\t}

\t\tif(c > 0)
\t\t{
\t\t\tif(confirm(\"ALERTA: Isto excluirá permanentemente as páginas selecionadas. Você tem certeza que deseja fazer isso?\"))
\t\t\t\tdocument.getElementById(\"frmCategories\").submit();
\t\t}
\t\telse
\t\t{
\t\t\talert(\"Por favor, escolha ao menos uma página para excluir.\");
\t\t}
\t}

</script>

<script type=\"text/javascript\" src=\"../javascript/jquery/plugins/jquery.ui.nestedSortable.js?";
        // line 172
        echo twig_escape_filter($this->env, (isset($context['JSCacheToken']) ? $context['JSCacheToken'] : null), "1");
        echo "\"></script>
<script type=\"text/javascript\" src=\"../javascript/jquery/plugins/idletimer/cookie.js?";
        // line 173
        echo twig_escape_filter($this->env, (isset($context['JSCacheToken']) ? $context['JSCacheToken'] : null), "1");
        echo "\"></script>
<script type=\"text/javascript\" src=\"script/category.manager.js?";
        // line 174
        echo twig_escape_filter($this->env, (isset($context['JSCacheToken']) ? $context['JSCacheToken'] : null), "1");
        echo "\"></script>
<script type=\"text/javascript\" src=\"script/category.selector.js?";
        // line 175
        echo twig_escape_filter($this->env, (isset($context['JSCacheToken']) ? $context['JSCacheToken'] : null), "1");
        echo "\"></script>
<script type=\"text/javascript\" src=\"../javascript/jquery/plugins/jstree/jquery.jstree.js?";
        // line 176
        echo twig_escape_filter($this->env, (isset($context['JSCacheToken']) ? $context['JSCacheToken'] : null), "1");
        echo "\"></script>

<script language=\"javascript\" type=\"text/javascript\">//<![CDATA[
\$(function(){
\tCategoryManager.shoppingComparisonModules = {};

\t";
        // line 182
        $context['_parent'] = (array) $context;
        $context['_seq'] = twig_iterator_to_array((isset($context['ShoppingComparisonModules']) ? $context['ShoppingComparisonModules'] : null));
        $countable = is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof Countable);
        $length = $countable ? count($context['_seq']) : null;
        $context['loop'] = array(
          'parent' => $context['_parent'],
          'index0' => 0,
          'index'  => 1,
          'first'  => true,
        );
        if ($countable) {
            $context['loop']['revindex0'] = $length - 1;
            $context['loop']['revindex'] = $length;
            $context['loop']['length'] = $length;
            $context['loop']['last'] = 1 === $length;
        }
        foreach ($context['_seq'] as $context['_key'] => $context['module']) {
            echo "\t\tCategoryManager.shoppingComparisonModules[\"";
            // line 183
            echo $this->getEnvironment()->getExtension('interspire')->jsFilter($this->getAttribute((isset($context['module']) ? $context['module'] : null), "getId", array(), "any"));
            echo "\"] = {
\t\t\tname: \"";
            // line 184
            echo $this->getEnvironment()->getExtension('interspire')->jsFilter($this->getAttribute((isset($context['module']) ? $context['module'] : null), "getName", array(), "any"));
            echo "\"
\t\t};
\t";
            ++$context['loop']['index0'];
            ++$context['loop']['index'];
            $context['loop']['first'] = false;
            if ($countable) {
                --$context['loop']['revindex0'];
                --$context['loop']['revindex'];
                $context['loop']['last'] = 0 === $context['loop']['revindex0'];
            }
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['module'], $context['_parent'], $context['loop']);
        $context = array_merge($_parent, array_intersect_key($context, $_parent));
        // line 186
        echo "});
//]]></script>

";
        // line 190
        $this->env->loadTemplate("googleps.bulkedit.modal.tpl")->display($context);
        echo "
";
        // line 192
        if ((isset($context['invalidCatsMapping']) ? $context['invalidCatsMapping'] : null)) {
            echo "\t";
            // line 193
            $this->env->loadTemplate("googleps.category.warning.tpl")->display($context);
            echo "\t<script type=\"text/javascript\" src=\"script/google.ps.category.warning.js?";
            // line 194
            echo twig_escape_filter($this->env, (isset($context['JSCacheToken']) ? $context['JSCacheToken'] : null), "1");
            echo "\"></script>
";
        }
    }

}
