Browse Source

Merge pull request #14162 from abpframework/ContentTitleViewComponent

pull/14169/head
liangshiwei 3 years ago
committed by GitHub
parent
commit
ca58560236
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/ContentTitle/ContentTitleViewComponent.cs
  2. 7
      modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/ContentTitle/Default.cshtml
  3. 10
      modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml
  4. 13
      modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/Index.cshtml
  5. 14
      modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/Index.cshtml
  6. 13
      modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/Index.cshtml
  7. 7
      modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Pages/VirtualFileExplorer/Index.cshtml

19
modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/ContentTitle/ContentTitleViewComponent.cs

@ -0,0 +1,19 @@
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.UI.Layout;
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.ContentTitle;
public class ContentTitleViewComponent : AbpViewComponent
{
protected IPageLayout PageLayout { get; }
public ContentTitleViewComponent(IPageLayout pageLayout)
{
PageLayout = pageLayout;
}
public virtual IViewComponentResult Invoke()
{
return View("~/Themes/Basic/Components/ContentTitle/Default.cshtml", PageLayout.Content);
}
}

7
modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/ContentTitle/Default.cshtml

@ -0,0 +1,7 @@
@using Volo.Abp.AspNetCore.Mvc.UI.Layout
@model ContentLayout
<div class="col">
<h4>@Model.Title</h4>
</div>

10
modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml

@ -1,6 +1,7 @@
@using Volo.Abp.AspNetCore.Mvc.UI.Components.LayoutHook
@using Volo.Abp.AspNetCore.Mvc.UI.Layout
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Bundling
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.ContentTitle
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.MainNavbar
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.PageAlerts
@using Volo.Abp.AspNetCore.Mvc.UI.Theming
@ -58,8 +59,13 @@
<div class="@containerClass">
@(await Component.InvokeAsync<PageAlertsViewComponent>())
<div id="AbpContentToolbar">
<div class="text-end mb-2">
@await RenderSectionAsync("content_toolbar", false)
<div class="row mb-2">
@(await Component.InvokeAsync<ContentTitleViewComponent>())
<div class="col">
<div class="text-end">
@await RenderSectionAsync("content_toolbar", false)
</div>
</div>
</div>
</div>
@await Component.InvokeLayoutHookAsync(LayoutHooks.PageContent.First, StandardLayouts.Application)

13
modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/Index.cshtml

@ -28,17 +28,10 @@
<abp-script src="/Pages/identity/roles/index.js" />
</abp-script-bundle>
}
@section content_toolbar {
@await Component.InvokeAsync(typeof(AbpPageToolbarViewComponent), new { pageName = typeof(IndexModel).FullName })
}
<abp-card id="IdentityRolesWrapper">
<abp-card-header>
<abp-row>
<abp-column size-md="_6">
<abp-card-title>@L["Roles"]</abp-card-title>
</abp-column>
<abp-column size-md="_6" class="text-end">
@await Component.InvokeAsync(typeof(AbpPageToolbarViewComponent), new { pageName = typeof(IndexModel).FullName })
</abp-column>
</abp-row>
</abp-card-header>
<abp-card-body>
<abp-table striped-rows="true" class="nowrap"></abp-table>
</abp-card-body>

14
modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/Index.cshtml

@ -29,18 +29,10 @@
<abp-script src="/Pages/identity/users/index.js" />
</abp-script-bundle>
}
@section content_toolbar {
@await Component.InvokeAsync(typeof(AbpPageToolbarViewComponent), new { pageName = typeof(IndexModel).FullName })
}
<abp-card id="IdentityUsersWrapper">
<abp-card-header>
<abp-row>
<abp-column size-md="_6">
<abp-card-title>@L["Users"]</abp-card-title>
</abp-column>
<abp-column size-md="_6" class="text-end">
@await Component.InvokeAsync(typeof(AbpPageToolbarViewComponent), new { pageName = typeof(IndexModel).FullName })
</abp-column>
</abp-row>
</abp-card-header>
<abp-card-body>
<abp-table striped-rows="true" class="nowrap"></abp-table>
</abp-card-body>

13
modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/Index.cshtml

@ -24,17 +24,10 @@
<abp-script src="/Pages/TenantManagement/Tenants/Index.js"/>
</abp-script-bundle>
}
@section content_toolbar {
@await Component.InvokeAsync(typeof(AbpPageToolbarViewComponent), new { pageName = typeof(IndexModel).FullName })
}
<abp-card id="TenantsWrapper">
<abp-card-header>
<abp-row>
<abp-column size-md="_6">
<abp-card-title>@L["Tenants"]</abp-card-title>
</abp-column>
<abp-column size-md="_6" class="text-end">
@await Component.InvokeAsync(typeof(AbpPageToolbarViewComponent), new { pageName = typeof(IndexModel).FullName })
</abp-column>
</abp-row>
</abp-card-header>
<abp-card-body>
<abp-table striped-rows="true" class="nowrap"></abp-table>
</abp-card-body>

7
modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Pages/VirtualFileExplorer/Index.cshtml

@ -28,13 +28,6 @@
}
<abp-card id="VirtualFileExplorerWrapper">
<abp-card-header>
<abp-row>
<abp-column size-md="_6">
<abp-card-title>@L["VirtualFileExplorer"]</abp-card-title>
</abp-column>
</abp-row>
</abp-card-header>
<abp-card-body>
@Html.Raw(Model.PathNavigation)

Loading…
Cancel
Save