From a6d406ee8fc162347766e85ae4e678af53f9e48e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Thu, 23 Feb 2017 13:51:29 +0300 Subject: [PATCH] Moved layout to bootstrap dll. --- .../AbpDesk.Web.Mvc/Views/_ViewStart.cshtml | 2 +- .../Shared/Components/AbpMenu/Default.cshtml | 53 ++++++++++++------- .../Views/Shared/_AppLayout.cshtml} | 17 ++++-- .../Views/Shared/_AppLayout.css | 3 ++ .../Views/Shared/_ViewImports.cshtml | 1 + .../Abp/Ui/Navigation/ApplicationMenuItem.cs | 5 ++ 6 files changed, 57 insertions(+), 24 deletions(-) rename src/{AbpDesk/AbpDesk.Web.Mvc/Views/Shared/_Layout.cshtml => Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Views/Shared/_AppLayout.cshtml} (56%) create mode 100644 src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Views/Shared/_AppLayout.css create mode 100644 src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Views/Shared/_ViewImports.cshtml diff --git a/src/AbpDesk/AbpDesk.Web.Mvc/Views/_ViewStart.cshtml b/src/AbpDesk/AbpDesk.Web.Mvc/Views/_ViewStart.cshtml index 2de62418c0..f4d75cd962 100644 --- a/src/AbpDesk/AbpDesk.Web.Mvc/Views/_ViewStart.cshtml +++ b/src/AbpDesk/AbpDesk.Web.Mvc/Views/_ViewStart.cshtml @@ -1,3 +1,3 @@ @{ - Layout = "~/Views/Shared/_Layout.cshtml"; + Layout = "~/Views/Shared/_AppLayout.cshtml"; } diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Views/Shared/Components/AbpMenu/Default.cshtml b/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Views/Shared/Components/AbpMenu/Default.cshtml index a53c4fc32d..ab61aa4618 100644 --- a/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Views/Shared/Components/AbpMenu/Default.cshtml +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Views/Shared/Components/AbpMenu/Default.cshtml @@ -1,22 +1,39 @@ @using System.Threading.Tasks @model Volo.Abp.UI.Navigation.ApplicationMenu -

@Model.DisplayName (BOOTSTRAP)

- +
+ + +
+ + diff --git a/src/AbpDesk/AbpDesk.Web.Mvc/Views/Shared/_Layout.cshtml b/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Views/Shared/_AppLayout.cshtml similarity index 56% rename from src/AbpDesk/AbpDesk.Web.Mvc/Views/Shared/_Layout.cshtml rename to src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Views/Shared/_AppLayout.cshtml index ba3281ffc0..2e376dc2a8 100644 --- a/src/AbpDesk/AbpDesk.Web.Mvc/Views/Shared/_Layout.cshtml +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Views/Shared/_AppLayout.cshtml @@ -5,11 +5,16 @@ - + - title - + + + + Fixed top navbar example for Bootstrap + + + @RenderSection("styles", false) @@ -18,8 +23,10 @@ - @RenderBody() - +
+ @RenderBody() +
+ diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Views/Shared/_AppLayout.css b/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Views/Shared/_AppLayout.css new file mode 100644 index 0000000000..586cc9979a --- /dev/null +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Views/Shared/_AppLayout.css @@ -0,0 +1,3 @@ +body { + padding-top: 5rem; +} \ No newline at end of file diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Views/Shared/_ViewImports.cshtml b/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Views/Shared/_ViewImports.cshtml new file mode 100644 index 0000000000..9018c7897f --- /dev/null +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Views/Shared/_ViewImports.cshtml @@ -0,0 +1 @@ +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers \ No newline at end of file diff --git a/src/Volo.Abp/Volo/Abp/Ui/Navigation/ApplicationMenuItem.cs b/src/Volo.Abp/Volo/Abp/Ui/Navigation/ApplicationMenuItem.cs index d5b59a1905..dc2f4d5547 100644 --- a/src/Volo.Abp/Volo/Abp/Ui/Navigation/ApplicationMenuItem.cs +++ b/src/Volo.Abp/Volo/Abp/Ui/Navigation/ApplicationMenuItem.cs @@ -62,6 +62,11 @@ namespace Volo.Abp.UI.Navigation [CanBeNull] public string Target { get; set; } + /// + /// Can be used to disable this menu item. + /// + public bool IsDisabled { get; set; } + /// [NotNull] public IList Items { get; }