public function block_content($context, array $blocks = array())
 {
     // line 6
     echo "\n";
     // line 7
     if (isset($context["admin"])) {
         $_admin_ = $context["admin"];
     } else {
         $_admin_ = null;
     }
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable($this->getAttribute($_admin_, "system_messages", array(0 => array("type" => "info")), "method"));
     $context['loop'] = array('parent' => $context['_parent'], 'index0' => 0, 'index' => 1, 'first' => true);
     if (is_array($context['_seq']) || is_object($context['_seq']) && $context['_seq'] instanceof Countable) {
         $length = count($context['_seq']);
         $context['loop']['revindex0'] = $length - 1;
         $context['loop']['revindex'] = $length;
         $context['loop']['length'] = $length;
         $context['loop']['last'] = 1 === $length;
     }
     foreach ($context['_seq'] as $context["_key"] => $context["msg"]) {
         // line 8
         echo "<div class=\"nNote nInformation hideit ";
         if (isset($context["loop"])) {
             $_loop_ = $context["loop"];
         } else {
             $_loop_ = null;
         }
         if ($this->getAttribute($_loop_, "first")) {
             echo "first";
         }
         echo "\">\n    <p><strong>";
         // line 9
         echo gettext("INFORMATION");
         echo ": </strong>";
         if (isset($context["msg"])) {
             $_msg_ = $context["msg"];
         } else {
             $_msg_ = null;
         }
         echo twig_escape_filter($this->env, $_msg_, "html", null, true);
         echo "</p>\n</div>\n";
         ++$context['loop']['index0'];
         ++$context['loop']['index'];
         $context['loop']['first'] = false;
         if (isset($context['loop']['length'])) {
             --$context['loop']['revindex0'];
             --$context['loop']['revindex'];
             $context['loop']['last'] = 0 === $context['loop']['revindex0'];
         }
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['msg'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 12
     echo "\n";
     // line 13
     if (isset($context["admin"])) {
         $_admin_ = $context["admin"];
     } else {
         $_admin_ = null;
     }
     if ($this->getAttribute($_admin_, "system_is_allowed", array(0 => array("mod" => "stats")), "method")) {
         // line 14
         echo "<div class=\"widget\">\n    <div class=\"head\"><h5><i class=\"dark-sprite-icon sprite-chart8\" style=\"margin: 0 15px 0 -15px\"></i>";
         // line 15
         if (isset($context["guest"])) {
             $_guest_ = $context["guest"];
         } else {
             $_guest_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($_guest_, "system_company"), "name"), "html", null, true);
         echo " ";
         echo gettext("Statistics");
         echo "</h5></div>\n    ";
         // line 16
         if (isset($context["admin"])) {
             $_admin_ = $context["admin"];
         } else {
             $_admin_ = null;
         }
         $context["stats"] = $this->getAttribute($_admin_, "stats_get_summary");
         // line 17
         echo "    ";
         if (isset($context["admin"])) {
             $_admin_ = $context["admin"];
         } else {
             $_admin_ = null;
         }
         $context["income"] = $this->getAttribute($_admin_, "stats_get_summary_income");
         // line 18
         echo "    <table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" class=\"tableStatic\">\n        <thead>\n            <tr>\n                <td width=\"10%\">";
         // line 21
         echo gettext("Metric");
         echo "</td>\n                <td>";
         // line 22
         echo gettext("Today");
         echo "</td>\n                <td>";
         // line 23
         echo gettext("Yesterday");
         echo "</td>\n                <td>";
         // line 24
         echo gettext("This month so far");
         echo "</td>\n                <td>";
         // line 25
         echo gettext("Last month");
         echo "</td>\n                <td>";
         // line 26
         echo gettext("Total");
         echo "</td>\n            </tr>\n        </thead>\n\n        <tbody>\n            <tr>\n                <td>";
         // line 32
         echo gettext("Income");
         echo "</td>\n                <td align=\"center\"><a href=\"";
         // line 33
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("invoice", array("paid_at" => twig_date_format_filter($this->env, "now", "Y-m-d")));
         echo "\" title=\"\" class=\"webStatsLink\">";
         if (isset($context["mf"])) {
             $_mf_ = $context["mf"];
         } else {
             $_mf_ = null;
         }
         if (isset($context["income"])) {
             $_income_ = $context["income"];
         } else {
             $_income_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_mf_, "currency_format", array(0 => $this->getAttribute($_income_, "today")), "method"), "html", null, true);
         echo "</a></td>\n                <td align=\"center\"><a href=\"";
         // line 34
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("invoice", array("paid_at" => twig_date_format_filter($this->env, "yesterday", "Y-m-d")));
         echo "\" title=\"\" class=\"webStatsLink\">";
         if (isset($context["mf"])) {
             $_mf_ = $context["mf"];
         } else {
             $_mf_ = null;
         }
         if (isset($context["income"])) {
             $_income_ = $context["income"];
         } else {
             $_income_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_mf_, "currency_format", array(0 => $this->getAttribute($_income_, "yesterday")), "method"), "html", null, true);
         echo "</a></td>\n                <td align=\"center\"><a href=\"";
         // line 35
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("invoice");
         echo "\" title=\"\" class=\"webStatsLink\">";
         if (isset($context["mf"])) {
             $_mf_ = $context["mf"];
         } else {
             $_mf_ = null;
         }
         if (isset($context["income"])) {
             $_income_ = $context["income"];
         } else {
             $_income_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_mf_, "currency_format", array(0 => $this->getAttribute($_income_, "this_month")), "method"), "html", null, true);
         echo "</a></td>\n                <td align=\"center\"><a href=\"";
         // line 36
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("invoice");
         echo "\" title=\"\" class=\"webStatsLink\">";
         if (isset($context["mf"])) {
             $_mf_ = $context["mf"];
         } else {
             $_mf_ = null;
         }
         if (isset($context["income"])) {
             $_income_ = $context["income"];
         } else {
             $_income_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_mf_, "currency_format", array(0 => $this->getAttribute($_income_, "last_month")), "method"), "html", null, true);
         echo "</a></td>\n                <td align=\"center\"><a href=\"";
         // line 37
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("invoice");
         echo "\" title=\"\" class=\"webStatsLink\">";
         if (isset($context["mf"])) {
             $_mf_ = $context["mf"];
         } else {
             $_mf_ = null;
         }
         if (isset($context["income"])) {
             $_income_ = $context["income"];
         } else {
             $_income_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_mf_, "currency_format", array(0 => $this->getAttribute($_income_, "total")), "method"), "html", null, true);
         echo "</a></td>\n            </tr>\n            <tr>\n                <td>";
         // line 40
         echo gettext("Clients");
         echo "</td>\n                <td align=\"center\"><a href=\"";
         // line 41
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("client", array("created_at" => twig_date_format_filter($this->env, "now", "Y-m-d")));
         echo "\" title=\"\" class=\"webStatsLink\">";
         if (isset($context["stats"])) {
             $_stats_ = $context["stats"];
         } else {
             $_stats_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_stats_, "clients_today"), "html", null, true);
         echo "</a></td>\n                <td align=\"center\"><a href=\"";
         // line 42
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("client", array("created_at" => twig_date_format_filter($this->env, "yesterday", "Y-m-d")));
         echo "\" title=\"\" class=\"webStatsLink\">";
         if (isset($context["stats"])) {
             $_stats_ = $context["stats"];
         } else {
             $_stats_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_stats_, "clients_yesterday"), "html", null, true);
         echo "</a></td>\n                <td align=\"center\"><a href=\"";
         // line 43
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("client");
         echo "\" title=\"\" class=\"webStatsLink\">";
         if (isset($context["stats"])) {
             $_stats_ = $context["stats"];
         } else {
             $_stats_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_stats_, "clients_this_month"), "html", null, true);
         echo "</a></td>\n                <td align=\"center\"><a href=\"";
         // line 44
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("client");
         echo "\" title=\"\" class=\"webStatsLink\">";
         if (isset($context["stats"])) {
             $_stats_ = $context["stats"];
         } else {
             $_stats_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_stats_, "clients_last_month"), "html", null, true);
         echo "</a></td>\n                <td align=\"center\"><a href=\"";
         // line 45
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("client");
         echo "\" title=\"\" class=\"webStatsLink\">";
         if (isset($context["stats"])) {
             $_stats_ = $context["stats"];
         } else {
             $_stats_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_stats_, "clients_total"), "html", null, true);
         echo "</a></td>\n            </tr>\n            <tr>\n                <td>";
         // line 48
         echo gettext("Orders");
         echo "</td>\n                <td align=\"center\"><a href=\"";
         // line 49
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("order", array("created_at" => twig_date_format_filter($this->env, "now", "Y-m-d")));
         echo "\" title=\"\" class=\"webStatsLink\">";
         if (isset($context["stats"])) {
             $_stats_ = $context["stats"];
         } else {
             $_stats_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_stats_, "orders_today"), "html", null, true);
         echo "</a></td>\n                <td align=\"center\"><a href=\"";
         // line 50
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("order", array("created_at" => twig_date_format_filter($this->env, "yesterday", "Y-m-d")));
         echo "\" title=\"\" class=\"webStatsLink\">";
         if (isset($context["stats"])) {
             $_stats_ = $context["stats"];
         } else {
             $_stats_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_stats_, "orders_yesterday"), "html", null, true);
         echo "</a></td>\n                <td align=\"center\"><a href=\"";
         // line 51
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("order");
         echo "\" title=\"\" class=\"webStatsLink\">";
         if (isset($context["stats"])) {
             $_stats_ = $context["stats"];
         } else {
             $_stats_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_stats_, "orders_this_month"), "html", null, true);
         echo "</a></td>\n                <td align=\"center\"><a href=\"";
         // line 52
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("order");
         echo "\" title=\"\" class=\"webStatsLink\">";
         if (isset($context["stats"])) {
             $_stats_ = $context["stats"];
         } else {
             $_stats_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_stats_, "orders_last_month"), "html", null, true);
         echo "</a></td>\n                <td align=\"center\"><a href=\"";
         // line 53
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("order");
         echo "\" title=\"\" class=\"webStatsLink\">";
         if (isset($context["stats"])) {
             $_stats_ = $context["stats"];
         } else {
             $_stats_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_stats_, "orders_total"), "html", null, true);
         echo "</a></td>\n            </tr>\n            <tr>\n                <td>";
         // line 56
         echo gettext("Invoices");
         echo "</td>\n                <td align=\"center\"><a href=\"";
         // line 57
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("invoice", array("created_at" => twig_date_format_filter($this->env, "now", "Y-m-d")));
         echo "\" title=\"\" class=\"webStatsLink\">";
         if (isset($context["stats"])) {
             $_stats_ = $context["stats"];
         } else {
             $_stats_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_stats_, "invoices_today"), "html", null, true);
         echo "</a></td>\n                <td align=\"center\"><a href=\"";
         // line 58
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("invoice", array("created_at" => twig_date_format_filter($this->env, "yesterday", "Y-m-d")));
         echo "\" title=\"\" class=\"webStatsLink\">";
         if (isset($context["stats"])) {
             $_stats_ = $context["stats"];
         } else {
             $_stats_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_stats_, "invoices_yesterday"), "html", null, true);
         echo "</a></td>\n                <td align=\"center\"><a href=\"";
         // line 59
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("invoice");
         echo "\" title=\"\" class=\"webStatsLink\">";
         if (isset($context["stats"])) {
             $_stats_ = $context["stats"];
         } else {
             $_stats_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_stats_, "invoices_this_month"), "html", null, true);
         echo "</a></td>\n                <td align=\"center\"><a href=\"";
         // line 60
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("invoice");
         echo "\" title=\"\" class=\"webStatsLink\">";
         if (isset($context["stats"])) {
             $_stats_ = $context["stats"];
         } else {
             $_stats_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_stats_, "invoices_last_month"), "html", null, true);
         echo "</a></td>\n                <td align=\"center\"><a href=\"";
         // line 61
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("invoice");
         echo "\" title=\"\" class=\"webStatsLink\">";
         if (isset($context["stats"])) {
             $_stats_ = $context["stats"];
         } else {
             $_stats_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_stats_, "invoices_total"), "html", null, true);
         echo "</a></td>\n            </tr>\n            <tr>\n                <td>";
         // line 64
         echo gettext("Tickets");
         echo "</td>\n                <td align=\"center\"><a href=\"";
         // line 65
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("support", array("created_at" => twig_date_format_filter($this->env, "now", "Y-m-d")));
         echo "\" title=\"\" class=\"webStatsLink\">";
         if (isset($context["stats"])) {
             $_stats_ = $context["stats"];
         } else {
             $_stats_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_stats_, "tickets_today"), "html", null, true);
         echo "</a></td>\n                <td align=\"center\"><a href=\"";
         // line 66
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("support", array("created_at" => twig_date_format_filter($this->env, "yesterday", "Y-m-d")));
         echo "\" title=\"\" class=\"webStatsLink\">";
         if (isset($context["stats"])) {
             $_stats_ = $context["stats"];
         } else {
             $_stats_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_stats_, "tickets_yesterday"), "html", null, true);
         echo "</a></td>\n                <td align=\"center\"><a href=\"";
         // line 67
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("support");
         echo "\" title=\"\" class=\"webStatsLink\">";
         if (isset($context["stats"])) {
             $_stats_ = $context["stats"];
         } else {
             $_stats_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_stats_, "tickets_this_month"), "html", null, true);
         echo "</a></td>\n                <td align=\"center\"><a href=\"";
         // line 68
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("support");
         echo "\" title=\"\" class=\"webStatsLink\">";
         if (isset($context["stats"])) {
             $_stats_ = $context["stats"];
         } else {
             $_stats_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_stats_, "tickets_last_month"), "html", null, true);
         echo "</a></td>\n                <td align=\"center\"><a href=\"";
         // line 69
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("support");
         echo "\" title=\"\" class=\"webStatsLink\">";
         if (isset($context["stats"])) {
             $_stats_ = $context["stats"];
         } else {
             $_stats_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_stats_, "tickets_total"), "html", null, true);
         echo "</a></td>\n            </tr>\n        </tbody>\n    </table>\n</div>\n";
     }
     // line 75
     echo "\n";
     // line 76
     if (isset($context["admin"])) {
         $_admin_ = $context["admin"];
     } else {
         $_admin_ = null;
     }
     $context["orders"] = $this->getAttribute($_admin_, "order_get_list", array(0 => array("per_page" => "5", "status" => "active")), "method");
     // line 77
     if (isset($context["orders"])) {
         $_orders_ = $context["orders"];
     } else {
         $_orders_ = null;
     }
     if (twig_length_filter($this->env, $this->getAttribute($_orders_, "list")) > 0) {
         // line 78
         echo "<div class=\"widgets\">\n    <div class=\"left\">\n        <div class=\"widget\">\n            <div class=\"head\">\n                <h5 class=\"iMoney\">";
         // line 82
         echo gettext("Latest orders");
         echo "</h5>\n                <div class=\"num\"><a href=\"";
         // line 83
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("order");
         echo "\" class=\"greenNum\">+";
         if (isset($context["orders"])) {
             $_orders_ = $context["orders"];
         } else {
             $_orders_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_orders_, "total"), "html", null, true);
         echo "</a></div>\n            </div>\n            <div style=\"height: 221px; overflow: auto;\">\n                <table class=\"tableStatic wide\">\n                    <thead>\n                        <tr>\n                            <td>";
         // line 89
         echo gettext("Order");
         echo "</td>\n                            <td>";
         // line 90
         echo gettext("Client");
         echo "</td>\n                        </tr>\n                    </thead>\n                    <tbody>\n                    ";
         // line 94
         if (isset($context["orders"])) {
             $_orders_ = $context["orders"];
         } else {
             $_orders_ = null;
         }
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable($this->getAttribute($_orders_, "list"));
         $context['_iterated'] = false;
         foreach ($context['_seq'] as $context["_key"] => $context["order"]) {
             // line 95
             echo "                        <tr title=\"";
             if (isset($context["order"])) {
                 $_order_ = $context["order"];
             } else {
                 $_order_ = null;
             }
             echo twig_escape_filter($this->env, twig_timeago_filter($this->getAttribute($_order_, "created_at")), "html", null, true);
             echo " ago\">\n                            <td><a href=\"";
             // line 96
             echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("order/manage");
             echo "/";
             if (isset($context["order"])) {
                 $_order_ = $context["order"];
             } else {
                 $_order_ = null;
             }
             echo twig_escape_filter($this->env, $this->getAttribute($_order_, "id"), "html", null, true);
             echo "\">";
             if (isset($context["order"])) {
                 $_order_ = $context["order"];
             } else {
                 $_order_ = null;
             }
             echo twig_escape_filter($this->env, twig_truncate_filter($this->env, $this->getAttribute($_order_, "title"), 35), "html", null, true);
             echo "</a></td>\n                            <td align=\"center\"><a href=\"";
             // line 97
             echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("client/manage");
             echo "/";
             if (isset($context["order"])) {
                 $_order_ = $context["order"];
             } else {
                 $_order_ = null;
             }
             echo twig_escape_filter($this->env, $this->getAttribute($_order_, "client_id"), "html", null, true);
             echo "\" title=\"\">";
             if (isset($context["order"])) {
                 $_order_ = $context["order"];
             } else {
                 $_order_ = null;
             }
             echo twig_escape_filter($this->env, twig_truncate_filter($this->env, $this->getAttribute($this->getAttribute($_order_, "client"), "first_name"), 1, null, "."), "html", null, true);
             echo " ";
             if (isset($context["order"])) {
                 $_order_ = $context["order"];
             } else {
                 $_order_ = null;
             }
             echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($_order_, "client"), "last_name"), "html", null, true);
             echo "</a></td>\n                        </tr>\n                    ";
             $context['_iterated'] = true;
         }
         if (!$context['_iterated']) {
             // line 100
             echo "                    <tr>\n                        <td colspan=\"2\" align=\"center\">";
             // line 101
             echo gettext("The list is empty");
             echo "</td>\n                    </tr>\n                    ";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['order'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 104
         echo "                    </tbody>\n                </table>\n            </div>\n        </div>\n    </div>\n\n    <div class=\"right\">\n        <div class=\"widget\">\n            <div class=\"head\">\n                <h5 class=\"iGraph\">";
         // line 113
         echo gettext("Product sales");
         echo "</h5>\n            </div>\n            <div style=\"height: 221px; overflow: auto;\">\n                <table class=\"tableStatic wide\">\n                    <thead>\n                        <tr>\n                            <td>";
         // line 119
         echo gettext("Product/Service");
         echo "</td>\n                            <td>";
         // line 120
         echo gettext("Orders");
         echo "</td>\n                        </tr>\n                    </thead>\n                    <tbody>\n                    ";
         // line 124
         if (isset($context["admin"])) {
             $_admin_ = $context["admin"];
         } else {
             $_admin_ = null;
         }
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable($this->getAttribute($_admin_, "stats_get_product_summary"));
         $context['_iterated'] = false;
         foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
             // line 125
             echo "                        <tr>\n                            <td><a href=\"";
             // line 126
             echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("product/manage");
             echo "/";
             if (isset($context["p"])) {
                 $_p_ = $context["p"];
             } else {
                 $_p_ = null;
             }
             echo twig_escape_filter($this->env, $this->getAttribute($_p_, "id"), "html", null, true);
             echo "\" title=\"";
             if (isset($context["p"])) {
                 $_p_ = $context["p"];
             } else {
                 $_p_ = null;
             }
             echo twig_escape_filter($this->env, $this->getAttribute($_p_, "title"), "html", null, true);
             echo "\">";
             if (isset($context["p"])) {
                 $_p_ = $context["p"];
             } else {
                 $_p_ = null;
             }
             echo twig_escape_filter($this->env, twig_truncate_filter($this->env, $this->getAttribute($_p_, "title"), 35), "html", null, true);
             echo "</a></td>\n                            <td align=\"center\"><a href=\"";
             // line 127
             if (isset($context["p"])) {
                 $_p_ = $context["p"];
             } else {
                 $_p_ = null;
             }
             echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("order", array("product_id" => $this->getAttribute($_p_, "id")));
             echo "\" title=\"\" class=\"webStatsLink\">";
             if (isset($context["p"])) {
                 $_p_ = $context["p"];
             } else {
                 $_p_ = null;
             }
             echo twig_escape_filter($this->env, $this->getAttribute($_p_, "orders"), "html", null, true);
             echo "</a></td>\n                        </tr>\n                    ";
             $context['_iterated'] = true;
         }
         if (!$context['_iterated']) {
             // line 130
             echo "                    <tr>\n                        <td colspan=\"2\" align=\"center\">";
             // line 131
             echo gettext("No active orders available");
             echo "</td>\n                    </tr>\n                    ";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['p'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 134
         echo "                    </tbody>\n                </table>\n            </div>\n        </div>\n    </div>\n    <div class=\"fix\"></div>\n</div>\n";
     }
     // line 142
     echo "\n";
     // line 143
     if (isset($context["admin"])) {
         $_admin_ = $context["admin"];
     } else {
         $_admin_ = null;
     }
     if ($this->getAttribute($_admin_, "system_is_allowed", array(0 => array("mod" => "stats")), "method")) {
         // line 144
         echo "<div class=\"widget\">\n    <div class=\"head\">\n        <h5><i class=\"dark-sprite-icon sprite-dropper\" style=\"margin: 0 15px 0 -15px\"></i>";
         // line 146
         echo gettext("Define date interval for graphs");
         echo "</h5>\n    </div>\n    <form method=\"get\" action=\"\" class=\"mainForm\">\n        <input type=\"hidden\" name=\"_url\" value=\"";
         // line 149
         if (isset($context["request"])) {
             $_request_ = $context["request"];
         } else {
             $_request_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_request_, "_url"), "html", null, true);
         echo "\" />\n        <fieldset>\n            <div class=\"rowElem noborder\">\n                <div class=\"moreFields\">\n                    <ul>\n                        <li style=\"width: 100px\"><input type=\"text\" name=\"date_from\" value=\"";
         // line 154
         if (isset($context["request"])) {
             $_request_ = $context["request"];
         } else {
             $_request_ = null;
         }
         if ($this->getAttribute($_request_, "date_from")) {
             if (isset($context["request"])) {
                 $_request_ = $context["request"];
             } else {
                 $_request_ = null;
             }
             echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute($_request_, "date_from"), "Y-m-d"), "html", null, true);
         }
         echo "\" placeholder=\"";
         if (isset($context["now"])) {
             $_now_ = $context["now"];
         } else {
             $_now_ = null;
         }
         echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $_now_, "Y-m-d"), "html", null, true);
         echo "\" class=\"datepicker\"/></li>\n                        <li class=\"sep\">-</li>\n                        <li style=\"width: 100px\"><input type=\"text\" name=\"date_to\" value=\"";
         // line 156
         if (isset($context["request"])) {
             $_request_ = $context["request"];
         } else {
             $_request_ = null;
         }
         if ($this->getAttribute($_request_, "date_to")) {
             if (isset($context["request"])) {
                 $_request_ = $context["request"];
             } else {
                 $_request_ = null;
             }
             echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute($_request_, "date_to"), "Y-m-d"), "html", null, true);
         }
         echo "\" placeholder=\"";
         if (isset($context["now"])) {
             $_now_ = $context["now"];
         } else {
             $_now_ = null;
         }
         echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $_now_, "Y-m-d"), "html", null, true);
         echo "\" class=\"datepicker\"/></li>\n                        <li class=\"sep\" style=\"padding-top: 0px\"><input type=\"submit\" value=\"";
         // line 157
         echo gettext("Update graphs");
         echo "\" class=\"greyishBtn\" /></li>\n                    </ul>\n                </div>\n                <div class=\"fix\"></div>\n            </div>\n        </fieldset>\n    </form>\n</div>\n\n<div class=\"widget\">\n    <div class=\"head\">\n        <h5><i class=\"dark-sprite-icon sprite-graph\" style=\"margin: 0 15px 0 -15px\"></i>";
         // line 168
         echo gettext("Income");
         echo "</h5>\n    </div>\n    <div class=\"body\">\n        <div id=\"graph-income\" style=\"width: 100%; height: 200px;\"></div>\n    </div>\n</div>\n\n<div class=\"widget\">\n    <div class=\"head\">\n        <h5><i class=\"dark-sprite-icon sprite-graph\" style=\"margin: 0 15px 0 -15px\"></i>";
         // line 177
         echo gettext("Orders");
         echo "</h5>\n    </div>\n    <div class=\"body\">\n        <div id=\"graph-orders\" style=\"width: 100%; height: 200px;\"></div>\n    </div>\n</div>\n\n<div class=\"widget\">\n    <div class=\"head\">\n        <h5><i class=\"dark-sprite-icon sprite-graph\" style=\"margin: 0 15px 0 -15px\"></i>";
         // line 186
         echo gettext("Invoices");
         echo "</h5>\n    </div>\n    <div class=\"body\">\n        <div id=\"graph-invoice\" style=\"width: 100%; height: 200px;\"></div>\n    </div>\n</div>\n\n<div class=\"widget\">\n    <div class=\"head\">\n        <h5><i class=\"dark-sprite-icon sprite-graph\" style=\"margin: 0 15px 0 -15px\"></i>";
         // line 195
         echo gettext("Clients");
         echo "</h5>\n    </div>\n    <div class=\"body\">\n        <div id=\"graph-clients\" style=\"width: 100%; height: 200px;\"></div>\n    </div>\n</div>\n\n<div class=\"widget\">\n    <div class=\"head\">\n        <h5><i class=\"dark-sprite-icon sprite-graph\" style=\"margin: 0 15px 0 -15px\"></i>";
         // line 204
         echo gettext("Support tickets");
         echo "</h5>\n    </div>\n    <div class=\"body\">\n        <div id=\"graph-tickets\" style=\"width: 100%; height: 200px;\"></div>\n    </div>\n</div>\n";
     }
     // line 211
     echo "\n";
     // line 212
     if (isset($context["admin"])) {
         $_admin_ = $context["admin"];
     } else {
         $_admin_ = null;
     }
     if ($this->getAttribute($_admin_, "system_is_allowed", array(0 => array("mod" => "activity")), "method")) {
         // line 213
         echo "<div class=\"widget simpleTabs\">\n    <ul class=\"tabs\">\n        <li><a href=\"#tab-index\">";
         // line 215
         echo gettext("Recent clients activity");
         echo "</a></li>\n        <li><a href=\"#tab-staff\">";
         // line 216
         echo gettext("Recent staff activity");
         echo "</a></li>\n    </ul>\n\n    <div class=\"tabs_container\">\n        <div class=\"fix\"></div>\n\n        <div class=\"tab_content nopadding\" id=\"tab-index\">\n            <table class=\"tableStatic wide\">\n                <tbody>\n                ";
         // line 225
         if (isset($context["admin"])) {
             $_admin_ = $context["admin"];
         } else {
             $_admin_ = null;
         }
         $context["events"] = $this->getAttribute($_admin_, "activity_log_get_list", array(0 => array("per_page" => 10, "only_clients" => 1)), "method");
         // line 226
         echo "                ";
         if (isset($context["events"])) {
             $_events_ = $context["events"];
         } else {
             $_events_ = null;
         }
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable($this->getAttribute($_events_, "list"));
         $context['_iterated'] = false;
         $context['loop'] = array('parent' => $context['_parent'], 'index0' => 0, 'index' => 1, 'first' => true);
         if (is_array($context['_seq']) || is_object($context['_seq']) && $context['_seq'] instanceof Countable) {
             $length = count($context['_seq']);
             $context['loop']['revindex0'] = $length - 1;
             $context['loop']['revindex'] = $length;
             $context['loop']['length'] = $length;
             $context['loop']['last'] = 1 === $length;
         }
         foreach ($context['_seq'] as $context["i"] => $context["event"]) {
             // line 227
             echo "                <tr ";
             if (isset($context["loop"])) {
                 $_loop_ = $context["loop"];
             } else {
                 $_loop_ = null;
             }
             if ($this->getAttribute($_loop_, "first")) {
                 echo "class=\"noborder\"";
             }
             echo ">\n                    <td style=\"width: 5%\"><a href=\"";
             // line 228
             echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("client/manage");
             echo "/";
             if (isset($context["event"])) {
                 $_event_ = $context["event"];
             } else {
                 $_event_ = null;
             }
             echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($_event_, "client"), "id"), "html", null, true);
             echo "\" title=\"";
             if (isset($context["event"])) {
                 $_event_ = $context["event"];
             } else {
                 $_event_ = null;
             }
             echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($_event_, "client"), "name"), "html", null, true);
             echo "\"><img src=\"";
             if (isset($context["event"])) {
                 $_event_ = $context["event"];
             } else {
                 $_event_ = null;
             }
             echo twig_escape_filter($this->env, twig_gravatar_filter($this->getAttribute($this->getAttribute($_event_, "client"), "email")), "html", null, true);
             echo "?size=20\" alt=\"";
             if (isset($context["event"])) {
                 $_event_ = $context["event"];
             } else {
                 $_event_ = null;
             }
             echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($_event_, "client"), "name"), "html", null, true);
             echo "\" /></a></td>\n                    <td>";
             // line 229
             if (isset($context["event"])) {
                 $_event_ = $context["event"];
             } else {
                 $_event_ = null;
             }
             echo twig_escape_filter($this->env, twig_truncate_filter($this->env, $this->getAttribute($this->getAttribute($_event_, "client"), "name"), 40), "html", null, true);
             echo "</td>\n                    <td><a href=\"";
             // line 230
             echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("client/manage");
             echo "/";
             if (isset($context["event"])) {
                 $_event_ = $context["event"];
             } else {
                 $_event_ = null;
             }
             echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($_event_, "client"), "id"), "html", null, true);
             echo "\">";
             if (isset($context["event"])) {
                 $_event_ = $context["event"];
             } else {
                 $_event_ = null;
             }
             echo twig_escape_filter($this->env, twig_truncate_filter($this->env, $this->getAttribute($_event_, "message"), 50), "html", null, true);
             echo "</a></td>\n                    <td>";
             // line 231
             if (isset($context["event"])) {
                 $_event_ = $context["event"];
             } else {
                 $_event_ = null;
             }
             echo twig_escape_filter($this->env, twig_timeago_filter($this->getAttribute($_event_, "created_at")), "html", null, true);
             echo " ago</td>\n                </tr>\n                </tbody>\n\n                ";
             $context['_iterated'] = true;
             ++$context['loop']['index0'];
             ++$context['loop']['index'];
             $context['loop']['first'] = false;
             if (isset($context['loop']['length'])) {
                 --$context['loop']['revindex0'];
                 --$context['loop']['revindex'];
                 $context['loop']['last'] = 0 === $context['loop']['revindex0'];
             }
         }
         if (!$context['_iterated']) {
             // line 236
             echo "                <tbody>\n                    <tr class=\"noborder\">\n                        <td colspan=\"4\">\n                            ";
             // line 239
             echo gettext("The list is empty");
             // line 240
             echo "                        </td>\n                    </tr>\n                </tbody>\n                ";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['i'], $context['event'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 244
         echo "            </table>\n        </div>\n        \n        <div class=\"tab_content nopadding\" id=\"tab-staff\">\n            <table class=\"tableStatic wide\">\n                <tbody>\n                ";
         // line 250
         if (isset($context["admin"])) {
             $_admin_ = $context["admin"];
         } else {
             $_admin_ = null;
         }
         $context["events"] = $this->getAttribute($_admin_, "activity_log_get_list", array(0 => array("per_page" => 10, "only_staff" => 1)), "method");
         // line 251
         echo "                ";
         if (isset($context["events"])) {
             $_events_ = $context["events"];
         } else {
             $_events_ = null;
         }
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable($this->getAttribute($_events_, "list"));
         $context['_iterated'] = false;
         $context['loop'] = array('parent' => $context['_parent'], 'index0' => 0, 'index' => 1, 'first' => true);
         if (is_array($context['_seq']) || is_object($context['_seq']) && $context['_seq'] instanceof Countable) {
             $length = count($context['_seq']);
             $context['loop']['revindex0'] = $length - 1;
             $context['loop']['revindex'] = $length;
             $context['loop']['length'] = $length;
             $context['loop']['last'] = 1 === $length;
         }
         foreach ($context['_seq'] as $context["i"] => $context["event"]) {
             // line 252
             echo "                <tr ";
             if (isset($context["loop"])) {
                 $_loop_ = $context["loop"];
             } else {
                 $_loop_ = null;
             }
             if ($this->getAttribute($_loop_, "first")) {
                 echo "class=\"noborder\"";
             }
             echo ">\n                    <td style=\"width: 5%\"><a href=\"";
             // line 253
             echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("staff/manage");
             echo "/";
             if (isset($context["event"])) {
                 $_event_ = $context["event"];
             } else {
                 $_event_ = null;
             }
             echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($_event_, "staff"), "id"), "html", null, true);
             echo "\" title=\"";
             if (isset($context["event"])) {
                 $_event_ = $context["event"];
             } else {
                 $_event_ = null;
             }
             echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($_event_, "staff"), "name"), "html", null, true);
             echo "\"><img src=\"";
             if (isset($context["event"])) {
                 $_event_ = $context["event"];
             } else {
                 $_event_ = null;
             }
             echo twig_escape_filter($this->env, twig_gravatar_filter($this->getAttribute($this->getAttribute($_event_, "staff"), "email")), "html", null, true);
             echo "?size=20\" alt=\"";
             if (isset($context["event"])) {
                 $_event_ = $context["event"];
             } else {
                 $_event_ = null;
             }
             echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($_event_, "staff"), "name"), "html", null, true);
             echo "\" /></a></td>\n                    <td>";
             // line 254
             if (isset($context["event"])) {
                 $_event_ = $context["event"];
             } else {
                 $_event_ = null;
             }
             echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($_event_, "staff"), "name"), "html", null, true);
             echo "</td>\n                    <td><a href=\"";
             // line 255
             echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("staff/manage");
             echo "/";
             if (isset($context["event"])) {
                 $_event_ = $context["event"];
             } else {
                 $_event_ = null;
             }
             echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($_event_, "staff"), "id"), "html", null, true);
             echo "\">";
             if (isset($context["event"])) {
                 $_event_ = $context["event"];
             } else {
                 $_event_ = null;
             }
             echo twig_escape_filter($this->env, twig_truncate_filter($this->env, $this->getAttribute($_event_, "message"), 50), "html", null, true);
             echo "</a></td>\n                    <td>";
             // line 256
             if (isset($context["event"])) {
                 $_event_ = $context["event"];
             } else {
                 $_event_ = null;
             }
             echo twig_escape_filter($this->env, twig_timeago_filter($this->getAttribute($_event_, "created_at")), "html", null, true);
             echo " ago</td>\n                </tr>\n                </tbody>\n\n                ";
             $context['_iterated'] = true;
             ++$context['loop']['index0'];
             ++$context['loop']['index'];
             $context['loop']['first'] = false;
             if (isset($context['loop']['length'])) {
                 --$context['loop']['revindex0'];
                 --$context['loop']['revindex'];
                 $context['loop']['last'] = 0 === $context['loop']['revindex0'];
             }
         }
         if (!$context['_iterated']) {
             // line 261
             echo "                <tbody>\n                    <tr class=\"noborder\">\n                        <td colspan=\"4\">\n                            ";
             // line 264
             echo gettext("The list is empty");
             // line 265
             echo "                        </td>\n                    </tr>\n                </tbody>\n                ";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['i'], $context['event'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 269
         echo "            </table>\n        </div>\n\n    </div>\n    \n    <div class=\"fix\"></div>\n</div>\n";
     }
     // line 277
     echo "\n";
 }
 protected function doDisplay(array $context, array $blocks = array())
 {
     // line 1
     $context["mf"] = $this->env->loadTemplate("macro_functions.phtml");
     // line 2
     $context["profile"] = $this->getAttribute(isset($context["admin"]) ? $context["admin"] : null, "profile_get");
     // line 3
     $context["company"] = $this->getAttribute(isset($context["guest"]) ? $context["guest"] : null, "system_company");
     // line 4
     echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n    <title>";
     // line 7
     $this->displayBlock('meta_title', $context, $blocks);
     echo " - ";
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["company"]) ? $context["company"] : null, "name"), "html", null, true);
     echo "</title>\n    <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0\" />\n\n    <link rel=\"shortcut icon\" href=\"favicon.ico\" />\n\n    ";
     // line 13
     $this->env->loadTemplate("partial_bb_meta.phtml")->display($context);
     // line 14
     echo "    \n    ";
     // line 15
     $this->env->loadTemplate("partial_styles.phtml")->display($context);
     // line 16
     echo "\n    <script type=\"text/javascript\" src=\"js/boxbilling.min.js?v=";
     // line 17
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["guest"]) ? $context["guest"] : null, "system_version"), "html", null, true);
     echo "\"></script>\n    <script type=\"text/javascript\" src=\"js/bb-admin.js?v=";
     // line 18
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["guest"]) ? $context["guest"] : null, "system_version"), "html", null, true);
     echo "\"></script>\n\n    ";
     // line 20
     $this->displayBlock('head', $context, $blocks);
     // line 21
     echo "</head>\n\n<body>\n";
     // line 24
     if (!(isset($context["admin"]) ? $context["admin"] : null)) {
         // line 25
         echo "<script type=\"text/javascript\">\$(function(){bb.redirect(\"";
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("staff/login");
         echo "\");});</script>\n";
     } else {
         // line 27
         echo "<div id=\"topNav\">\n    <div class=\"fixed\">\n        <div class=\"wrapper\">\n            <div class=\"welcome\">\n                <a href=\"";
         // line 31
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("staff/profile");
         echo "\" title=\"\"><img src=\"";
         echo twig_escape_filter($this->env, twig_gravatar_filter($this->getAttribute(isset($context["profile"]) ? $context["profile"] : null, "email")), "html", null, true);
         echo "?size=20\" alt=\"";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["profile"]) ? $context["profile"] : null, "name"), "html", null, true);
         echo "\" /></a><span>";
         echo gettext("Hi,");
         echo " ";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["profile"]) ? $context["profile"] : null, "name"), "html", null, true);
         echo "!</span>\n                ";
         // line 32
         $context["languages"] = $this->getAttribute(isset($context["guest"]) ? $context["guest"] : null, "extension_languages");
         // line 33
         echo "                ";
         if (twig_length_filter($this->env, isset($context["languages"]) ? $context["languages"] : null) > 1) {
             // line 34
             echo "                <span>\n                    <select name=\"lang\" class=\"language_selector\" style=\"background-color: #262b2f; color:white;\">\n                        ";
             // line 36
             $context['_parent'] = (array) $context;
             $context['_seq'] = twig_ensure_traversable(isset($context["languages"]) ? $context["languages"] : null);
             foreach ($context['_seq'] as $context["_key"] => $context["lang"]) {
                 // line 37
                 echo "                        <option value=\"";
                 echo twig_escape_filter($this->env, isset($context["lang"]) ? $context["lang"] : null, "html", null, true);
                 echo "\" class=\"lang_";
                 echo twig_escape_filter($this->env, isset($context["lang"]) ? $context["lang"] : null, "html", null, true);
                 echo "\">";
                 echo twig_escape_filter($this->env, gettext(isset($context["lang"]) ? $context["lang"] : null), "html", null, true);
                 echo "</option>\n                        ";
             }
             $_parent = $context['_parent'];
             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['lang'], $context['_parent'], $context['loop']);
             $context = array_intersect_key($context, $_parent) + $_parent;
             // line 39
             echo "                    </select>\n                </span>\n                ";
         }
         // line 42
         echo "            </div>\n            <div class=\"userNav\">\n                <ul>\n                    <li class=\"loading\" style=\"display:none;\"><img src=\"images/loader.gif\" alt=\"\" /><span>";
         // line 45
         echo gettext("Loading ...");
         echo "</span></li>\n                    <li class=\"dd\"><span><i class=\"sprite-topnav sprite-topnav-register\" style=\"margin-right: 5px;\"></i>";
         // line 46
         echo gettext("New");
         echo "</span>\n                        ";
         // line 47
         $this->env->loadTemplate("partial_menu_top.phtml")->display($context);
         // line 48
         echo "                    </li>\n                    ";
         // line 49
         if ($this->getAttribute(isset($context["admin"]) ? $context["admin"] : null, "system_is_allowed", array(0 => array("mod" => "system")), "method")) {
             // line 50
             echo "                    <li class=\"dd\"><span><i class=\"sprite-topnav sprite-topnav-settings\" style=\"margin-right: 5px;\"></i>";
             echo gettext("Settings");
             echo "</span>\n                        <ul class=\"menu_body\">\n                            <li><a href=\"";
             // line 52
             echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("system");
             echo "\" title=\"\">";
             echo gettext("All settings");
             echo "</a></li>\n                            <li><a href=\"";
             // line 53
             echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("theme");
             echo "/";
             echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["guest"]) ? $context["guest"] : null, "extension_theme"), "code"), "html", null, true);
             echo "\" title=\"\">";
             echo gettext("Theme settings");
             echo "</a></li>\n                        </ul>\n                    </li>\n                    ";
         }
         // line 57
         echo "                    <li><a href=\"";
         echo $this->env->getExtension('bb')->twig_bb_client_link_filter("/");
         echo "\" title=\"\" target=\"_blank\"><span><i class=\"sprite-topnav sprite-topnav-mainWebsite\" style=\"margin-right: 5px;\"></i>";
         echo gettext("Visit site");
         echo "</span></a></li>\n                    <li><a href=\"";
         // line 58
         echo $this->env->getExtension('bb')->twig_bb_client_link_filter("api/admin/profile/logout");
         echo "\" title=\"\" class=\"api-link\" data-api-redirect=\"";
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("staff/login");
         echo "\"><span><i class=\"sprite-topnav sprite-topnav-logout\" style=\"margin-right: 5px;\"></i>";
         echo gettext("Logout");
         echo "</span></a></li>\n                </ul>\n            </div>\n            <div class=\"fix\"></div>\n        </div>\n    </div>\n</div>\n\n<div id=\"header\" class=\"wrapper\">\n    <div class=\"logo\"><a href=\"";
         // line 67
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("system");
         echo "\" title=\"\"><img src=\"";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["company"]) ? $context["company"] : null, "logo_url"), "html", null, true);
         echo "\" alt=\"";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["company"]) ? $context["company"] : null, "name"), "html", null, true);
         echo "\" style=\"max-height: 50px;\"/></a></div>\n    <div class=\"middleNav\">\n        \n    \t<ul>\n            ";
         // line 71
         if ($this->getAttribute(isset($context["admin"]) ? $context["admin"] : null, "system_is_allowed", array(0 => array("mod" => "notification")), "method") && $this->getAttribute(isset($context["guest"]) ? $context["guest"] : null, "extension_is_on", array(0 => array("mod" => "notification")), "method")) {
             // line 72
             echo "            ";
             $context["count_notifications"] = $this->getAttribute($this->getAttribute(isset($context["admin"]) ? $context["admin"] : null, "notification_get_list", array(0 => array("per_page" => 1)), "method"), "total");
             // line 73
             echo "        \t<li class=\"iMegaphone\"><a href=\"";
             echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("notification");
             echo "\" title=\"\"><span>";
             echo gettext("Notifications");
             echo "</span></a>";
             if (isset($context["count_notifications"]) ? $context["count_notifications"] : null) {
                 echo "<span class=\"numberMiddle\">";
                 echo twig_escape_filter($this->env, isset($context["count_notifications"]) ? $context["count_notifications"] : null, "html", null, true);
                 echo "</span>";
             }
             echo "</li>\n            ";
         }
         // line 75
         echo "            \n            ";
         // line 76
         if ($this->getAttribute(isset($context["admin"]) ? $context["admin"] : null, "system_is_allowed", array(0 => array("mod" => "order")), "method")) {
             // line 77
             echo "            ";
             $context["count_orders"] = $this->getAttribute($this->getAttribute(isset($context["admin"]) ? $context["admin"] : null, "order_get_statuses"), "failed_setup");
             // line 78
             echo "        \t<li class=\"iOrders\"><a href=\"";
             echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("order", array("status" => "failed_setup"));
             echo "\" title=\"\"><span><i class=\"sprite-23 sprite-23-basket2\"></i>";
             echo gettext("Orders");
             echo "</span></a>";
             if (isset($context["count_orders"]) ? $context["count_orders"] : null) {
                 echo "<span class=\"numberMiddle\">";
                 echo twig_escape_filter($this->env, isset($context["count_orders"]) ? $context["count_orders"] : null, "html", null, true);
                 echo "</span>";
             }
             echo "</li>\n            ";
         }
         // line 80
         echo "            \n            ";
         // line 81
         if ($this->getAttribute(isset($context["admin"]) ? $context["admin"] : null, "system_is_allowed", array(0 => array("mod" => "invoice")), "method")) {
             // line 82
             echo "            ";
             $context["count_invoices"] = $this->getAttribute($this->getAttribute(isset($context["admin"]) ? $context["admin"] : null, "invoice_get_statuses"), "unpaid");
             // line 83
             echo "        \t<li class=\"iInvoices\"><a href=\"";
             echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("invoice", array("status" => "unpaid"));
             echo "\" title=\"\"><span><i class=\"sprite-23 sprite-23-money\"></i>";
             echo gettext("Invoices");
             echo "</span></a>";
             if (isset($context["count_invoices"]) ? $context["count_invoices"] : null) {
                 echo "<span class=\"numberMiddle\">";
                 echo twig_escape_filter($this->env, isset($context["count_invoices"]) ? $context["count_invoices"] : null, "html", null, true);
                 echo "</span>";
             }
             echo "</li>\n            ";
         }
         // line 85
         echo "            \n            ";
         // line 86
         if ($this->getAttribute(isset($context["admin"]) ? $context["admin"] : null, "system_is_allowed", array(0 => array("mod" => "support")), "method")) {
             // line 87
             echo "            ";
             $context["count_tickets"] = $this->getAttribute($this->getAttribute(isset($context["admin"]) ? $context["admin"] : null, "support_ticket_get_statuses"), "open");
             // line 88
             echo "            ";
             $context["count_ptickets"] = $this->getAttribute($this->getAttribute(isset($context["admin"]) ? $context["admin"] : null, "support_public_ticket_get_statuses"), "open");
             // line 89
             echo "        \t<li class=\"iSpeech\"><a href=\"";
             echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("support/public-tickets", array("status" => "open"));
             echo "\" title=\"\"><span><i class=\"sprite-23 sprite-23-speech\"></i>";
             echo gettext("Inquiries");
             echo "</span></a>";
             if (isset($context["count_ptickets"]) ? $context["count_ptickets"] : null) {
                 echo "<span class=\"numberMiddle\">";
                 echo twig_escape_filter($this->env, isset($context["count_ptickets"]) ? $context["count_ptickets"] : null, "html", null, true);
                 echo "</span>";
             }
             echo "</li>\n        \t<li class=\"iMes\"><a href=\"";
             // line 90
             echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("support", array("status" => "open"));
             echo "\" title=\"\"><span><i class=\"sprite-23 sprite-23-dialog\"></i>";
             echo gettext("Tickets");
             echo "</span></a>";
             if (isset($context["count_tickets"]) ? $context["count_tickets"] : null) {
                 echo "<span class=\"numberMiddle\">";
                 echo twig_escape_filter($this->env, isset($context["count_tickets"]) ? $context["count_tickets"] : null, "html", null, true);
                 echo "</span>";
             }
             echo "</li>\n            ";
         }
         // line 92
         echo "            \n            ";
         // line 93
         if ($this->getAttribute(isset($context["admin"]) ? $context["admin"] : null, "system_is_allowed", array(0 => array("mod" => "client")), "method")) {
             // line 94
             echo "            <li><a href=\"";
             echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("client");
             echo "\" title=\"\"><span><i class=\"sprite-23 sprite-23-user\"></i>";
             echo gettext("Clients");
             echo "</span></a></li>\n            ";
         }
         // line 96
         echo "            \n        \t<li><a href=\"";
         // line 97
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("index");
         echo "\" title=\"\"><span><i class=\"sprite-23 sprite-23-home\"></i>";
         echo gettext("Dashboard");
         echo "</span></a></li>\n        </ul>\n    </div>\n    <div class=\"fix\"></div>\n</div>\n\n\n<div class=\"wrapper\">\n    \n    ";
         // line 106
         if (isset($context["hide_menu"]) ? $context["hide_menu"] : null) {
             // line 107
             echo "    \n    ";
             // line 108
             $this->displayBlock('content_wide', $context, $blocks);
             // line 109
             echo "    \n    ";
         } else {
             // line 111
             echo "    <div class=\"leftNav\">\n    ";
             // line 112
             $this->displayBlock('left_top', $context, $blocks);
             echo "    \n    ";
             // line 113
             $this->displayBlock('nav', $context, $blocks);
             // line 114
             echo "    ";
             $this->displayBlock('left_bottom', $context, $blocks);
             // line 115
             echo "    </div>\n    \n    ";
             // line 117
             $this->displayBlock('before_content', $context, $blocks);
             // line 118
             echo "    <div class=\"content\">\n\n        <div class=\"breadCrumbHolder module\">\n            <div class=\"breadCrumb module\">\n                ";
             // line 122
             $this->displayBlock('breadcrumbs', $context, $blocks);
             // line 128
             echo "            </div>\n        </div>\n\n        ";
             // line 131
             $this->displayBlock('top_content', $context, $blocks);
             // line 132
             echo "        ";
             $this->displayBlock('content', $context, $blocks);
             // line 133
             echo "    </div>\n    ";
         }
         // line 135
         echo "    <div class=\"fix\"></div>\n</div>\n\n<div id=\"footer\">\n\t<div class=\"wrapper\">\n        ";
         // line 140
         $this->env->loadTemplate("partial_footer.phtml")->display(array_merge($context, array("product" => isset($context["product"]) ? $context["product"] : null)));
         // line 141
         echo "    </div>\n</div>\n<div class=\"loading dim\"></div>    \n    ";
         // line 144
         $this->displayBlock('js', $context, $blocks);
         // line 145
         echo "    <noscript id=\"noscript\">\n        <div class=\"msg error\">\n        NOTE: Many features on BoxBilling require Javascript and cookies. You can enable both via your browser's preference settings.\n        </div>\n    </noscript>\n";
     }
     // line 151
     echo "</body>\n</html>";
 }
 public function block_content($context, array $blocks = array())
 {
     // line 113
     echo "\n\n<div class=\"widget simpleTabs\">\n    <ul class=\"tabs\">\n        <li><a href=\"#tab-index\">";
     // line 117
     echo gettext("Invoices");
     echo "</a></li>\n        <li><a href=\"#tab-new\">";
     // line 118
     echo gettext("New Invoice");
     echo "</a></li>\n    </ul>\n\n    <div class=\"tabs_container\">\n        <div class=\"fix\"></div>\n        <div class=\"tab_content nopadding\" id=\"tab-index\">\n\n            ";
     // line 125
     echo $context["mf"]->gettable_search();
     echo "\n            <table class=\"tableStatic wide\">\n                <thead>\n                    <tr>\n                        <td style=\"width: 2%\"><input type=\"checkbox\" class=\"batch-delete-master-checkbox\"/></td>\n                        <td colspan=\"3\">";
     // line 130
     echo gettext("Invoice");
     echo "</td>\n                        <td>";
     // line 131
     echo gettext("Amount");
     echo "</td>\n                        <td>";
     // line 132
     echo gettext("Issued at");
     echo "</td>\n                        <td>";
     // line 133
     echo gettext("Paid at");
     echo "</td>\n                        <td>";
     // line 134
     echo gettext("Status");
     echo "</td>\n                        <td width=\"13%\">&nbsp;</td>\n                    </tr>\n                </thead>\n                <tbody>\n                    ";
     // line 139
     $context["invoices"] = $this->getAttribute(isset($context["admin"]) ? $context["admin"] : null, "invoice_get_list", array(0 => twig_array_merge(array("per_page" => 30, "page" => $this->getAttribute(isset($context["request"]) ? $context["request"] : null, "page")), isset($context["request"]) ? $context["request"] : null)), "method");
     // line 140
     echo "                    ";
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["invoices"]) ? $context["invoices"] : null, "list"));
     $context['_iterated'] = false;
     foreach ($context['_seq'] as $context["_key"] => $context["invoice"]) {
         // line 141
         echo "                    <tr>\n                        <td><input type=\"checkbox\" class=\"batch-delete-checkbox\" data-item-id=\"";
         // line 142
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "id"), "html", null, true);
         echo "\"/></td>\n                        <td style=\"width:5%;\"><img src=\"";
         // line 143
         echo twig_escape_filter($this->env, twig_gravatar_filter($this->getAttribute($this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "buyer"), "email")), "html", null, true);
         echo "?size=20\" alt=\"";
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "buyer"), "email"), "html", null, true);
         echo "\" title=\"";
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "buyer"), "first_name"), "html", null, true);
         echo " ";
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "buyer"), "last_name"), "html", null, true);
         echo "\"/></td>\n                        <td><a href=\"";
         // line 144
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("client");
         echo "/manage/";
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "client"), "id"), "html", null, true);
         echo "\">";
         echo twig_escape_filter($this->env, twig_truncate_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "client"), "first_name"), 1, null, "."), "html", null, true);
         echo " ";
         echo twig_escape_filter($this->env, twig_truncate_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "client"), "last_name"), 20), "html", null, true);
         echo "</a></td>\n                        <td style=\"width:15%;\" title=\"";
         // line 145
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "id"), "html", null, true);
         echo "\">";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "serie_nr"), "html", null, true);
         echo "</td>\n                        <td>";
         // line 146
         echo $context["mf"]->getcurrency_format($this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "total"), $this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "currency"));
         echo "</td>\n                        <td>";
         // line 147
         echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "created_at"), "Y-m-d"), "html", null, true);
         echo "</td>\n                        <td>";
         // line 148
         if ($this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "paid_at")) {
             echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "paid_at"), "Y-m-d"), "html", null, true);
         } else {
             echo "-";
         }
         echo "</td>\n                        <td>";
         // line 149
         echo $context["mf"]->getstatus_name($this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "status"));
         echo "</td>\n                        <td class=\"actions\">\n                            <a class=\"bb-button btn14\" href=\"";
         // line 151
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("/invoice/manage");
         echo "/";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "id"), "html", null, true);
         echo "\"><img src=\"images/icons/dark/pencil.png\" alt=\"\"></a>\n                            <a class=\"btn14 bb-rm-tr api-link\" href=\"";
         // line 152
         echo $this->env->getExtension('bb')->twig_bb_client_link_filter("api/admin/invoice/delete", array("id" => $this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "id")));
         echo "\" data-api-confirm=\"Are you sure?\" data-api-reload=\"1\"><img src=\"images/icons/dark/trash.png\" alt=\"\"></a>\n                        </td>\n                    </tr>\n                    ";
         $context['_iterated'] = true;
     }
     if (!$context['_iterated']) {
         // line 156
         echo "                    <tr>\n                        <td colspan=\"8\">";
         // line 157
         echo gettext("The list is empty");
         echo "</td>\n                    </tr>\n                    ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['invoice'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 160
     echo "                </tbody>\n            </table>\n\n            ";
     // line 163
     $this->env->loadTemplate("partial_batch_delete.phtml")->display(array_merge($context, array("action" => "admin/invoice/batch_delete")));
     // line 164
     echo "            ";
     $this->env->loadTemplate("partial_pagination.phtml")->display(array_merge($context, array("list" => isset($context["invoices"]) ? $context["invoices"] : null, "url" => "invoice")));
     // line 165
     echo "        </div>\n\n        <div class=\"tab_content nopadding\" id=\"tab-new\">\n            <form method=\"post\" action=\"";
     // line 168
     echo $this->env->getExtension('bb')->twig_bb_client_link_filter("api/admin/invoice/prepare");
     echo "\" class=\"mainForm api-form\" data-api-jsonp=\"onAfterInvoicePrepared\">\n                <fieldset>\n                    <div class=\"rowElem noborder\">\n                        <label>";
     // line 171
     echo gettext("Client");
     echo "</label>\n                        <div class=\"formRight\">\n                            <input type=\"text\" class=\"client_selector\" placeholder=\"";
     // line 173
     echo gettext("Start typing clients name, email or ID");
     echo "\"/>\n                            <input type=\"hidden\" name=\"client_id\" value=\"";
     // line 174
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["request"]) ? $context["request"] : null, "client_id"), "html", null, true);
     echo "\" class=\"client_id\"/>\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n\n                     <input type=\"submit\" value=\"";
     // line 179
     echo gettext("Prepare");
     echo "\" class=\"greyishBtn submitForm\" />\n                </fieldset>\n            </form>\n        </div>\n    </div>\n</div>\n\n";
 }
 public function block_content($context, array $blocks = array())
 {
     // line 108
     echo "\n<div class=\"widget simpleTabs\">\n    <ul class=\"tabs\">\n        <li><a href=\"#tab-index\">";
     // line 111
     echo gettext("Orders");
     echo "</a></li>\n        <li><a href=\"#tab-new\">";
     // line 112
     echo gettext("New order");
     echo "</a></li>\n    </ul>\n\n    <div class=\"tabs_container\">\n        <div class=\"fix\"></div>\n        <div class=\"tab_content nopadding\" id=\"tab-index\">\n        ";
     // line 118
     echo $context["mf"]->gettable_search();
     echo "\n        <table class=\"tableStatic wide\" style=\"table-layout: fixed\">\n            <thead>\n                <tr>\n                    <td style=\"width: 3%\"><input type=\"checkbox\" class=\"batch-delete-master-checkbox\"/></td>\n                    <td style=\"width: 5%\">";
     // line 123
     echo gettext("ID");
     echo "</td>\n                    <td width=\"13%\">";
     // line 124
     echo gettext("Client");
     echo "</td>\n                    <td width=\"45%\">";
     // line 125
     echo gettext("Title");
     echo "</td>\n                    <td style=\"width: 7%\">";
     // line 126
     echo gettext("Amount");
     echo "</td>\n                    <td>";
     // line 127
     echo gettext("Period");
     echo "</td>\n                    <td>";
     // line 128
     echo gettext("Status");
     echo "</td>\n                    <td style=\"width: 10%\">&nbsp;</td>\n                </tr>\n            </thead>\n\n            <tbody>\n                ";
     // line 134
     $context["orders"] = $this->getAttribute(isset($context["admin"]) ? $context["admin"] : null, "order_get_list", array(0 => twig_array_merge(array("per_page" => 30, "page" => $this->getAttribute(isset($context["request"]) ? $context["request"] : null, "page")), isset($context["request"]) ? $context["request"] : null)), "method");
     // line 135
     echo "                ";
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["orders"]) ? $context["orders"] : null, "list"));
     $context['_iterated'] = false;
     foreach ($context['_seq'] as $context["i"] => $context["order"]) {
         // line 136
         echo "                <tr>\n                    <td><input type=\"checkbox\" class=\"batch-delete-checkbox\" data-item-id=\"";
         // line 137
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["order"]) ? $context["order"] : null, "id"), "html", null, true);
         echo "\"/></td>\n                    <td>";
         // line 138
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["order"]) ? $context["order"] : null, "id"), "html", null, true);
         echo "</td>\n                    <td class=\"truncate\">\n                        <span style=\"float: left;\">\n                            <a href=\"";
         // line 141
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("client/manage");
         echo "/";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["order"]) ? $context["order"] : null, "client_id"), "html", null, true);
         echo "\"><img src=\"";
         echo twig_escape_filter($this->env, twig_gravatar_filter($this->getAttribute($this->getAttribute(isset($context["order"]) ? $context["order"] : null, "client"), "email")), "html", null, true);
         echo "?size=20\" alt=\"";
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["order"]) ? $context["order"] : null, "client"), "email"), "html", null, true);
         echo "\" /></a>\n                        </span>\n                        <span style=\"margin-left: 10px;\">\n                            <a href=\"";
         // line 144
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("client/manage");
         echo "/";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["order"]) ? $context["order"] : null, "client_id"), "html", null, true);
         echo "\">";
         echo twig_escape_filter($this->env, twig_truncate_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["order"]) ? $context["order"] : null, "client"), "first_name"), "1", null, "."), "html", null, true);
         echo " ";
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["order"]) ? $context["order"] : null, "client"), "last_name"), "html", null, true);
         echo "</a>\n                        </span>\n                    </td>\n                    <td class=\"truncate\">";
         // line 147
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["order"]) ? $context["order"] : null, "title"), "html", null, true);
         echo "</td>\n                    <td>";
         // line 148
         echo $context["mf"]->getcurrency_format($this->getAttribute(isset($context["order"]) ? $context["order"] : null, "total"), $this->getAttribute(isset($context["order"]) ? $context["order"] : null, "currency"));
         echo "</td>\n                    <td>";
         // line 149
         echo $context["mf"]->getperiod_name($this->getAttribute(isset($context["order"]) ? $context["order"] : null, "period"));
         echo "</td>\n                    <td>";
         // line 150
         echo $context["mf"]->getstatus_name($this->getAttribute(isset($context["order"]) ? $context["order"] : null, "status"));
         echo "</td>\n                    <td class=\"actions\">\n                        <a class=\"bb-button btn14\" href=\"";
         // line 152
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("/order/manage");
         echo "/";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["order"]) ? $context["order"] : null, "id"), "html", null, true);
         echo "\"><img src=\"images/icons/dark/pencil.png\" alt=\"\"></a>\n                        <a class=\"bb-button btn14 bb-rm-tr api-link\" data-api-confirm=\"Are you sure?\" href=\"";
         // line 153
         echo $this->env->getExtension('bb')->twig_bb_client_link_filter("api/admin/order/delete", array("id" => $this->getAttribute(isset($context["order"]) ? $context["order"] : null, "id")));
         echo "\" data-api-redirect=\"";
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("order");
         echo "\"><img src=\"images/icons/dark/trash.png\" alt=\"\"></a>\n                    </td>\n                </tr>\n                ";
         $context['_iterated'] = true;
     }
     if (!$context['_iterated']) {
         // line 157
         echo "                <tr>\n                    <td colspan=\"8\">";
         // line 158
         echo gettext("The list is empty");
         echo "</td>\n                </tr>\n                ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['i'], $context['order'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 161
     echo "            </tbody>\n        </table>\n        ";
     // line 163
     $this->env->loadTemplate("partial_pagination.phtml")->display(array_merge($context, array("list" => isset($context["orders"]) ? $context["orders"] : null, "url" => "order")));
     // line 164
     echo "        ";
     $this->env->loadTemplate("partial_batch_delete.phtml")->display(array_merge($context, array("action" => "admin/order/batch_delete")));
     // line 165
     echo "        </div>\n    </div>\n    \n    <div class=\"tab_content nopadding\" id=\"tab-new\">\n        <form method=\"post\" action=\"";
     // line 169
     echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("order/new");
     echo "\" class=\"mainForm\">\n            <fieldset>\n                <div class=\"rowElem noborder\">\n                    <label>";
     // line 172
     echo gettext("Client");
     echo "</label>\n                    <div class=\"formRight\">\n                        ";
     // line 174
     if (!$this->getAttribute(isset($context["request"]) ? $context["request"] : null, "client_id")) {
         // line 175
         echo "                        <input type=\"text\" id=\"client_selector\" placeholder=\"";
         echo gettext("Start typing clients name, email or ID");
         echo "\" required=\"required\"/>\n                        <input type=\"hidden\" name=\"client_id\" value=\"";
         // line 176
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["request"]) ? $context["request"] : null, "client_id"), "html", null, true);
         echo "\" id=\"client_id\"/>\n                        ";
     } else {
         // line 178
         echo "                            ";
         $context["client"] = $this->getAttribute(isset($context["admin"]) ? $context["admin"] : null, "client_get", array(0 => array("id" => $this->getAttribute(isset($context["request"]) ? $context["request"] : null, "client_id"))), "method");
         // line 179
         echo "                            ";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["client"]) ? $context["client"] : null, "first_name"), "html", null, true);
         echo " ";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["client"]) ? $context["client"] : null, "last_name"), "html", null, true);
         echo "\n                        ";
     }
     // line 181
     echo "                    </div>\n                    <div class=\"fix\"></div>\n                </div>\n                <div class=\"rowElem\">\n                    <label>";
     // line 185
     echo gettext("Product");
     echo ":</label>\n                    <div class=\"formRight\">\n                        ";
     // line 187
     echo $context["mf"]->getselectbox("product_id", $this->getAttribute(isset($context["admin"]) ? $context["admin"] : null, "product_get_pairs"), $this->getAttribute(isset($context["request"]) ? $context["request"] : null, "product_id"), 1);
     echo "\n                    </div>\n                    <div class=\"fix\"></div>\n                </div>\n                \n            <input type=\"submit\" value=\"";
     // line 192
     echo gettext("Continue");
     echo "\" class=\"greyishBtn submitForm\" />\n            ";
     // line 193
     if ($this->getAttribute(isset($context["request"]) ? $context["request"] : null, "client_id")) {
         // line 194
         echo "            <input type=\"hidden\" name=\"client_id\" value=\"";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["request"]) ? $context["request"] : null, "client_id"), "html", null, true);
         echo "\" />\n            ";
     }
     // line 196
     echo "            </fieldset>\n        </form>\n    </div>\n</div>\n\n";
 }
 public function block_body($context, array $blocks = array())
 {
     // line 47
     if (!(isset($context["client"]) ? $context["client"] : null)) {
         // line 48
         echo "<script type=\"text/javascript\">\$(function(){bb.redirect('";
         echo $this->env->getExtension('bb')->twig_bb_client_link_filter("login");
         echo "');});</script>\n";
     } else {
         // line 50
         $context["profile"] = $this->getAttribute(isset($context["client"]) ? $context["client"] : null, "client_get");
         // line 51
         $context["company"] = $this->getAttribute(isset($context["guest"]) ? $context["guest"] : null, "system_company");
         // line 52
         echo "\n<div id=\"wrapper\">\n    <header class=\"container\" id=\"header\">\n            ";
         // line 55
         if ($this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "show_page_header")) {
             // line 56
             echo "                <nav>\n                <ul class=\"f16\">\n                    ";
             // line 58
             $context["languages"] = $this->getAttribute(isset($context["guest"]) ? $context["guest"] : null, "extension_languages");
             // line 59
             echo "                    ";
             if (twig_length_filter($this->env, isset($context["languages"]) ? $context["languages"] : null) > 1) {
                 // line 60
                 echo "                    ";
                 $context["currentLang"] = $this->getAttribute(isset($context["guest"]) ? $context["guest"] : null, "system_locale");
                 // line 61
                 echo "                    ";
                 $context["countryCode"] = twig_slice($this->env, isset($context["currentLang"]) ? $context["currentLang"] : null, 3, 2);
                 // line 62
                 echo "                        <li>\n                            <div class=\"btn-group\">\n                                <a class=\"btn dropdown-toggle\" data-toggle=\"dropdown\" href=\"#\">\n                                    <span class=\"flag  ";
                 // line 65
                 echo twig_escape_filter($this->env, twig_lower_filter($this->env, isset($context["countryCode"]) ? $context["countryCode"] : null), "html", null, true);
                 echo "\"></span>\n                                    ";
                 // line 66
                 echo twig_escape_filter($this->env, isset($context["countryCode"]) ? $context["countryCode"] : null, "html", null, true);
                 echo "\n                                    <span class=\"caret\"></span>\n                                </a>\n                                <ul class=\"dropdown-menu\">\n                                    ";
                 // line 70
                 $context['_parent'] = (array) $context;
                 $context['_seq'] = twig_ensure_traversable(isset($context["languages"]) ? $context["languages"] : null);
                 foreach ($context['_seq'] as $context["_key"] => $context["lang"]) {
                     // line 71
                     echo "                                    ";
                     $context["countryCode"] = twig_slice($this->env, isset($context["lang"]) ? $context["lang"] : null, 3, 2);
                     // line 72
                     echo "                                    ";
                     if ((isset($context["lang"]) ? $context["lang"] : null) != (isset($context["currentLang"]) ? $context["currentLang"] : null)) {
                         // line 73
                         echo "                                            <li class=\"language_selector\" data-language-code=\"";
                         echo twig_escape_filter($this->env, isset($context["lang"]) ? $context["lang"] : null, "html", null, true);
                         echo "\"><a href=\"javascript:;\"> <span class=\"flag ";
                         echo twig_escape_filter($this->env, twig_lower_filter($this->env, isset($context["countryCode"]) ? $context["countryCode"] : null), "html", null, true);
                         echo "\"></span> ";
                         echo twig_escape_filter($this->env, gettext(isset($context["lang"]) ? $context["lang"] : null), "html", null, true);
                         echo "</a></li>\n                                        ";
                     }
                     // line 75
                     echo "                                    ";
                 }
                 $_parent = $context['_parent'];
                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['lang'], $context['_parent'], $context['loop']);
                 $context = array_intersect_key($context, $_parent) + $_parent;
                 // line 76
                 echo "                                </ul>\n                            </div>\n                        </li>\n\n                    ";
             }
             // line 81
             echo "\n                    ";
             // line 82
             if ($this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "top_menu_dashboard")) {
                 // line 83
                 echo "                    <li>\n                        <a href=\"";
                 // line 84
                 echo $this->env->getExtension('bb')->twig_bb_client_link_filter("");
                 echo "\" class=\"show-tip\" title=\"";
                 echo gettext("Dashboard");
                 echo "\">";
                 echo gettext("Dashboard");
                 echo "</a>\n                    </li>\n                    ";
             }
             // line 87
             echo "                    ";
             if ($this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "top_menu_order")) {
                 // line 88
                 echo "                    <li class=\"order-button\">\n                        <a href=\"#\" class=\"show-tip\" title=\"";
                 // line 89
                 echo gettext("Order");
                 echo "\">";
                 echo gettext("Order services");
                 echo "</a>\n                    </li>\n                    ";
             }
             // line 92
             echo "                    ";
             if ($this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "top_menu_profile")) {
                 // line 93
                 echo "                    <li>\n                        <a href=\"";
                 // line 94
                 echo $this->env->getExtension('bb')->twig_bb_client_link_filter("client/me");
                 echo "\" class=\"show-tip\" title=\"";
                 echo gettext("Profile");
                 echo "\">";
                 echo gettext("Profile");
                 echo "</a>\n                    </li>\n                    ";
             }
             // line 97
             echo "\n                    ";
             // line 98
             if ($this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "top_menu_signout")) {
                 // line 99
                 echo "                    <li>\n                        <a href=\"";
                 // line 100
                 echo $this->env->getExtension('bb')->twig_bb_client_link_filter("client/logout");
                 echo "\" class=\"show-tip\" title=\"";
                 echo gettext("Sign out");
                 echo "\">";
                 echo gettext("Sign out");
                 echo "</a>\n                    </li>\n                    ";
             }
             // line 103
             echo "                </ul>\n            </nav>\n\n            ";
             // line 106
             if ($this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "show_company_logo")) {
                 // line 107
                 echo "                ";
                 if ($this->getAttribute(isset($context["company"]) ? $context["company"] : null, "logo_url")) {
                     // line 108
                     echo "                    <h1>\n                        <a href=\"";
                     // line 109
                     echo $this->env->getExtension('bb')->twig_bb_client_link_filter("/");
                     echo "\">\n                            <img src=\"";
                     // line 110
                     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["company"]) ? $context["company"] : null, "logo_url"), "html", null, true);
                     echo "\" alt=\"";
                     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["company"]) ? $context["company"] : null, "name"), "html", null, true);
                     echo "\" title=\"";
                     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["company"]) ? $context["company"] : null, "name"), "html", null, true);
                     echo "\" style=\"max-height: 75px\"/>\n                        </a>\n                        <p></p>\n                    </h1>\n                ";
                 }
                 // line 115
                 echo "            ";
             }
             // line 116
             echo "\n            ";
             // line 117
             if ($this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "show_company_name")) {
                 // line 118
                 echo "            <p>";
                 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["company"]) ? $context["company"] : null, "name"), "html", null, true);
                 echo "</p>\n            ";
             }
             // line 120
             echo "        ";
         }
         // line 121
         echo "    </header>\n    <section class=\"container\" role=\"main\">\n        <div class=\"navigation-block\">\n\n            <div class=\"navbar\">\n                <a class=\"btn btn-navbar btn-block btn-large\" data-toggle=\"collapse\" data-target=\".nav-collapse\"><span class=\"awe-user\"></span> ";
         // line 126
         echo gettext("User profile");
         echo "</a>\n            </div>\n\n            <nav class=\"main-navigation nav-collapse collapse\" role=\"navigation\">\n                ";
         // line 130
         $this->env->loadTemplate("partial_menu.phtml")->display($context);
         // line 131
         echo "            </nav>\n\n            ";
         // line 133
         if ($this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "show_client_details")) {
             // line 134
             echo "            <section class=\"user-profile\">\n                <figure>\n                    <img alt=\"";
             // line 136
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["profile"]) ? $context["profile"] : null, "first_name"), "html", null, true);
             echo " ";
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["profile"]) ? $context["profile"] : null, "last_name"), "html", null, true);
             echo " gravatar\" src=\"";
             echo twig_escape_filter($this->env, twig_gravatar_filter($this->getAttribute(isset($context["profile"]) ? $context["profile"] : null, "email"), 60), "html", null, true);
             echo "\">\n                    <figcaption>\n                        <strong><a href=\"";
             // line 138
             echo $this->env->getExtension('bb')->twig_bb_client_link_filter("client/profile");
             echo "\" class=\"\">";
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["profile"]) ? $context["profile"] : null, "first_name"), "html", null, true);
             echo " ";
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["profile"]) ? $context["profile"] : null, "last_name"), "html", null, true);
             echo "</a></strong>\n                        <em>";
             // line 139
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["profile"]) ? $context["profile"] : null, "company"), "html", null, true);
             echo "</em>\n                        <ul>\n                            <li><a class=\"btn btn-primary btn-flat\" href=\"";
             // line 141
             echo $this->env->getExtension('bb')->twig_bb_client_link_filter("client/profile");
             echo "\">";
             echo gettext("profile");
             echo "</a></li>\n                            <li><a class=\"btn btn-primary btn-flat\" href=\"";
             // line 142
             echo $this->env->getExtension('bb')->twig_bb_client_link_filter("client/logout");
             echo "\">";
             echo gettext("sign out");
             echo "</a></li>\n                        </ul>\n                    </figcaption>\n                </figure>\n            </section>\n            ";
         }
         // line 148
         echo "\n            ";
         // line 149
         if ($this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "sidebar_balance_enabled")) {
             // line 150
             echo "            <section class=\"balance\">\n                <h2>";
             // line 151
             echo gettext("Account balance");
             echo "</h2>\n                <strong>";
             // line 152
             echo twig_money($this->env, $this->getAttribute(isset($context["profile"]) ? $context["profile"] : null, "balance"), $this->getAttribute(isset($context["profile"]) ? $context["profile"] : null, "currency"));
             echo "</strong>\n            </section>\n            ";
         }
         // line 155
         echo "\n            ";
         // line 156
         if ($this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "sidebar_note_enabled")) {
             // line 157
             echo "            <section class=\"side-note\">\n                <div class=\"side-note-container\">\n                    <h2>";
             // line 159
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "sidebar_note_title"), "html", null, true);
             echo "</h2>\n                    <p>";
             // line 160
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "sidebar_note_content"), "html", null, true);
             echo "</p>\n                </div>\n                <div class=\"side-note-bottom\"></div>\n            </section>\n            ";
         }
         // line 165
         echo "        </div>\n\n        <div class=\"content-block\" role=\"main\">\n\n            ";
         // line 169
         if ($this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "show_breadcrumb")) {
             // line 170
             echo "            ";
             $this->displayBlock('breadcrumbs', $context, $blocks);
             // line 178
             echo "            ";
         }
         // line 179
         echo "\n            ";
         // line 180
         if ($this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "show_page_header")) {
             // line 181
             echo "            ";
             // line 187
             echo "            ";
         }
         // line 188
         echo "\n            ";
         // line 189
         $this->env->loadTemplate("partial_message.phtml")->display($context);
         // line 190
         echo "\n            ";
         // line 191
         $this->displayBlock('content_before', $context, $blocks);
         // line 192
         echo "            ";
         $this->displayBlock('content', $context, $blocks);
         // line 193
         echo "            ";
         $this->displayBlock('content_after', $context, $blocks);
         // line 194
         echo "        </div>\n    </section>\n    <div id=\"push\"></div>\n</div>\n\n";
         // line 199
         if ($this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_enabled")) {
             // line 200
             echo "<footer id=\"footer\" class=\"container\">\n    <p>&copy; ";
             // line 201
             echo twig_escape_filter($this->env, twig_date_format_filter($this->env, isset($context["now"]) ? $context["now"] : null, "Y"), "html", null, true);
             echo " ";
             echo $this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_signature", array(), "any", true, true) ? _twig_default_filter($this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_signature"), $this->getAttribute(isset($context["company"]) ? $context["company"] : null, "signature")) : $this->getAttribute(isset($context["company"]) ? $context["company"] : null, "signature");
             echo "</p>\n    <ul>\n        ";
             // line 203
             if ($this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_1_enabled")) {
                 // line 204
                 echo "        <li>\n            ";
                 // line 205
                 if (twig_in_filter("http://", $this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_1_page")) || twig_in_filter("https://", $this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_1_page"))) {
                     // line 206
                     echo "            <a href=\"";
                     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_1_page"), "html", null, true);
                     echo "\">";
                     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_1_title"), "html", null, true);
                     echo "</a>\n            ";
                 } else {
                     // line 208
                     echo "            <a href=\"";
                     echo $this->env->getExtension('bb')->twig_bb_client_link_filter($this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_1_page"));
                     echo "\">";
                     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_1_title"), "html", null, true);
                     echo "</a>\n            ";
                 }
                 // line 210
                 echo "        </li>\n        ";
             }
             // line 212
             echo "        ";
             if ($this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_2_enabled")) {
                 // line 213
                 echo "        <li>\n            ";
                 // line 214
                 if (twig_in_filter("http://", $this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_2_page")) || twig_in_filter("https://", $this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_2_page"))) {
                     // line 215
                     echo "            <a href=\"";
                     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_2_page"), "html", null, true);
                     echo "\">";
                     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_2_title"), "html", null, true);
                     echo "</a>\n            ";
                 } else {
                     // line 217
                     echo "            <a href=\"";
                     echo $this->env->getExtension('bb')->twig_bb_client_link_filter($this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_2_page"));
                     echo "\">";
                     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_2_title"), "html", null, true);
                     echo "</a>\n            ";
                 }
                 // line 219
                 echo "        </li>\n        ";
             }
             // line 221
             echo "        ";
             if ($this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_3_enabled")) {
                 // line 222
                 echo "        <li>\n            ";
                 // line 223
                 if (twig_in_filter("http://", $this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_3_page")) || twig_in_filter("https://", $this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_3_page"))) {
                     // line 224
                     echo "            <a href=\"";
                     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_3_page"), "html", null, true);
                     echo "\">";
                     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_3_title"), "html", null, true);
                     echo "</a>\n            ";
                 } else {
                     // line 226
                     echo "            <a href=\"";
                     echo $this->env->getExtension('bb')->twig_bb_client_link_filter($this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_3_page"));
                     echo "\">";
                     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_3_title"), "html", null, true);
                     echo "</a>\n\n            ";
                 }
                 // line 229
                 echo "        </li>\n        ";
             }
             // line 231
             echo "        ";
             if ($this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_4_enabled")) {
                 // line 232
                 echo "        <li>\n            ";
                 // line 233
                 if (twig_in_filter("http://", $this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_4_page")) || twig_in_filter("https://", $this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_4_page"))) {
                     // line 234
                     echo "            <a href=\"";
                     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_4_page"), "html", null, true);
                     echo "\">";
                     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_4_title"), "html", null, true);
                     echo "</a>\n            ";
                 } else {
                     // line 236
                     echo "            <a href=\"";
                     echo $this->env->getExtension('bb')->twig_bb_client_link_filter($this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_4_page"));
                     echo "\">";
                     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_4_title"), "html", null, true);
                     echo "</a>\n            ";
                 }
                 // line 238
                 echo "        </li>\n        ";
             }
             // line 240
             echo "        ";
             if ($this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_5_enabled")) {
                 // line 241
                 echo "        <li>\n            ";
                 // line 242
                 if (twig_in_filter("http://", $this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_5_page")) || twig_in_filter("https://", $this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_5_page"))) {
                     // line 243
                     echo "            <a href=\"";
                     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_5_page"), "html", null, true);
                     echo "\">";
                     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_5_title"), "html", null, true);
                     echo "</a>\n            ";
                 } else {
                     // line 245
                     echo "            <a href=\"";
                     echo $this->env->getExtension('bb')->twig_bb_client_link_filter($this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_5_page"));
                     echo "\">";
                     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_link_5_title"), "html", null, true);
                     echo "</a>\n            ";
                 }
                 // line 247
                 echo "        </li>\n        ";
             }
             // line 249
             echo "\n        ";
             // line 251
             echo "        ";
             if ($this->getAttribute(isset($context["guest"]) ? $context["guest"] : null, "extension_is_on", array(0 => array("mod" => "branding")), "method")) {
                 // line 252
                 echo "        <li>\n            <a href=\"http://www.boxbilling.com\" title=\"Billing Software\" target=\"_blank\">";
                 // line 253
                 echo gettext("Powered by BoxBilling");
                 echo "</a>\n        </li>\n        ";
             }
             // line 256
             echo "    </ul>\n    ";
             // line 257
             if ($this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "footer_to_top_enabled")) {
                 // line 258
                 echo "    <a href=\"#top\" class=\"btn btn-primary btn-flat pull-right\"><span class=\"awe-arrow-up\"></span> ";
                 echo gettext("Top");
                 echo "</a>\n    ";
             }
             // line 260
             echo "</footer>\n";
         }
         // line 262
         echo "\n<div class=\"wait\" style=\"display:none\" onclick=\"\$(this).hide();\">\n    <div class=\"popup_block\" style=\"position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: black; opacity: 0.5; -webkit-opacity: 0.5; -moz-opacity: 0.5; filter :  alpha(opacity=50); z-index: 2000\">\n        <img src=\"";
         // line 265
         echo twig_asset_url($this->env, "img/loader.gif");
         echo "\" style=\"position: absolute; display: block; margin-left: auto; margin-right: auto; position: relative; top: 50%; opacity: 1; filter: alpha(opacity=100); z-index: 1003\">\n    </div>\n</div>\n<noscript>NOTE: Many features on BoxBilling require Javascript and cookies. You can enable both via your browser's preference settings.</noscript>\n\n";
     }
 }
 public function block_content($context, array $blocks = array())
 {
     // line 99
     echo "<div class=\"widget simpleTabs\">\n\n    <ul class=\"tabs\">\n        <li><a href=\"#tab-index\">";
     // line 102
     echo gettext("Clients");
     echo "</a></li>\n        <li><a href=\"#tab-new\">";
     // line 103
     echo gettext("New client");
     echo "</a></li>\n        <li><a href=\"#tab-groups\">";
     // line 104
     echo gettext("Groups");
     echo "</a></li>\n        <li><a href=\"#tab-new-group\">";
     // line 105
     echo gettext("New group");
     echo "</a></li>\n    </ul>\n\n    <div class=\"tabs_container\">\n\n        <div class=\"fix\"></div>\n        <div class=\"tab_content nopadding\" id=\"tab-index\">\n            ";
     // line 112
     if (isset($context["mf"])) {
         $_mf_ = $context["mf"];
     } else {
         $_mf_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_mf_, "table_search"), "html", null, true);
     echo "\n            <table class=\"tableStatic wide\">\n                <thead>\n                    <tr>\n                        <td style=\"width: 2%\"><input type=\"checkbox\" class=\"batch-delete-master-checkbox\"/></td>\n                        <td colspan=\"2\">";
     // line 117
     echo gettext("Name");
     echo "</td>\n                        <td>";
     // line 118
     echo gettext("Company");
     echo "</td>\n                        <td width=\"30%\">";
     // line 119
     echo gettext("Email");
     echo "</td>\n                        <td>";
     // line 120
     echo gettext("Status");
     echo "</td>\n                        <td>";
     // line 121
     echo gettext("Date");
     echo "</td>\n                        <td width=\"13%\">&nbsp;</td>\n                    </tr>\n                </thead>\n\n                <tbody>\n                    ";
     // line 127
     if (isset($context["admin"])) {
         $_admin_ = $context["admin"];
     } else {
         $_admin_ = null;
     }
     if (isset($context["request"])) {
         $_request_ = $context["request"];
     } else {
         $_request_ = null;
     }
     $context["clients"] = $this->getAttribute($_admin_, "client_get_list", array(0 => twig_array_merge(array("per_page" => 30, "page" => $this->getAttribute($_request_, "page")), $_request_)), "method");
     // line 128
     echo "                    ";
     if (isset($context["clients"])) {
         $_clients_ = $context["clients"];
     } else {
         $_clients_ = null;
     }
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable($this->getAttribute($_clients_, "list"));
     $context['_iterated'] = false;
     foreach ($context['_seq'] as $context["_key"] => $context["client"]) {
         // line 129
         echo "                    <tr>\n                        <td><input type=\"checkbox\" class=\"batch-delete-checkbox\" data-item-id=\"";
         // line 130
         if (isset($context["client"])) {
             $_client_ = $context["client"];
         } else {
             $_client_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_client_, "id"), "html", null, true);
         echo "\"/></td>\n                        <td>\n                            <a href=\"";
         // line 132
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("client/manage");
         echo "/";
         if (isset($context["client"])) {
             $_client_ = $context["client"];
         } else {
             $_client_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_client_, "id"), "html", null, true);
         echo "\"><img src=\"";
         if (isset($context["client"])) {
             $_client_ = $context["client"];
         } else {
             $_client_ = null;
         }
         echo twig_escape_filter($this->env, twig_gravatar_filter($this->getAttribute($_client_, "email")), "html", null, true);
         echo "?size=20\" alt=\"";
         if (isset($context["client"])) {
             $_client_ = $context["client"];
         } else {
             $_client_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_client_, "id"), "html", null, true);
         echo "\" /></a>\n                        </td>\n                        <td>\n                            <span class=\"flag flag-";
         // line 135
         if (isset($context["client"])) {
             $_client_ = $context["client"];
         } else {
             $_client_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_client_, "country"), "html", null, true);
         echo "\" title=\"";
         if (isset($context["guest"])) {
             $_guest_ = $context["guest"];
         } else {
             $_guest_ = null;
         }
         if (isset($context["client"])) {
             $_client_ = $context["client"];
         } else {
             $_client_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($_guest_, "system_countries"), $this->getAttribute($_client_, "country"), array(), "array"), "html", null, true);
         echo "\"></span>\n                            <a href=\"";
         // line 136
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("client/manage");
         echo "/";
         if (isset($context["client"])) {
             $_client_ = $context["client"];
         } else {
             $_client_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_client_, "id"), "html", null, true);
         echo "\" title=\"";
         if (isset($context["client"])) {
             $_client_ = $context["client"];
         } else {
             $_client_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_client_, "first_name"), "html", null, true);
         echo " ";
         if (isset($context["client"])) {
             $_client_ = $context["client"];
         } else {
             $_client_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_client_, "last_name"), "html", null, true);
         echo "\">";
         if (isset($context["client"])) {
             $_client_ = $context["client"];
         } else {
             $_client_ = null;
         }
         echo twig_escape_filter($this->env, twig_truncate_filter($this->env, $this->getAttribute($_client_, "first_name"), "1", null, "."), "html", null, true);
         echo " ";
         if (isset($context["client"])) {
             $_client_ = $context["client"];
         } else {
             $_client_ = null;
         }
         echo twig_escape_filter($this->env, twig_truncate_filter($this->env, $this->getAttribute($_client_, "last_name"), 15), "html", null, true);
         echo "</a></td>\n                        <td><a href=\"";
         // line 137
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("client/manage");
         echo "/";
         if (isset($context["client"])) {
             $_client_ = $context["client"];
         } else {
             $_client_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_client_, "id"), "html", null, true);
         echo "\" title=\"";
         if (isset($context["client"])) {
             $_client_ = $context["client"];
         } else {
             $_client_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_client_, "company"), "html", null, true);
         echo "\">";
         if (isset($context["client"])) {
             $_client_ = $context["client"];
         } else {
             $_client_ = null;
         }
         echo twig_escape_filter($this->env, twig_truncate_filter($this->env, $this->getAttribute($_client_, "company", array(), "any", true, true) ? _twig_default_filter($this->getAttribute($_client_, "company"), "-") : "-", 30), "html", null, true);
         echo "</a></td>\n                        <td><a href=\"";
         // line 138
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("client/manage");
         echo "/";
         if (isset($context["client"])) {
             $_client_ = $context["client"];
         } else {
             $_client_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_client_, "id"), "html", null, true);
         echo "\" title=\"";
         if (isset($context["client"])) {
             $_client_ = $context["client"];
         } else {
             $_client_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_client_, "email"), "html", null, true);
         echo "\">";
         if (isset($context["client"])) {
             $_client_ = $context["client"];
         } else {
             $_client_ = null;
         }
         echo twig_escape_filter($this->env, twig_truncate_filter($this->env, $this->getAttribute($_client_, "email"), 30), "html", null, true);
         echo "</a></td>\n                        <td>";
         // line 139
         if (isset($context["mf"])) {
             $_mf_ = $context["mf"];
         } else {
             $_mf_ = null;
         }
         if (isset($context["client"])) {
             $_client_ = $context["client"];
         } else {
             $_client_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_mf_, "status_name", array(0 => $this->getAttribute($_client_, "status")), "method"), "html", null, true);
         echo "</td>\n                        <td>";
         // line 140
         if (isset($context["client"])) {
             $_client_ = $context["client"];
         } else {
             $_client_ = null;
         }
         echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute($_client_, "created_at"), "Y-m-d"), "html", null, true);
         echo "</td>\n                        <td>\n                            <a class=\"btn14 bb-rm-tr api-link\" href=\"";
         // line 142
         if (isset($context["client"])) {
             $_client_ = $context["client"];
         } else {
             $_client_ = null;
         }
         echo $this->env->getExtension('bb')->twig_bb_client_link_filter("api/admin/client/delete", array("id" => $this->getAttribute($_client_, "id")));
         echo "\" data-api-confirm=\"Are you sure?\" data-api-reload=\"1\"><img src=\"images/icons/dark/trash.png\" alt=\"\"></a>\n                            <a class=\"btn14\" href=\"";
         // line 143
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("client/manage");
         echo "/";
         if (isset($context["client"])) {
             $_client_ = $context["client"];
         } else {
             $_client_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_client_, "id"), "html", null, true);
         echo "\"><img src=\"images/icons/dark/pencil.png\" alt=\"\"></a>\n                        </td>\n                    </tr>\n                    ";
         $context['_iterated'] = true;
     }
     if (!$context['_iterated']) {
         // line 147
         echo "                    <tr>\n                        <td colspan=\"7\">";
         // line 148
         echo gettext("The list is empty");
         echo "</td>\n                    </tr>\n                    ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['client'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 151
     echo "                </tbody>\n            </table>\n\n            ";
     // line 154
     $this->env->loadTemplate("partial_batch_delete.phtml")->display(array_merge($context, array("action" => "admin/client/batch_delete")));
     // line 155
     echo "            ";
     if (isset($context["clients"])) {
         $_clients_ = $context["clients"];
     } else {
         $_clients_ = null;
     }
     $this->env->loadTemplate("partial_pagination.phtml")->display(array_merge($context, array("list" => $_clients_, "url" => "client")));
     // line 156
     echo "        </div>\n\n        <div class=\"fix\"></div>\n\n        <div class=\"tab_content nopadding\" id=\"tab-new\">\n\n            <form method=\"post\" action=\"";
     // line 162
     echo $this->env->getExtension('bb')->twig_bb_client_link_filter("api/admin/client/create");
     echo "\" class=\"mainForm api-form save\" data-api-redirect=\"";
     echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("client");
     echo "\">\n                <fieldset>\n                    <div class=\"rowElem noborder\">\n                        <label>";
     // line 165
     echo gettext("Status");
     echo ":</label>\n                        <div class=\"formRight noborder\">\n                            <input type=\"radio\" name=\"status\" value=\"active\" checked=\"checked\"/><label>";
     // line 167
     echo gettext("Active");
     echo "</label>\n                            <input type=\"radio\" name=\"status\" value=\"canceled\"/><label>";
     // line 168
     echo gettext("Canceled");
     echo "</label>\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n                    <div class=\"rowElem\">\n                        <label>";
     // line 173
     echo gettext("Group");
     echo ":</label>\n                        <div class=\"formRight\">\n                            ";
     // line 175
     if (isset($context["mf"])) {
         $_mf_ = $context["mf"];
     } else {
         $_mf_ = null;
     }
     if (isset($context["admin"])) {
         $_admin_ = $context["admin"];
     } else {
         $_admin_ = null;
     }
     if (isset($context["request"])) {
         $_request_ = $context["request"];
     } else {
         $_request_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_mf_, "selectbox", array(0 => "group_id", 1 => $this->getAttribute($_admin_, "client_group_get_pairs"), 2 => $this->getAttribute($_request_, "group_id"), 3 => 0, 4 => "Select group"), "method"), "html", null, true);
     echo "\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n                    <div class=\"rowElem\">\n                        <label>";
     // line 180
     echo gettext("Email");
     echo ":</label>\n                        <div class=\"formRight\">\n                            <input type=\"text\" name=\"email\" value=\"";
     // line 182
     if (isset($context["request"])) {
         $_request_ = $context["request"];
     } else {
         $_request_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_request_, "email"), "html", null, true);
     echo "\" required=\"required\"/>\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n                    <div class=\"rowElem\">\n                        <label>";
     // line 187
     echo gettext("Name");
     echo ":</label>\n                        <div class=\"formRight moreFields\">\n                            <ul>\n                                <li style=\"width: 200px\"><input type=\"text\" name=\"first_name\" value=\"";
     // line 190
     if (isset($context["request"])) {
         $_request_ = $context["request"];
     } else {
         $_request_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_request_, "first_name"), "html", null, true);
     echo "\" required=\"required\"/></li>\n                                <li class=\"sep\"></li>\n                                <li style=\"width: 200px\"><input type=\"text\" name=\"last_name\" value=\"";
     // line 192
     if (isset($context["request"])) {
         $_request_ = $context["request"];
     } else {
         $_request_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_request_, "last_name"), "html", null, true);
     echo "\"/></li>\n                            </ul>\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n                    <div class=\"rowElem\">\n                        <label>";
     // line 198
     echo gettext("Company");
     echo ":</label>\n                        <div class=\"formRight\">\n                            <input type=\"text\" name=\"company\" value=\"";
     // line 200
     if (isset($context["request"])) {
         $_request_ = $context["request"];
     } else {
         $_request_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_request_, "company"), "html", null, true);
     echo "\"/>\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n                    <div class=\"rowElem\">\n                        <label>";
     // line 205
     echo gettext("Address Line 1");
     echo ":</label>\n                        <div class=\"formRight\">\n                            <input type=\"text\" name=\"address_1\" value=\"";
     // line 207
     if (isset($context["request"])) {
         $_request_ = $context["request"];
     } else {
         $_request_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_request_, "address_1"), "html", null, true);
     echo "\"/>\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n                    <div class=\"rowElem\">\n                        <label>";
     // line 212
     echo gettext("Address Line 2");
     echo ":</label>\n                        <div class=\"formRight\">\n                            <input type=\"text\" name=\"address_2\" value=\"";
     // line 214
     if (isset($context["request"])) {
         $_request_ = $context["request"];
     } else {
         $_request_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_request_, "address_2"), "html", null, true);
     echo "\"/>\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n                    <div class=\"rowElem\">\n                        <label>";
     // line 219
     echo gettext("City");
     echo ":</label>\n                        <div class=\"formRight\">\n                            <input type=\"text\" name=\"city\" value=\"";
     // line 221
     if (isset($context["request"])) {
         $_request_ = $context["request"];
     } else {
         $_request_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_request_, "city"), "html", null, true);
     echo "\"/>\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n                    <div class=\"rowElem\">\n                        <label>";
     // line 226
     echo gettext("State");
     echo ":</label>\n                        <div class=\"formRight\">\n                            ";
     // line 229
     echo "                            <input type=\"text\" name=\"state\" value=\"";
     if (isset($context["request"])) {
         $_request_ = $context["request"];
     } else {
         $_request_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_request_, "state"), "html", null, true);
     echo "\" />\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n                    <div class=\"rowElem\">\n                        <label>";
     // line 234
     echo gettext("Country");
     echo ":</label>\n                        <div class=\"formRight\">\n                            ";
     // line 236
     if (isset($context["mf"])) {
         $_mf_ = $context["mf"];
     } else {
         $_mf_ = null;
     }
     if (isset($context["guest"])) {
         $_guest_ = $context["guest"];
     } else {
         $_guest_ = null;
     }
     if (isset($context["request"])) {
         $_request_ = $context["request"];
     } else {
         $_request_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_mf_, "selectbox", array(0 => "country", 1 => $this->getAttribute($_guest_, "system_countries"), 2 => $this->getAttribute($_request_, "country"), 3 => 0, 4 => "Select country"), "method"), "html", null, true);
     echo "\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n                    <div class=\"rowElem\">\n                        <label>";
     // line 241
     echo gettext("Postcode");
     echo ":</label>\n                        <div class=\"formRight\">\n                            <input type=\"text\" name=\"postcode\" value=\"";
     // line 243
     if (isset($context["request"])) {
         $_request_ = $context["request"];
     } else {
         $_request_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_request_, "postcode"), "html", null, true);
     echo "\"/>\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n                    <div class=\"rowElem\">\n                        <label>";
     // line 248
     echo gettext("Phone");
     echo ":</label>\n                        <div class=\"formRight moreFields\">\n                            <ul>\n                                <li><input type=\"text\" name=\"phone_cc\" value=\"";
     // line 251
     if (isset($context["request"])) {
         $_request_ = $context["request"];
     } else {
         $_request_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_request_, "phone_cc"), "html", null, true);
     echo "\"/></li>\n                                <li class=\"sep\"></li>\n                                <li style=\"width: 200px;\"><input type=\"text\" name=\"phone\" value=\"";
     // line 253
     if (isset($context["request"])) {
         $_request_ = $context["request"];
     } else {
         $_request_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_request_, "phone"), "html", null, true);
     echo "\"/></li>\n                            </ul>\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n\n                    <div class=\"rowElem\">\n                        <label>";
     // line 260
     echo gettext("Currency");
     echo ":</label>\n                        <div class=\"formRight\">\n                            ";
     // line 262
     if (isset($context["mf"])) {
         $_mf_ = $context["mf"];
     } else {
         $_mf_ = null;
     }
     if (isset($context["guest"])) {
         $_guest_ = $context["guest"];
     } else {
         $_guest_ = null;
     }
     if (isset($context["request"])) {
         $_request_ = $context["request"];
     } else {
         $_request_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_mf_, "selectbox", array(0 => "currency", 1 => $this->getAttribute($_guest_, "currency_get_pairs"), 2 => $this->getAttribute($_request_, "currency"), 3 => 0, 4 => "Select currency"), "method"), "html", null, true);
     echo "\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n\n                    <div class=\"rowElem\">\n                        <label>";
     // line 268
     echo gettext("Password");
     echo ":</label>\n                        <div class=\"formRight\">\n                            <input type=\"password\" name=\"password\" value=\"\" required=\"required\"/>\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n\n                    <input type=\"submit\" value=\"";
     // line 275
     echo gettext("Create");
     echo "\" class=\"greyishBtn submitForm\" />\n                </fieldset>\n            </form>\n        </div>\n\n        <div class=\"tab_content nopadding\" id=\"tab-groups\">\n            <table class=\"tableStatic wide\">\n                <thead>\n                    <tr>\n                        <td>";
     // line 284
     echo gettext("Title");
     echo "</td>\n                        <td width=\"13%\">";
     // line 285
     echo gettext("Actions");
     echo "</td>\n                    </tr>\n                </thead>\n\n                <tbody>\n                    ";
     // line 290
     if (isset($context["admin"])) {
         $_admin_ = $context["admin"];
     } else {
         $_admin_ = null;
     }
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable($this->getAttribute($_admin_, "client_group_get_pairs"));
     $context['_iterated'] = false;
     foreach ($context['_seq'] as $context["id"] => $context["group"]) {
         // line 291
         echo "                    <tr>\n                        <td>";
         // line 292
         if (isset($context["group"])) {
             $_group_ = $context["group"];
         } else {
             $_group_ = null;
         }
         echo twig_escape_filter($this->env, $_group_, "html", null, true);
         echo "</td>\n                        <td>\n                            <a class=\"btn14\" href=\"";
         // line 294
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("client/group");
         echo "/";
         if (isset($context["id"])) {
             $_id_ = $context["id"];
         } else {
             $_id_ = null;
         }
         echo twig_escape_filter($this->env, $_id_, "html", null, true);
         echo "\"><img src=\"images/icons/dark/pencil.png\" alt=\"\"></a>\n                            <a class=\"btn14 api-link bb-rm-tr\" data-api-reload=\"1\" data-api-confirm=\"Are you sure?\" href=\"";
         // line 295
         if (isset($context["id"])) {
             $_id_ = $context["id"];
         } else {
             $_id_ = null;
         }
         echo $this->env->getExtension('bb')->twig_bb_client_link_filter("api/admin/client/group_delete", array("id" => $_id_));
         echo "\"><img src=\"images/icons/dark/trash.png\" alt=\"\"></a>\n                        </td>\n                    </tr>\n                    ";
         $context['_iterated'] = true;
     }
     if (!$context['_iterated']) {
         // line 299
         echo "                    <tr>\n                        <td colspan=\"2\">";
         // line 300
         echo gettext("The list is empty");
         echo "</td>\n                    </tr>\n                    ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['id'], $context['group'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 303
     echo "                </tbody>\n            </table>\n        </div>\n\n\n        <div class=\"tab_content nopadding\" id=\"tab-new-group\">\n\n            <form method=\"post\" action=\"";
     // line 310
     echo $this->env->getExtension('bb')->twig_bb_client_link_filter("api/admin/client/group_create");
     echo "\" class=\"mainForm api-form save\" data-api-redirect=\"";
     echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("client");
     echo "\">\n                <fieldset>\n                    <div class=\"rowElem noborder\">\n                        <label>";
     // line 313
     echo gettext("Title");
     echo ":</label>\n                        <div class=\"formRight noborder\">\n                            <input type=\"text\" name=\"title\" value=\"";
     // line 315
     if (isset($context["request"])) {
         $_request_ = $context["request"];
     } else {
         $_request_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_request_, "title"), "html", null, true);
     echo "\" required=\"required\"/>\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n\n                    <input type=\"submit\" value=\"";
     // line 320
     echo gettext("Create");
     echo "\" class=\"greyishBtn submitForm\" />\n                </fieldset>\n            </form>\n        </div>\n\n    </div>\n</div>\n\n";
 }
 public function block_content($context, array $blocks = array())
 {
     // line 14
     echo "\n<div class=\"widget simpleTabs\">\n\n    <ul class=\"tabs\">\n        <li><a href=\"#tab-info\">";
     // line 18
     echo gettext("Profile");
     echo "</a></li>\n        <li><a href=\"#tab-profile\">";
     // line 19
     echo gettext("Edit");
     echo "</a></li>\n        <li><a href=\"#tab-orders\">";
     // line 20
     echo gettext("Orders");
     echo "</a></li>\n        <li><a href=\"#tab-invoice\">";
     // line 21
     echo gettext("Invoices");
     echo "</a></li>\n        <li><a href=\"#tab-support\">";
     // line 22
     echo gettext("Tickets");
     echo "</a></li>\n        <li><a href=\"#tab-balance\">";
     // line 23
     echo gettext("Payments");
     echo "</a></li>\n        <li><a href=\"#tab-history\">";
     // line 24
     echo gettext("Logins");
     echo "</a></li>\n        <li><a href=\"#tab-emails\">";
     // line 25
     echo gettext("Emails");
     echo "</a></li>\n        <li><a href=\"#tab-transactions\">";
     // line 26
     echo gettext("Transactions");
     echo "</a></li>\n    </ul>\n\n    <div class=\"tabs_container\">\n        <div class=\"fix\"></div>\n        <div class=\"tab_content nopadding\" id=\"tab-info\">\n\n            <div style=\"position: relative;\">\n            <img src=\"";
     // line 34
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, twig_gravatar_filter($this->getAttribute($_client_, "email")), "html", null, true);
     echo "?size=100\" alt=\"";
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "first_name"), "html", null, true);
     echo " ";
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "last_name"), "html", null, true);
     echo "\" style=\"right: 0; margin: 15px 15px 0 15px; position: absolute; border: 2px solid white; box-shadow: 0px 0px 10px 0px;\"/>\n            </div>\n            \n            <table class=\"tableStatic wide\">\n                <tbody>\n                    <tr class=\"noborder\">\n                        <td style=\"width: 15%\">ID:</td>\n                        <td>";
     // line 41
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "id"), "html", null, true);
     echo "</td>\n                    </tr>\n\n                    <tr>\n                        <td>Name:</td>\n                        <td><strong class=\"red\">";
     // line 46
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "first_name"), "html", null, true);
     echo " ";
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "last_name"), "html", null, true);
     echo "</strong></td>\n                    </tr>\n\n                    <tr>\n                        <td>Company:</td>\n                        <td><strong class=\"green\">";
     // line 51
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "company", array(), "any", true, true) ? _twig_default_filter($this->getAttribute($_client_, "company"), "-") : "-", "html", null, true);
     echo "</strong></td>\n                    </tr>\n                    <tr>\n                        <td>Email:</td>\n                        <td>";
     // line 55
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "email"), "html", null, true);
     echo "</td>\n                    </tr>\n                    <tr>\n                        <td>Status:</td>\n                        <td>";
     // line 59
     if (isset($context["mf"])) {
         $_mf_ = $context["mf"];
     } else {
         $_mf_ = null;
     }
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_mf_, "status_name", array(0 => $this->getAttribute($_client_, "status")), "method"), "html", null, true);
     echo "</td>\n                    </tr>\n                    <tr>\n                        <td>Group:</td>\n                        <td>";
     // line 63
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "group", array(), "any", true, true) ? _twig_default_filter($this->getAttribute($_client_, "group"), "-") : "-", "html", null, true);
     echo "</td>\n                    </tr>\n                    <tr>\n                        <td>Currency:</td>\n                        <td>";
     // line 67
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "currency", array(), "any", true, true) ? _twig_default_filter($this->getAttribute($_client_, "currency"), "-") : "-", "html", null, true);
     echo "</td>\n                    </tr>\n                    <tr>\n                        <td>IP:</td>\n                        <td>";
     // line 71
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "ip", array(), "any", true, true) ? _twig_default_filter($this->getAttribute($_client_, "ip"), "-") : "-", "html", null, true);
     echo " ";
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->env->getExtension('bb')->twig_ipcountryname_filter($this->getAttribute($_client_, "ip")), "html", null, true);
     echo "</td>\n                    </tr>\n                    <tr>\n                        <td>API Key:</td>\n                        <td>";
     // line 75
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "api_token", array(), "any", true, true) ? _twig_default_filter($this->getAttribute($_client_, "api_token"), "-") : "-", "html", null, true);
     echo "</td>\n                    </tr>\n                    <tr>\n                        <td>Address:</td>\n                        <td>\n                            <span class=\"flag flag-";
     // line 80
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "country"), "html", null, true);
     echo "\" title=\"";
     if (isset($context["guest"])) {
         $_guest_ = $context["guest"];
     } else {
         $_guest_ = null;
     }
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($_guest_, "system_countries"), $this->getAttribute($_client_, "country"), array(), "array"), "html", null, true);
     echo "\"></span>\n                            ";
     // line 81
     if (isset($context["guest"])) {
         $_guest_ = $context["guest"];
     } else {
         $_guest_ = null;
     }
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($_guest_, "system_countries"), $this->getAttribute($_client_, "country"), array(), "array"), "html", null, true);
     echo " ";
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "state"), "html", null, true);
     echo " ";
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "address_1"), "html", null, true);
     echo " ";
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "address_2"), "html", null, true);
     echo " ";
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "city"), "html", null, true);
     echo " ";
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "postcode"), "html", null, true);
     echo "\n                        </td>\n                    </tr>\n                    <tr>\n                        <td>Registered at:</td>\n                        <td>";
     // line 86
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute($_client_, "created_at"), "M d, Y"), "html", null, true);
     echo "</td>\n                    </tr>\n                </tbody>\n                <tfoot>\n                    <tr>\n                        <td colspan=\"2\">\n                            <a href=\"";
     // line 92
     echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("client/login");
     echo "/";
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "id"), "html", null, true);
     echo "\" class=\"btnIconLeft mr10 mt5\" target=\"_blank\"><img src=\"images/icons/dark/adminUser.png\" alt=\"\" class=\"icon\"><span>Login to client area</span></a>\n                            <a href=\"";
     // line 93
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo $this->env->getExtension('bb')->twig_bb_client_link_filter("api/admin/client/delete", array("id" => $this->getAttribute($_client_, "id")));
     echo "\" data-api-confirm=\"Are you sure?\" data-api-redirect=\"";
     echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("client");
     echo "\" class=\"btnIconLeft mr10 mt5 api-link\" ><img src=\"images/icons/dark/trash.png\" alt=\"\" class=\"icon\"><span>Delete</span></a>\n                        </td>\n                    </tr>\n                </tfoot>\n            </table>\n        </div>\n\n        <div class=\"tab_content nopadding\" id=\"tab-profile\">\n\n            <div class=\"help\">\n                <h3>";
     // line 103
     echo gettext("Client profile details");
     echo "</h3>\n            </div>\n\n            <form method=\"post\" action=\"";
     // line 106
     echo $this->env->getExtension('bb')->twig_bb_client_link_filter("api/admin/client/update");
     echo "\" class=\"mainForm api-form save\" data-api-msg=\"";
     echo gettext("Client Profile updated");
     echo "\">\n                <fieldset>\n                    <div class=\"rowElem noborder\">\n                        <label>";
     // line 109
     echo gettext("Status");
     echo ":</label>\n                        <div class=\"formRight noborder\">\n                            <input type=\"radio\" name=\"status\" value=\"active\"";
     // line 111
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     if ($this->getAttribute($_client_, "status") == "active") {
         echo " checked=\"checked\"";
     }
     echo "/><label>";
     echo gettext("Active");
     echo "</label>\n                            <input type=\"radio\" name=\"status\" value=\"suspended\"";
     // line 112
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     if ($this->getAttribute($_client_, "status") == "suspended") {
         echo " checked=\"checked\"";
     }
     echo " /><label>";
     echo gettext("Suspended");
     echo "</label>\n                            <input type=\"radio\" name=\"status\" value=\"canceled\"";
     // line 113
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     if ($this->getAttribute($_client_, "status") == "canceled") {
         echo " checked=\"checked\"";
     }
     echo " /><label>";
     echo gettext("Canceled");
     echo "</label>\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n                    <div class=\"rowElem\">\n                        <label>";
     // line 118
     echo gettext("Type");
     echo ":</label>\n                        <div class=\"formRight noborder\">\n                            <input type=\"radio\" name=\"type\" value=\"individual\"";
     // line 120
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     if ($this->getAttribute($_client_, "type") == "individual") {
         echo " checked=\"checked\"";
     }
     echo "/><label>";
     echo gettext("Individual");
     echo "</label>\n                            <input type=\"radio\" name=\"type\" value=\"company\"";
     // line 121
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     if ($this->getAttribute($_client_, "type") == "company") {
         echo " checked=\"checked\"";
     }
     echo " /><label>";
     echo gettext("Company");
     echo "</label>\n                            <input type=\"radio\" name=\"type\" value=\"\"";
     // line 122
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     if (!$this->getAttribute($_client_, "type")) {
         echo " checked=\"checked\"";
     }
     echo " /><label>";
     echo gettext("Other/Unknown");
     echo "</label>\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n\n                    <div class=\"rowElem\">\n                        <label>";
     // line 128
     echo gettext("Mail approved");
     echo ":</label>\n                        <div class=\"formRight noborder\">\n                            <input type=\"radio\" name=\"email_approved\" value=\"1\"";
     // line 130
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     if ($this->getAttribute($_client_, "email_approved") == 1) {
         echo " checked=\"checked\"";
     }
     echo "/><label>";
     echo gettext("Yes");
     echo "</label>\n                            <input type=\"radio\" name=\"email_approved\" value=\"0\"";
     // line 131
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     if ($this->getAttribute($_client_, "email_approved") != 1) {
         echo " checked=\"checked\"";
     }
     echo " /><label>";
     echo gettext("No");
     echo "</label>\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n\n\n\n                    <div class=\"rowElem\">\n                        <label>";
     // line 139
     echo gettext("Group");
     echo ":</label>\n                        <div class=\"formRight\">\n                            ";
     // line 141
     if (isset($context["mf"])) {
         $_mf_ = $context["mf"];
     } else {
         $_mf_ = null;
     }
     if (isset($context["admin"])) {
         $_admin_ = $context["admin"];
     } else {
         $_admin_ = null;
     }
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_mf_, "selectbox", array(0 => "group_id", 1 => $this->getAttribute($_admin_, "client_group_get_pairs"), 2 => $this->getAttribute($_client_, "group_id"), 3 => 0, 4 => "Select group"), "method"), "html", null, true);
     echo "\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n                    <div class=\"rowElem\">\n                        <label>";
     // line 146
     echo gettext("Email");
     echo ":</label>\n                        <div class=\"formRight\">\n                            <input type=\"text\" name=\"email\" value=\"";
     // line 148
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "email"), "html", null, true);
     echo "\" required=\"required\"/>\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n                    <div class=\"rowElem\">\n                        <label>";
     // line 153
     echo gettext("Name");
     echo ":</label>\n                        <div class=\"formRight moreFields\">\n                            <ul>\n                                <li style=\"width: 250px\"><input type=\"text\" name=\"first_name\" value=\"";
     // line 156
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "first_name"), "html", null, true);
     echo "\" required=\"required\"/></li>\n                                <li class=\"sep\"></li>\n                                <li style=\"width: 245px\"><input type=\"text\" name=\"last_name\" value=\"";
     // line 158
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "last_name"), "html", null, true);
     echo "\" /></li>\n                            </ul>\n                        </div> \n                        <div class=\"fix\"></div>\n                    </div>\n                    <div class=\"rowElem\">\n                        <label>";
     // line 164
     echo gettext("Date of birth");
     echo ":</label>\n                        <div class=\"formRight\">\n                            <input type=\"text\" name=\"birthday\" value=\"";
     // line 166
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "birthday"), "html", null, true);
     echo "\" />\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n                    <div class=\"rowElem\" id=\"company-details\">\n                        <label>";
     // line 171
     echo gettext("Company details");
     echo ":</label>\n                        <div class=\"formRight moreFields\">\n                            <ul>\n                                <li style=\"width: 170px\"><input type=\"text\" name=\"company\" value=\"";
     // line 174
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "company"), "html", null, true);
     echo "\" title=\"Company name\" placeholder=\"Company name\"/></li>\n                                <li class=\"sep\"></li>\n                                <li style=\"width: 150px\"><input type=\"text\" name=\"company_vat\" value=\"";
     // line 176
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "company_vat"), "html", null, true);
     echo "\" title=\"Company VAT number\" placeholder=\"Company VAT number\"/></li>\n                                <li class=\"sep\"></li>\n                                <li style=\"width: 150px\"><input type=\"text\" name=\"company_number\" value=\"";
     // line 178
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "company_number"), "html", null, true);
     echo "\"  title=\"Company number\" placeholder=\"Company number\"/></li>\n                                <li class=\"sep\"></li>\n                            </ul>\n                        </div> \n                        <div class=\"fix\"></div>\n                    </div>\n                    <input type=\"submit\" value=\"";
     // line 184
     echo gettext("Update");
     echo "\" class=\"greyishBtn submitForm\" />\n                </fieldset>\n                \n                <fieldset>\n                    <legend>";
     // line 188
     echo gettext("Address and contact details");
     echo "</legend>\n                    <div class=\"rowElem\">\n                        <label>";
     // line 190
     echo gettext("Address Line 1");
     echo ":</label>\n                        <div class=\"formRight\">\n                            <input type=\"text\" name=\"address_1\" value=\"";
     // line 192
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "address_1"), "html", null, true);
     echo "\" />\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n                    <div class=\"rowElem\">\n                        <label>";
     // line 197
     echo gettext("Address Line 2");
     echo ":</label>\n                        <div class=\"formRight\">\n                            <input type=\"text\" name=\"address_2\" value=\"";
     // line 199
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "address_2"), "html", null, true);
     echo "\" />\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n\n                    <div class=\"rowElem\">\n                        <label>";
     // line 205
     echo gettext("Country");
     echo ":</label>\n                        <div class=\"formRight\">\n                            ";
     // line 207
     if (isset($context["mf"])) {
         $_mf_ = $context["mf"];
     } else {
         $_mf_ = null;
     }
     if (isset($context["guest"])) {
         $_guest_ = $context["guest"];
     } else {
         $_guest_ = null;
     }
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_mf_, "selectbox", array(0 => "country", 1 => $this->getAttribute($_guest_, "system_countries"), 2 => $this->getAttribute($_client_, "country"), 3 => 0, 4 => "Select country"), "method"), "html", null, true);
     echo "\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n                    <div class=\"rowElem\">\n                        <label>";
     // line 212
     echo gettext("State");
     echo ":</label>\n                        <div class=\"formRight\">\n                            ";
     // line 215
     echo "                            <input type=\"text\" name=\"state\" value=\"";
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "state"), "html", null, true);
     echo "\" />\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n                    <div class=\"rowElem\">\n                        <label>";
     // line 220
     echo gettext("City");
     echo ":</label>\n                        <div class=\"formRight\">\n                            <input type=\"text\" name=\"city\" value=\"";
     // line 222
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "city"), "html", null, true);
     echo "\" />\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n                    <div class=\"rowElem\">\n                        <label>";
     // line 227
     echo gettext("Postcode");
     echo ":</label>\n                        <div class=\"formRight\">\n                            <input type=\"text\" name=\"postcode\" value=\"";
     // line 229
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "postcode"), "html", null, true);
     echo "\" />\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n                    <div class=\"rowElem\">\n                        <label>";
     // line 234
     echo gettext("Phone");
     echo ":</label>\n                        <div class=\"formRight moreFields\">\n                            <ul>\n                                <li><input type=\"text\" name=\"phone_cc\" value=\"";
     // line 237
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "phone_cc"), "html", null, true);
     echo "\" /></li>\n                                <li class=\"sep\"></li>\n                                <li style=\"width: 200px;\"><input type=\"text\" name=\"phone\" value=\"";
     // line 239
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "phone"), "html", null, true);
     echo "\" /></li>\n                            </ul>  \n                        </div> \n                        <div class=\"fix\"></div>   \n                    </div>\n                    <div class=\"rowElem\">\n                        <label>";
     // line 245
     echo gettext("Passport number");
     echo ":</label>\n                        <div class=\"formRight\">\n                            <input type=\"text\" name=\"document_nr\" value=\"";
     // line 247
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "document_nr"), "html", null, true);
     echo "\" />\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n                    <input type=\"submit\" value=\"";
     // line 251
     echo gettext("Update");
     echo "\" class=\"greyishBtn submitForm\" />\n                </fieldset>\n                \n                <fieldset>\n                    <legend>";
     // line 255
     echo gettext("Additional settings");
     echo "</legend>\n                    <div class=\"rowElem\">\n                        <label>";
     // line 257
     echo gettext("Alternative ID");
     echo ":</label>\n                        <div class=\"formRight\">\n                            <input type=\"text\" name=\"aid\" value=\"";
     // line 259
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "aid"), "html", null, true);
     echo "\" placeholder=\"";
     echo gettext("Used to identify client on foreign system. Usually used by importers");
     echo "\"/>\n                        </div> \n                        <div class=\"fix\"></div>   \n                    </div>\n                    \n                    <div class=\"rowElem\">\n                        <label>";
     // line 265
     echo gettext("Currency");
     echo ":</label>\n                        <div class=\"formRight\">\n                            ";
     // line 267
     if (isset($context["mf"])) {
         $_mf_ = $context["mf"];
     } else {
         $_mf_ = null;
     }
     if (isset($context["guest"])) {
         $_guest_ = $context["guest"];
     } else {
         $_guest_ = null;
     }
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_mf_, "selectbox", array(0 => "currency", 1 => $this->getAttribute($_guest_, "currency_get_pairs"), 2 => $this->getAttribute($_client_, "currency"), 3 => 0, 4 => "Select currency"), "method"), "html", null, true);
     echo "\n                        </div> \n                        <div class=\"fix\"></div>\n                    </div>\n                    \n                    <div class=\"rowElem\">\n                        <label>";
     // line 273
     echo gettext("Exempt from tax");
     echo ":</label>\n                        <div class=\"formRight\">\n                            <input type=\"radio\" name=\"tax_exempt\" value=\"1\"";
     // line 275
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     if ($this->getAttribute($_client_, "tax_exempt")) {
         echo " checked=\"checked\"";
     }
     echo "/><label>Yes</label>\n                            <input type=\"radio\" name=\"tax_exempt\" value=\"0\"";
     // line 276
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     if (!$this->getAttribute($_client_, "tax_exempt")) {
         echo " checked=\"checked\"";
     }
     echo " /><label>No</label>\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n                    <div class=\"rowElem\">\n                        <label>";
     // line 281
     echo gettext("Signed up time");
     echo ":</label>\n                        <div class=\"formRight\">\n                            <input type=\"text\" name=\"created_at\" value=\"";
     // line 283
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute($_client_, "created_at"), "Y-m-d"), "html", null, true);
     echo "\" />\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n                    <div class=\"rowElem\">\n                        <label>";
     // line 288
     echo gettext("Notes");
     echo ":</label>\n                        <div class=\"formRight\">\n                            <textarea name=\"notes\" cols=\"5\" rows=\"5\">";
     // line 290
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "notes"), "html", null, true);
     echo "</textarea>\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n                    <input type=\"submit\" value=\"";
     // line 294
     echo gettext("Update profile");
     echo "\" class=\"greyishBtn submitForm\" />\n                    <input type=\"hidden\" name=\"id\" value=\"";
     // line 295
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "id"), "html", null, true);
     echo "\"/>\n                </fieldset>\n            </form>\n            \n            <div class=\"help\">\n                <h3>";
     // line 300
     echo gettext("Change password");
     echo "</h3>\n            </div>\n            <form method=\"post\" action=\"";
     // line 302
     echo $this->env->getExtension('bb')->twig_bb_client_link_filter("api/admin/client/change_password");
     echo "\" class=\"mainForm api-form\" data-api-msg=\"";
     echo gettext("Password changed");
     echo "\">\n                <fieldset>\n                    <div class=\"rowElem noborder\">\n                        <label>";
     // line 305
     echo gettext("Password");
     echo "</label>\n                        <div class=\"formRight\">\n                            <input type=\"password\" name=\"password\" value=\"\" required=\"required\"/>\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n\n                    <div class=\"rowElem\">\n                        <label>";
     // line 313
     echo gettext("Password confirm");
     echo "</label>\n                        <div class=\"formRight\">\n                            <input type=\"password\" name=\"password_confirm\" value=\"\" required=\"required\"/>\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n\n                    <input type=\"submit\" value=\"";
     // line 320
     echo gettext("Change password");
     echo "\" class=\"greyishBtn submitForm\" />\n                    <input type=\"hidden\" name=\"id\" value=\"";
     // line 321
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "id"), "html", null, true);
     echo "\"/>\n                </fieldset>\n            </form>\n\n            <div class=\"help\">\n                <h3>";
     // line 326
     echo gettext("Custom fields");
     echo "</h3>\n                <p>";
     // line 327
     echo gettext("Use these fields to define custom client details");
     echo "</p>\n            </div>\n            \n            <form method=\"post\" action=\"";
     // line 330
     echo $this->env->getExtension('bb')->twig_bb_client_link_filter("api/admin/client/update");
     echo "\" class=\"mainForm api-form save\" data-api-msg=\"";
     echo gettext("Client Profile custom fields updated");
     echo "\">\n                <fieldset>\n                    ";
     // line 332
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(range(1, 10));
     $context['loop'] = array('parent' => $context['_parent'], 'index0' => 0, 'index' => 1, 'first' => true);
     if (is_array($context['_seq']) || is_object($context['_seq']) && $context['_seq'] instanceof Countable) {
         $length = count($context['_seq']);
         $context['loop']['revindex0'] = $length - 1;
         $context['loop']['revindex'] = $length;
         $context['loop']['length'] = $length;
         $context['loop']['last'] = 1 === $length;
     }
     foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
         // line 333
         echo "                    ";
         if (isset($context["i"])) {
             $_i_ = $context["i"];
         } else {
             $_i_ = null;
         }
         $context["fn"] = "custom_" . $_i_;
         // line 334
         echo "                    <div class=\"rowElem";
         if (isset($context["loop"])) {
             $_loop_ = $context["loop"];
         } else {
             $_loop_ = null;
         }
         if ($this->getAttribute($_loop_, "first")) {
             echo " noborder";
         }
         echo "\">\n                        <label>";
         // line 335
         echo gettext("Custom field");
         echo " ";
         if (isset($context["i"])) {
             $_i_ = $context["i"];
         } else {
             $_i_ = null;
         }
         echo twig_escape_filter($this->env, $_i_, "html", null, true);
         echo "</label>\n                        <div class=\"formRight\">\n                            <textarea name=\"custom_";
         // line 337
         if (isset($context["i"])) {
             $_i_ = $context["i"];
         } else {
             $_i_ = null;
         }
         echo twig_escape_filter($this->env, $_i_, "html", null, true);
         echo "\" cols=\"5\" rows=\"5\">";
         if (isset($context["client"])) {
             $_client_ = $context["client"];
         } else {
             $_client_ = null;
         }
         if (isset($context["fn"])) {
             $_fn_ = $context["fn"];
         } else {
             $_fn_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_client_, $_fn_, array(), "array"), "html", null, true);
         echo "</textarea>\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n                    ";
         ++$context['loop']['index0'];
         ++$context['loop']['index'];
         $context['loop']['first'] = false;
         if (isset($context['loop']['length'])) {
             --$context['loop']['revindex0'];
             --$context['loop']['revindex'];
             $context['loop']['last'] = 0 === $context['loop']['revindex0'];
         }
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 342
     echo "\n                    <input type=\"submit\" value=\"";
     // line 343
     echo gettext("Update");
     echo "\" class=\"greyishBtn submitForm\" />\n                    <input type=\"hidden\" name=\"id\" value=\"";
     // line 344
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "id"), "html", null, true);
     echo "\"/>\n                </fieldset>\n            </form>\n        </div>\n\n        <div class=\"tab_content nopadding\" id=\"tab-balance\">\n            <div class=\"help\">\n                <h3>";
     // line 351
     echo gettext("Client payments history");
     echo "</h3>\n            </div>\n\n            <table class=\"tableStatic wide\">\n                <thead>\n                    <tr>\n                        <th style=\"width: 15%\">";
     // line 357
     echo gettext("Amount");
     echo "</th>\n                        <th>";
     // line 358
     echo gettext("Description");
     echo "</th>\n                        <th style=\"width: 20%\">";
     // line 359
     echo gettext("Date");
     echo "</th>\n                        <th style=\"width: 5%\">&nbsp;</th>\n                    </tr>\n                </thead>\n\n                <tbody>\n                    ";
     // line 365
     if (isset($context["admin"])) {
         $_admin_ = $context["admin"];
     } else {
         $_admin_ = null;
     }
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     $context["transactions"] = $this->getAttribute($_admin_, "client_balance_get_list", array(0 => array("per_page" => 20, "client_id" => $this->getAttribute($_client_, "id"))), "method");
     // line 366
     echo "                    ";
     if (isset($context["transactions"])) {
         $_transactions_ = $context["transactions"];
     } else {
         $_transactions_ = null;
     }
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable($this->getAttribute($_transactions_, "list"));
     $context['_iterated'] = false;
     foreach ($context['_seq'] as $context["i"] => $context["tx"]) {
         // line 367
         echo "                    <tr>\n                        <td>";
         // line 368
         if (isset($context["mf"])) {
             $_mf_ = $context["mf"];
         } else {
             $_mf_ = null;
         }
         if (isset($context["tx"])) {
             $_tx_ = $context["tx"];
         } else {
             $_tx_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_mf_, "currency_format", array(0 => $this->getAttribute($_tx_, "amount"), 1 => $this->getAttribute($_tx_, "currency")), "method"), "html", null, true);
         echo "</td>\n                        <td>";
         // line 369
         if (isset($context["tx"])) {
             $_tx_ = $context["tx"];
         } else {
             $_tx_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_tx_, "description"), "html", null, true);
         echo "</td>\n                        <td>";
         // line 370
         if (isset($context["tx"])) {
             $_tx_ = $context["tx"];
         } else {
             $_tx_ = null;
         }
         echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute($_tx_, "created_at"), "Y-m-d H:i"), "html", null, true);
         echo "</td>\n                        <td>\n                            <a class=\"bb-button btn14 bb-rm-tr api-link\" data-api-confirm=\"Are you sure?\" href=\"";
         // line 372
         if (isset($context["tx"])) {
             $_tx_ = $context["tx"];
         } else {
             $_tx_ = null;
         }
         echo $this->env->getExtension('bb')->twig_bb_client_link_filter("api/admin/client/balance_delete", array("id" => $this->getAttribute($_tx_, "id")));
         echo "\"><img src=\"images/icons/dark/trash.png\" alt=\"\"></a>\n                        </td>\n                    </tr>\n                    ";
         $context['_iterated'] = true;
     }
     if (!$context['_iterated']) {
         // line 376
         echo "                    <tr>\n                        <td colspan=\"4\">";
         // line 377
         echo gettext("The list is empty");
         echo "</td>\n                    </tr>\n                    ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['i'], $context['tx'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 380
     echo "                </tbody>\n\n                <tfoot>\n                    <tr>\n                        <th class=\"currency\" colspan=\"4\">";
     // line 384
     echo gettext("Balance");
     echo ": ";
     if (isset($context["mf"])) {
         $_mf_ = $context["mf"];
     } else {
         $_mf_ = null;
     }
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_mf_, "currency_format", array(0 => $this->getAttribute($_client_, "balance"), 1 => $this->getAttribute($_client_, "currency")), "method"), "html", null, true);
     echo "</th>\n                    </tr>\n                </tfoot>\n            </table>\n            \n            <div class=\"help\">\n                <h3>";
     // line 390
     echo gettext("Add funds for client");
     echo "</h3>\n            </div>\n\n            <form method=\"post\" action=\"";
     // line 393
     echo $this->env->getExtension('bb')->twig_bb_client_link_filter("api/admin/client/balance_add_funds");
     echo "\" class=\"mainForm api-form save\" data-api-msg=\"";
     echo gettext("Funds added");
     echo "\">\n                <fieldset>\n                    <div class=\"rowElem noborder\">\n                        <label>";
     // line 396
     echo gettext("Amount");
     echo ":</label>\n                        <div class=\"formRight noborder\">\n                            <input type=\"text\" name=\"amount\" value=\"\" style=\"width: 100px;\" required=\"required\"/> ";
     // line 398
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "currency"), "html", null, true);
     echo "\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n                    \n                    <div class=\"rowElem\">\n                        <label>";
     // line 404
     echo gettext("Description");
     echo ":</label>\n                        <div class=\"formRight noborder\">\n                            <input type=\"text\" name=\"description\" value=\"\"  required=\"required\"/>\n                        </div>\n                        <div class=\"fix\"></div>\n                    </div>\n\n                    <input type=\"submit\" value=\"";
     // line 411
     echo gettext("Add funds");
     echo "\" class=\"greyishBtn submitForm\" />\n                    <input type=\"hidden\" name=\"id\" value=\"";
     // line 412
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo twig_escape_filter($this->env, $this->getAttribute($_client_, "id"), "html", null, true);
     echo "\"/>\n                </fieldset>\n            </form>\n        </div>\n\n        <div class=\"tab_content nopadding\" id=\"tab-orders\">\n            <div class=\"help\">\n                <h3>";
     // line 419
     echo gettext("Client orders");
     echo "</h3>\n            </div>\n\n            <table class=\"tableStatic wide\">\n                <thead>\n                    <tr>\n                        <td>ID</td>\n                        <td width=\"40%\">Title</td>\n                        <td width=\"20%\">Amount</td>\n                        <td width=\"20%\">Period</td>\n                        <td width=\"20%\">Status</td>\n                        <td>&nbsp;</td>\n                    </tr>\n                </thead>\n                <tbody>\n                    ";
     // line 434
     if (isset($context["admin"])) {
         $_admin_ = $context["admin"];
     } else {
         $_admin_ = null;
     }
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     $context["orders"] = $this->getAttribute($_admin_, "order_get_list", array(0 => array("per_page" => "20", "client_id" => $this->getAttribute($_client_, "id"))), "method");
     // line 435
     echo "                    ";
     if (isset($context["orders"])) {
         $_orders_ = $context["orders"];
     } else {
         $_orders_ = null;
     }
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable($this->getAttribute($_orders_, "list"));
     $context['_iterated'] = false;
     foreach ($context['_seq'] as $context["_key"] => $context["order"]) {
         // line 436
         echo "                    <tr>\n                        <td>";
         // line 437
         if (isset($context["order"])) {
             $_order_ = $context["order"];
         } else {
             $_order_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_order_, "id"), "html", null, true);
         echo "</td>\n                        <td>";
         // line 438
         if (isset($context["order"])) {
             $_order_ = $context["order"];
         } else {
             $_order_ = null;
         }
         echo twig_escape_filter($this->env, twig_truncate_filter($this->env, $this->getAttribute($_order_, "title"), 30), "html", null, true);
         echo "</td>\n                        <td>";
         // line 439
         if (isset($context["mf"])) {
             $_mf_ = $context["mf"];
         } else {
             $_mf_ = null;
         }
         if (isset($context["order"])) {
             $_order_ = $context["order"];
         } else {
             $_order_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_mf_, "currency_format", array(0 => $this->getAttribute($_order_, "total"), 1 => $this->getAttribute($_order_, "currency")), "method"), "html", null, true);
         echo "</td>\n                        <td>";
         // line 440
         if (isset($context["mf"])) {
             $_mf_ = $context["mf"];
         } else {
             $_mf_ = null;
         }
         if (isset($context["order"])) {
             $_order_ = $context["order"];
         } else {
             $_order_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_mf_, "period_name", array(0 => $this->getAttribute($_order_, "period")), "method"), "html", null, true);
         echo "</td>\n                        <td>";
         // line 441
         if (isset($context["mf"])) {
             $_mf_ = $context["mf"];
         } else {
             $_mf_ = null;
         }
         if (isset($context["order"])) {
             $_order_ = $context["order"];
         } else {
             $_order_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_mf_, "status_name", array(0 => $this->getAttribute($_order_, "status")), "method"), "html", null, true);
         echo "</td>\n                        <td class=\"actions\"><a class=\"bb-button btn14\" href=\"";
         // line 442
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("/order/manage");
         echo "/";
         if (isset($context["order"])) {
             $_order_ = $context["order"];
         } else {
             $_order_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_order_, "id"), "html", null, true);
         echo "\"><img src=\"images/icons/dark/pencil.png\" alt=\"\"></a></td>\n                    </tr>\n                    ";
         $context['_iterated'] = true;
     }
     if (!$context['_iterated']) {
         // line 445
         echo "                    <tr>\n                        <td colspan=\"6\">";
         // line 446
         echo gettext("The list is empty");
         echo "</td>\n                    </tr>\n                    ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['order'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 449
     echo "                </tbody>\n                \n                <tfoot>\n                    <tr>\n                        <td colspan=\"6\">\n                            <a href=\"";
     // line 454
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("order", array("client_id" => $this->getAttribute($_client_, "id")));
     echo "#tab-new\" class=\"btnIconLeft mr10 mt5\"><img src=\"images/icons/dark/money.png\" alt=\"\" class=\"icon\"><span>New order</span></a>\n                        </td>\n                    </tr>\n                </tfoot>\n            </table>\n        </div>\n\n        <div class=\"tab_content nopadding\" id=\"tab-invoice\">\n            <div class=\"help\">\n                <h3>";
     // line 463
     echo gettext("Client invoices");
     echo "</h3>\n            </div>\n\n            <table class=\"tableStatic wide\">\n                <thead>\n                    <tr>\n                        <td>#</td>\n                        <td width=\"15%\">Amount</td>\n                        <td width=\"30%\">Issued at</td>\n                        <td width=\"30%\">Paid at</td>\n                        <td width=\"15%\">Status</td>\n                        <td>&nbsp;</td>\n                    </tr>\n                </thead>\n                <tbody>\n                    ";
     // line 478
     if (isset($context["admin"])) {
         $_admin_ = $context["admin"];
     } else {
         $_admin_ = null;
     }
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     $context["invoices"] = $this->getAttribute($_admin_, "invoice_get_list", array(0 => array("per_page" => "100", "client_id" => $this->getAttribute($_client_, "id"))), "method");
     // line 479
     echo "                    ";
     if (isset($context["invoices"])) {
         $_invoices_ = $context["invoices"];
     } else {
         $_invoices_ = null;
     }
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable($this->getAttribute($_invoices_, "list"));
     $context['_iterated'] = false;
     foreach ($context['_seq'] as $context["_key"] => $context["invoice"]) {
         // line 480
         echo "                    <tr>\n                        <td>";
         // line 481
         if (isset($context["invoice"])) {
             $_invoice_ = $context["invoice"];
         } else {
             $_invoice_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_invoice_, "serie_nr"), "html", null, true);
         echo "</td>\n                        <td>";
         // line 482
         if (isset($context["mf"])) {
             $_mf_ = $context["mf"];
         } else {
             $_mf_ = null;
         }
         if (isset($context["invoice"])) {
             $_invoice_ = $context["invoice"];
         } else {
             $_invoice_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_mf_, "currency_format", array(0 => $this->getAttribute($_invoice_, "total"), 1 => $this->getAttribute($_invoice_, "currency")), "method"), "html", null, true);
         echo "</td>\n                        <td>";
         // line 483
         if (isset($context["invoice"])) {
             $_invoice_ = $context["invoice"];
         } else {
             $_invoice_ = null;
         }
         echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute($_invoice_, "created_at"), "Y-m-d"), "html", null, true);
         echo "</td>\n                        <td>";
         // line 484
         if (isset($context["invoice"])) {
             $_invoice_ = $context["invoice"];
         } else {
             $_invoice_ = null;
         }
         if ($this->getAttribute($_invoice_, "paid_at")) {
             if (isset($context["invoice"])) {
                 $_invoice_ = $context["invoice"];
             } else {
                 $_invoice_ = null;
             }
             echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute($_invoice_, "paid_at"), "Y-m-d"), "html", null, true);
         } else {
             echo "-";
         }
         echo "</td>\n                        <td>";
         // line 485
         if (isset($context["mf"])) {
             $_mf_ = $context["mf"];
         } else {
             $_mf_ = null;
         }
         if (isset($context["invoice"])) {
             $_invoice_ = $context["invoice"];
         } else {
             $_invoice_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_mf_, "status_name", array(0 => $this->getAttribute($_invoice_, "status")), "method"), "html", null, true);
         echo "</td>\n                        <td class=\"actions\"><a class=\"bb-button btn14\" href=\"";
         // line 486
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("/invoice/manage");
         echo "/";
         if (isset($context["invoice"])) {
             $_invoice_ = $context["invoice"];
         } else {
             $_invoice_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_invoice_, "id"), "html", null, true);
         echo "\"><img src=\"images/icons/dark/pencil.png\" alt=\"\"></a></td>\n                    </tr>\n                    ";
         $context['_iterated'] = true;
     }
     if (!$context['_iterated']) {
         // line 489
         echo "                    <tr>\n                        <td colspan=\"6\">";
         // line 490
         echo gettext("The list is empty");
         echo "</td>\n                    </tr>\n                    ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['invoice'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 493
     echo "                </tbody>\n                \n                <tfoot>\n                    <tr>\n                        <td colspan=\"6\">\n                            <a href=\"";
     // line 498
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo $this->env->getExtension('bb')->twig_bb_client_link_filter("api/admin/invoice/prepare", array("client_id" => $this->getAttribute($_client_, "id")));
     echo "\" class=\"btnIconLeft mr10 mt5 api-link\" data-api-jsonp=\"onAfterInvoicePrepared\" ><img src=\"images/icons/dark/money.png\" alt=\"\" class=\"icon\"><span>New invoice</span></a>\n                        </td>\n                    </tr>\n                </tfoot>\n            </table>\n        </div>\n\n        <div class=\"tab_content nopadding\" id=\"tab-support\">\n            <div class=\"help\">\n                <h3>";
     // line 507
     echo gettext("Client support tickets");
     echo "</h3>\n            </div>\n            <table class=\"tableStatic wide\">\n                <thead>\n                    <tr>\n                        <td>ID</td>\n                        <td width=\"60%\">Subject</td>\n                        <td width=\"15%\">Help desk</td>\n                        <td width=\"15%\">Status</td>\n                        <td>&nbsp;</td>\n                    </tr>\n                </thead>\n                \n                <tbody>\n                    ";
     // line 521
     if (isset($context["admin"])) {
         $_admin_ = $context["admin"];
     } else {
         $_admin_ = null;
     }
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     $context["tickets"] = $this->getAttribute($_admin_, "support_ticket_get_list", array(0 => array("per_page" => "20", "client_id" => $this->getAttribute($_client_, "id"))), "method");
     // line 522
     echo "                    ";
     if (isset($context["tickets"])) {
         $_tickets_ = $context["tickets"];
     } else {
         $_tickets_ = null;
     }
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable($this->getAttribute($_tickets_, "list"));
     $context['_iterated'] = false;
     foreach ($context['_seq'] as $context["_key"] => $context["ticket"]) {
         // line 523
         echo "                    <tr>\n                        <td>";
         // line 524
         if (isset($context["ticket"])) {
             $_ticket_ = $context["ticket"];
         } else {
             $_ticket_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_ticket_, "id"), "html", null, true);
         echo "</td>\n                        <td>";
         // line 525
         if (isset($context["ticket"])) {
             $_ticket_ = $context["ticket"];
         } else {
             $_ticket_ = null;
         }
         echo twig_escape_filter($this->env, twig_truncate_filter($this->env, $this->getAttribute($_ticket_, "subject"), 30), "html", null, true);
         echo "</td>\n                        <td>";
         // line 526
         if (isset($context["ticket"])) {
             $_ticket_ = $context["ticket"];
         } else {
             $_ticket_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($_ticket_, "helpdesk"), "name"), "html", null, true);
         echo "</td>\n                        <td>";
         // line 527
         if (isset($context["mf"])) {
             $_mf_ = $context["mf"];
         } else {
             $_mf_ = null;
         }
         if (isset($context["ticket"])) {
             $_ticket_ = $context["ticket"];
         } else {
             $_ticket_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_mf_, "status_name", array(0 => $this->getAttribute($_ticket_, "status")), "method"), "html", null, true);
         echo "</td>\n                        <td class=\"actions\"><a class=\"bb-button btn14\" href=\"";
         // line 528
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("/support/ticket");
         echo "/";
         if (isset($context["ticket"])) {
             $_ticket_ = $context["ticket"];
         } else {
             $_ticket_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_ticket_, "id"), "html", null, true);
         echo "\"><img src=\"images/icons/dark/pencil.png\" alt=\"\"></a></td>\n                    </tr>\n                    ";
         $context['_iterated'] = true;
     }
     if (!$context['_iterated']) {
         // line 531
         echo "                    <tr>\n                        <td colspan=\"5\">";
         // line 532
         echo gettext("The list is empty");
         echo "</td>\n                    </tr>\n                    ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ticket'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 535
     echo "                </tbody>\n                \n                <tfoot>\n                    <tr>\n                        <td colspan=\"5\">\n                            <a href=\"";
     // line 540
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("support", array("client_id" => $this->getAttribute($_client_, "id")));
     echo "#tab-new\" class=\"btnIconLeft mr10 mt5\" ><img src=\"images/icons/dark/help.png\" alt=\"\" class=\"icon\"><span>New support ticket</span></a>\n                        </td>\n                    </tr>\n                </tfoot>\n            </table>\n        </div>\n        \n        <div class=\"tab_content nopadding\" id=\"tab-history\">\n            <div class=\"help\">\n                <h3>";
     // line 549
     echo gettext("Logins history");
     echo "</h3>\n            </div>\n            \n            <table class=\"tableStatic wide\">\n                <thead>\n                    <tr>\n                        <th>";
     // line 555
     echo gettext("IP");
     echo "</th>\n                        <th>";
     // line 556
     echo gettext("Country");
     echo "</th>\n                        <th>";
     // line 557
     echo gettext("Date");
     echo "</th>\n                    </tr>\n                </thead>\n\n                <tbody>\n                    ";
     // line 562
     if (isset($context["admin"])) {
         $_admin_ = $context["admin"];
     } else {
         $_admin_ = null;
     }
     if (isset($context["request"])) {
         $_request_ = $context["request"];
     } else {
         $_request_ = null;
     }
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     $context["logins"] = $this->getAttribute($_admin_, "client_login_history_get_list", array(0 => array("per_page" => 10, "page" => $this->getAttribute($_request_, "page"), "client_id" => $this->getAttribute($_client_, "id"))), "method");
     // line 563
     echo "                    ";
     if (isset($context["logins"])) {
         $_logins_ = $context["logins"];
     } else {
         $_logins_ = null;
     }
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable($this->getAttribute($_logins_, "list"));
     $context['_iterated'] = false;
     foreach ($context['_seq'] as $context["i"] => $context["login"]) {
         // line 564
         echo "                    <tr>\n                        <td>";
         // line 565
         if (isset($context["login"])) {
             $_login_ = $context["login"];
         } else {
             $_login_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_login_, "ip"), "html", null, true);
         echo "</td>\n                        <td>";
         // line 566
         if (isset($context["login"])) {
             $_login_ = $context["login"];
         } else {
             $_login_ = null;
         }
         echo twig_escape_filter($this->env, $this->env->getExtension('bb')->twig_ipcountryname_filter($this->getAttribute($_login_, "ip")), "html", null, true);
         echo "</td>\n                        <td>";
         // line 567
         if (isset($context["login"])) {
             $_login_ = $context["login"];
         } else {
             $_login_ = null;
         }
         echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute($_login_, "created_at"), "l, d F Y"), "html", null, true);
         echo "</td>\n                    </tr>\n                    ";
         $context['_iterated'] = true;
     }
     if (!$context['_iterated']) {
         // line 570
         echo "                    <tr>\n                        <td colspan=\"3\">";
         // line 571
         echo gettext("The list is empty");
         echo "</td>\n                    </tr>\n                    ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['i'], $context['login'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 574
     echo "                </tbody>\n            </table>\n        </div>\n\n        <div class=\"tab_content nopadding\" id=\"tab-emails\">\n            <div class=\"help\">\n                <h3>";
     // line 580
     echo gettext("Emails sent to client");
     echo "</h3>\n            </div>\n\n            <table class=\"tableStatic wide\">\n                <thead>\n                    <tr>\n                        <th>";
     // line 586
     echo gettext("Email subject");
     echo "</th>\n                        <th>";
     // line 587
     echo gettext("To");
     echo "</th>\n                        <th>";
     // line 588
     echo gettext("Date sent");
     echo "</th>\n                        <th style=\"width: 5%\">&nbsp;</th>\n                    </tr>\n                </thead>\n\n                <tbody>\n                    ";
     // line 594
     if (isset($context["admin"])) {
         $_admin_ = $context["admin"];
     } else {
         $_admin_ = null;
     }
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     $context["emails"] = $this->getAttribute($_admin_, "email_email_get_list", array(0 => array("per_page" => "20", "client_id" => $this->getAttribute($_client_, "id"))), "method");
     // line 595
     echo "                    ";
     if (isset($context["emails"])) {
         $_emails_ = $context["emails"];
     } else {
         $_emails_ = null;
     }
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable($this->getAttribute($_emails_, "list"));
     $context['_iterated'] = false;
     foreach ($context['_seq'] as $context["i"] => $context["email"]) {
         // line 596
         echo "                    <tr>\n                        <td>";
         // line 597
         if (isset($context["email"])) {
             $_email_ = $context["email"];
         } else {
             $_email_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_email_, "subject"), "html", null, true);
         echo "</td>\n                        <td>";
         // line 598
         if (isset($context["email"])) {
             $_email_ = $context["email"];
         } else {
             $_email_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_email_, "recipients"), "html", null, true);
         echo "</td>\n                        <td>";
         // line 599
         if (isset($context["email"])) {
             $_email_ = $context["email"];
         } else {
             $_email_ = null;
         }
         echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute($_email_, "created_at"), "l, d F Y"), "html", null, true);
         echo "</td>\n                        <td class=\"actions\"><a class=\"bb-button btn14\" href=\"";
         // line 600
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("email");
         echo "/";
         if (isset($context["email"])) {
             $_email_ = $context["email"];
         } else {
             $_email_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_email_, "id"), "html", null, true);
         echo "\"><img src=\"images/icons/dark/pencil.png\" alt=\"\"></a></td>\n                    </tr>\n                    ";
         $context['_iterated'] = true;
     }
     if (!$context['_iterated']) {
         // line 603
         echo "                    <tr>\n                        <td colspan=\"4\">";
         // line 604
         echo gettext("The list is empty");
         echo "</td>\n                    </tr>\n                    ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['i'], $context['email'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 607
     echo "                </tbody>\n            </table>\n            ";
     // line 609
     if (isset($context["emails"])) {
         $_emails_ = $context["emails"];
     } else {
         $_emails_ = null;
     }
     $this->env->loadTemplate("partial_pagination.phtml")->display(array_merge($context, array("list" => $_emails_)));
     // line 610
     echo "        </div>\n\n        <div class=\"tab_content nopadding\" id=\"tab-transactions\">\n            <div class=\"help\">\n                <h3>";
     // line 614
     echo gettext("Transactions received");
     echo "</h3>\n            </div>\n\n            ";
     // line 617
     if (isset($context["admin"])) {
         $_admin_ = $context["admin"];
     } else {
         $_admin_ = null;
     }
     if (isset($context["client"])) {
         $_client_ = $context["client"];
     } else {
         $_client_ = null;
     }
     $context["transactions"] = $this->getAttribute($this->getAttribute($_admin_, "invoice_transaction_get_list", array(0 => array("client_id" => $this->getAttribute($_client_, "id"), "per_page" => 100)), "method"), "list");
     // line 618
     echo "            <table class=\"tableStatic wide\">\n                <thead>\n                <tr>\n                    <th>";
     // line 621
     echo gettext("ID");
     echo "</th>\n                    <th>";
     // line 622
     echo gettext("Type");
     echo "</th>\n                    <th>";
     // line 623
     echo gettext("Gateway");
     echo "</th>\n                    <th>";
     // line 624
     echo gettext("Amount");
     echo "</th>\n                    <th>";
     // line 625
     echo gettext("Status");
     echo "</th>\n                    <th>";
     // line 626
     echo gettext("Date");
     echo "</th>\n                    <th>&nbsp;</th>\n                </tr>\n                </thead>\n\n                <tbody>\n                ";
     // line 632
     if (isset($context["transactions"])) {
         $_transactions_ = $context["transactions"];
     } else {
         $_transactions_ = null;
     }
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable($_transactions_);
     $context['_iterated'] = false;
     foreach ($context['_seq'] as $context["i"] => $context["tx"]) {
         // line 633
         echo "                    <tr>\n                        <td>";
         // line 634
         if (isset($context["tx"])) {
             $_tx_ = $context["tx"];
         } else {
             $_tx_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_tx_, "txn_id"), "html", null, true);
         echo "</td>\n                        <td>";
         // line 635
         if (isset($context["tx"])) {
             $_tx_ = $context["tx"];
         } else {
             $_tx_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_tx_, "type"), "html", null, true);
         echo "</td>\n                        <td>";
         // line 636
         if (isset($context["tx"])) {
             $_tx_ = $context["tx"];
         } else {
             $_tx_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_tx_, "gateway"), "html", null, true);
         echo "</td>\n                        <td>";
         // line 637
         if (isset($context["mf"])) {
             $_mf_ = $context["mf"];
         } else {
             $_mf_ = null;
         }
         if (isset($context["tx"])) {
             $_tx_ = $context["tx"];
         } else {
             $_tx_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_mf_, "currency_format", array(0 => $this->getAttribute($_tx_, "amount"), 1 => $this->getAttribute($_tx_, "currency")), "method"), "html", null, true);
         echo "</td>\n                        <td>";
         // line 638
         if (isset($context["mf"])) {
             $_mf_ = $context["mf"];
         } else {
             $_mf_ = null;
         }
         if (isset($context["tx"])) {
             $_tx_ = $context["tx"];
         } else {
             $_tx_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_mf_, "status_name", array(0 => $this->getAttribute($_tx_, "status")), "method"), "html", null, true);
         echo "</td>\n                        <td>";
         // line 639
         if (isset($context["tx"])) {
             $_tx_ = $context["tx"];
         } else {
             $_tx_ = null;
         }
         echo twig_escape_filter($this->env, $this->env->getExtension('bb')->twig_bb_datetime($this->getAttribute($_tx_, "created_at")), "html", null, true);
         echo "</td>\n                        <td style=\"width: 5%\">\n                            <a class=\"bb-button btn14\" href=\"";
         // line 641
         echo $this->env->getExtension('bb')->twig_bb_admin_link_filter("/invoice/transaction");
         echo "/";
         if (isset($context["tx"])) {
             $_tx_ = $context["tx"];
         } else {
             $_tx_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_tx_, "id"), "html", null, true);
         echo "\"><img src=\"images/icons/dark/pencil.png\" alt=\"\"></a>\n                        </td>\n                    </tr>\n                ";
         $context['_iterated'] = true;
     }
     if (!$context['_iterated']) {
         // line 645
         echo "                    <tr>\n                        <td colspan=\"7\">";
         // line 646
         echo gettext("The list is empty");
         echo "</td>\n                    </tr>\n                ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['i'], $context['tx'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 649
     echo "                </tbody>\n            </table>\n        </div>\n    </div>\n</div>\n\n\n";
     // line 733
     echo "\n";
 }