From 20398b4853d09e3d00c0a0003492b901add22a85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Thu, 24 May 2018 06:58:37 +0300 Subject: [PATCH] Basic theme folder reorganization --- .../BasicTheme.cs | 2 +- .../Basic/Components}/Brand/Default.cshtml | 0 .../Components/Brand/MainNavbarBrandViewComponent.cs | 12 ++++++++++++ .../Basic/Components}/MainNavbar/Default.cshtml | 6 +++--- .../MainNavbar/MainNavbarViewComponent.cs | 4 ++-- .../Basic/Components}/Menu/AbpMenuViewComponent.cs | 4 ++-- .../Basic/Components}/Menu/Default.cshtml | 0 .../Basic/Components}/Toolbar/Default.cshtml | 0 .../Toolbar}/LanguageSwitch/Default.cshtml | 2 +- .../Toolbar}/LanguageSwitch/LanguageInfo.cs | 2 +- .../LanguageSwitch/LanguageSwitchViewComponent.cs | 4 ++-- .../LanguageSwitchViewComponentModel.cs | 2 +- .../Toolbar/MainNavbarToolsViewComponent.cs | 4 ++-- .../Components/Toolbar}/UserMenu/Default.cshtml | 0 .../Toolbar}/UserMenu/UserMenuViewComponent.cs | 4 ++-- .../Basic/Layouts/App.cshtml} | 3 +-- .../Themes/Basic/_ViewImports.cshtml | 3 +++ .../Toolbars/BasicThemeMainTopToolbarContributor.cs | 4 ++-- .../MainNavbar/Brand/MainNavbarBrandViewComponent.cs | 12 ------------ .../Views/Shared/_ViewImports.cshtml | 1 - .../Views/_ViewStart.cshtml | 9 ++++++--- .../Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj | 9 +++++---- 22 files changed, 46 insertions(+), 41 deletions(-) rename src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/{Views/Shared/Components/Theme/MainNavbar => Themes/Basic/Components}/Brand/Default.cshtml (100%) create mode 100644 src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Brand/MainNavbarBrandViewComponent.cs rename src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/{Views/Shared/Components/Theme => Themes/Basic/Components}/MainNavbar/Default.cshtml (73%) rename src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/{Views/Shared/Components/Theme => Themes/Basic/Components}/MainNavbar/MainNavbarViewComponent.cs (50%) rename src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/{Views/Shared/Components/Theme/MainNavbar => Themes/Basic/Components}/Menu/AbpMenuViewComponent.cs (72%) rename src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/{Views/Shared/Components/Theme/MainNavbar => Themes/Basic/Components}/Menu/Default.cshtml (100%) rename src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/{Views/Shared/Components/Theme/MainNavbar => Themes/Basic/Components}/Toolbar/Default.cshtml (100%) rename src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/{Views/Shared/Components/Theme/MainNavbar/Toolbar/Items => Themes/Basic/Components/Toolbar}/LanguageSwitch/Default.cshtml (82%) rename src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/{Views/Shared/Components/Theme/MainNavbar/Toolbar/Items => Themes/Basic/Components/Toolbar}/LanguageSwitch/LanguageInfo.cs (58%) rename src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/{Views/Shared/Components/Theme/MainNavbar/Toolbar/Items => Themes/Basic/Components/Toolbar}/LanguageSwitch/LanguageSwitchViewComponent.cs (85%) rename src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/{Views/Shared/Components/Theme/MainNavbar/Toolbar/Items => Themes/Basic/Components/Toolbar}/LanguageSwitch/LanguageSwitchViewComponentModel.cs (74%) rename src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/{Views/Shared/Components/Theme/MainNavbar => Themes/Basic/Components}/Toolbar/MainNavbarToolsViewComponent.cs (73%) rename src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/{Views/Shared/Components/Theme/MainNavbar/Toolbar/Items => Themes/Basic/Components/Toolbar}/UserMenu/Default.cshtml (100%) rename src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/{Views/Shared/Components/Theme/MainNavbar/Toolbar/Items => Themes/Basic/Components/Toolbar}/UserMenu/UserMenuViewComponent.cs (68%) rename src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/{Views/Shared/_AppLayout.cshtml => Themes/Basic/Layouts/App.cshtml} (88%) create mode 100644 src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/_ViewImports.cshtml delete mode 100644 src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Brand/MainNavbarBrandViewComponent.cs delete mode 100644 src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/_ViewImports.cshtml diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/BasicTheme.cs b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/BasicTheme.cs index 1301631bb2..fe75b38695 100644 --- a/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/BasicTheme.cs +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/BasicTheme.cs @@ -8,7 +8,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic { public const string Name = "Basic"; - public string DefaultLayout => "~/Views/Shared/_AppLayout.cshtml"; + public string DefaultLayout => "~/Themes/Basic/Layouts/App.cshtml"; public string GetLayoutOrNull(string name) { diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Brand/Default.cshtml b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Brand/Default.cshtml similarity index 100% rename from src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Brand/Default.cshtml rename to src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Brand/Default.cshtml diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Brand/MainNavbarBrandViewComponent.cs b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Brand/MainNavbarBrandViewComponent.cs new file mode 100644 index 0000000000..9698048412 --- /dev/null +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Brand/MainNavbarBrandViewComponent.cs @@ -0,0 +1,12 @@ +using Microsoft.AspNetCore.Mvc; + +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Brand +{ + public class MainNavbarBrandViewComponent : AbpViewComponent + { + public IViewComponentResult Invoke() + { + return View("~/Themes/Basic/Components/Brand/Default.cshtml"); + } + } +} diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Default.cshtml b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/MainNavbar/Default.cshtml similarity index 73% rename from src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Default.cshtml rename to src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/MainNavbar/Default.cshtml index 68a10e8c20..b734d7057e 100644 --- a/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Default.cshtml +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/MainNavbar/Default.cshtml @@ -1,6 +1,6 @@ -@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbar.Brand -@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbar.Menu -@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbar.Toolbar +@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Brand +@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Menu +@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Toolbar