From 06821bc06b0ed3a406bcda774ea146c3c1a10158 Mon Sep 17 00:00:00 2001 From: Vaidas Lungis Date: Fri, 29 May 2015 13:57:24 +0300 Subject: [PATCH] Reverting previous commits related to ajax call to boost page load 125a94302088d7e7432741d2cb76950b70ccd280 - load middleNav square box notification stats via ajax call b45dcc70dfc59f50c2b33443590f64b6e679f8c5 07d501b35f60f96c708dc2b5961c2ababfe2bf86 dashboard statistic loading with ajax call fe4f15c8bc6ac3e6daac681a5e95207b333e3e16 2ef05ec7e4f1a9b7dc8c43601eaa5568f775b8c3 dashboard plots data loaded with ajax call --- .../admin_default/html/layout_default.phtml | 15 ++- .../html/mod_index_dashboard.phtml | 62 +++++------ src/bb-themes/admin_default/js/bb-admin.js | 101 +----------------- .../admin_default/js/boxbilling.min.js | 12 +-- 4 files changed, 48 insertions(+), 142 deletions(-) diff --git a/src/bb-themes/admin_default/html/layout_default.phtml b/src/bb-themes/admin_default/html/layout_default.phtml index 0e55ad1f8..400b236ee 100644 --- a/src/bb-themes/admin_default/html/layout_default.phtml +++ b/src/bb-themes/admin_default/html/layout_default.phtml @@ -15,6 +15,7 @@ {% include "partial_styles.phtml" %} + {% block head %}{% endblock %} @@ -73,20 +74,24 @@ {% endif %} {% if admin.system_is_allowed({"mod":"order"}) %} -
  • {% trans 'Orders' %}
  • + {% set count_orders = admin.order_get_statuses.failed_setup %} +
  • {% trans 'Orders' %}{% if count_orders %}{{ count_orders }}{% endif %}
  • {% endif %} {% if admin.system_is_allowed({"mod":"invoice"}) %} -
  • {% trans 'Invoices' %}
  • + {% set count_invoices = admin.invoice_get_statuses.unpaid %} +
  • {% trans 'Invoices' %}{% if count_invoices %}{{ count_invoices }}{% endif %}
  • {% endif %} {% if admin.system_is_allowed({"mod":"support"}) %} -
  • {% trans 'Inquiries' %}
  • -
  • {% trans 'Tickets' %}
  • + {% set count_tickets = admin.support_ticket_get_statuses.open %} + {% set count_ptickets = admin.support_public_ticket_get_statuses.open %} +
  • {% trans 'Inquiries' %}{% if count_ptickets %}{{ count_ptickets }}{% endif %}
  • +
  • {% trans 'Tickets' %}{% if count_tickets %}{{ count_tickets }}{% endif %}
  • {% endif %} {% if admin.system_is_allowed({"mod":"client"}) %} -
  • {% trans 'Clients' %}
  • +
  • {% trans 'Clients' %}
  • {% endif %}
  • {% trans 'Dashboard' %}
  • diff --git a/src/bb-themes/admin_default/html/mod_index_dashboard.phtml b/src/bb-themes/admin_default/html/mod_index_dashboard.phtml index bbab77ee4..9206f9d4a 100644 --- a/src/bb-themes/admin_default/html/mod_index_dashboard.phtml +++ b/src/bb-themes/admin_default/html/mod_index_dashboard.phtml @@ -13,8 +13,9 @@ {% if admin.system_is_allowed({"mod":"stats"}) %}
    {{ guest.system_company.name }} {% trans 'Statistics' %}
    + {% set stats = admin.stats_get_summary %} {% set income = admin.stats_get_summary_income %} - +
    @@ -35,37 +36,37 @@ - + - - - - - + + + + + - + - - - - - + + + + + - + - - - - - + + + + + - + - - - - - + + + + +
    {% trans 'Metric' %}{{ mf.currency_format(income.last_month) }} {{ mf.currency_format(income.total) }}
    {% trans 'Clients' %}{{ stats.clients_today }}{{ stats.clients_yesterday }}{{ stats.clients_this_month }}{{ stats.clients_last_month }}{{ stats.clients_total }}{{ stats.clients_today }}{{ stats.clients_yesterday }}{{ stats.clients_this_month }}{{ stats.clients_last_month }}{{ stats.clients_total }}
    {% trans 'Orders' %}{{ stats.orders_today }}{{ stats.orders_yesterday }}{{ stats.orders_this_month }}{{ stats.orders_last_month }}{{ stats.orders_total }}{{ stats.orders_today }}{{ stats.orders_yesterday }}{{ stats.orders_this_month }}{{ stats.orders_last_month }}{{ stats.orders_total }}
    {% trans 'Invoices' %}{{ stats.invoices_today }}{{ stats.invoices_yesterday }}{{ stats.invoices_this_month }}{{ stats.invoices_last_month }}{{ stats.invoices_total }}{{ stats.invoices_today }}{{ stats.invoices_yesterday }}{{ stats.invoices_this_month }}{{ stats.invoices_last_month }}{{ stats.invoices_total }}
    {% trans 'Tickets' %}{{ stats.tickets_today }}{{ stats.tickets_yesterday }}{{ stats.tickets_this_month }}{{ stats.tickets_last_month }}{{ stats.tickets_total }}{{ stats.tickets_today }}{{ stats.tickets_yesterday }}{{ stats.tickets_this_month }}{{ stats.tickets_last_month }}{{ stats.tickets_total }}
    @@ -284,12 +285,11 @@