From 6032d2403f1d6d6d8887144ce97d6668040136b2 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Thu, 11 Jul 2019 16:47:49 +0300 Subject: [PATCH] global filters ui --- .../Components/Dashboard/Default.cshtml | 32 +++++++++++-------- .../DateRangeGlobalFilterViewComponent.cshtml | 12 +++++-- 2 files changed, 29 insertions(+), 15 deletions(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/Components/Dashboard/Default.cshtml b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/Components/Dashboard/Default.cshtml index 22d8ceb7c7..65e694b66d 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/Components/Dashboard/Default.cshtml +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/Components/Dashboard/Default.cshtml @@ -12,23 +12,29 @@ @{ } - -
- @foreach (var globalFilterConfiguration in Model.Dashboard.AvailableGlobalFilters) + + @if (Model.Dashboard.AvailableGlobalFilters.Any()) { - var globalFilter = Model.GetGlobalFilter(globalFilterConfiguration.GlobalFilterName); + + + + @foreach (var globalFilterConfiguration in Model.Dashboard.AvailableGlobalFilters) + { + var globalFilter = Model.GetGlobalFilter(globalFilterConfiguration.GlobalFilterName); - @await GlobalFilteRenderer.RenderAsync(Component, globalFilter.Name) + @await GlobalFilteRenderer.RenderAsync(Component, globalFilter.Name) + } + + + + +
+ +
+
} - @if (Model.Dashboard.AvailableGlobalFilters.Any()) - { -
- -
- } - -
+
@foreach (var widgetConfiguration in Model.Dashboard.AvailableWidgets) diff --git a/samples/DashboardDemo/src/DashboardDemo.Web/Pages/widgets/Filters/DateRangeGlobalFilterViewComponent.cshtml b/samples/DashboardDemo/src/DashboardDemo.Web/Pages/widgets/Filters/DateRangeGlobalFilterViewComponent.cshtml index 43787ddf79..3fd2b8fce6 100644 --- a/samples/DashboardDemo/src/DashboardDemo.Web/Pages/widgets/Filters/DateRangeGlobalFilterViewComponent.cshtml +++ b/samples/DashboardDemo/src/DashboardDemo.Web/Pages/widgets/Filters/DateRangeGlobalFilterViewComponent.cshtml @@ -5,7 +5,15 @@ @{ }
- - +
+
+ + +
+
+ + +
+