From dbd7e0fb66f573d9e298d7ff9bf5a2ff2c0e0e86 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Tue, 8 Nov 2022 14:59:12 +0530 Subject: [PATCH] Allow static KPIs and make refresh button optional --- .../default/template/helpers/kpi/kpi.tpl | 77 ++++++++++--------- .../default/template/helpers/kpi/row.tpl | 4 +- classes/helper/HelperKpi.php | 3 +- classes/helper/HelperKpiRow.php | 3 + controllers/admin/AdminCartsController.php | 3 - .../admin/AdminCategoriesController.php | 3 - .../admin/AdminCustomerThreadsController.php | 3 - .../admin/AdminCustomersController.php | 3 - controllers/admin/AdminModulesController.php | 3 - controllers/admin/AdminOrdersController.php | 3 - controllers/admin/AdminProductsController.php | 3 - .../admin/AdminTranslationsController.php | 3 - 12 files changed, 46 insertions(+), 65 deletions(-) diff --git a/admin/themes/default/template/helpers/kpi/kpi.tpl b/admin/themes/default/template/helpers/kpi/kpi.tpl index 1c590a6ed..e29ae28c4 100644 --- a/admin/themes/default/template/helpers/kpi/kpi.tpl +++ b/admin/themes/default/template/helpers/kpi/kpi.tpl @@ -25,9 +25,9 @@ <{if isset($href) && $href}a style="display:block" href="{$href|escape:'html':'UTF-8'}"{else}div{/if} id="{$id|escape:'html':'UTF-8'}" data-toggle="tooltip" class="box-stats label-tooltip {$color|escape}" data-original-title="{$tooltip|escape}">
- {if isset($icon) && $icon} - - {/if} + {if isset($icon) && $icon} + + {/if} {$title|escape} {$subtitle|escape} {if isset($chart) && $chart} @@ -36,46 +36,47 @@
{/if} - + {if isset($source) && $source} + + {elseif isset($value) && $value != ''} + {$value|escape:'html':'UTF-8'} + {/if} - -{if isset($source) && $source != '' && isset($refresh) && $refresh != ''} - -{/if} - - + }, + complete: function () { + $('#{$id|addslashes}').find('.value').removeClass('skeleton-loading-wave loading-container-bar loading'); + }, + }); + } + +{/if} {if $chart}