Browse Source

page header conversion.

pull/5836/head
İlkay İlknur 6 years ago
parent
commit
6fe4b138e6
  1. 27
      modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor
  2. 15
      modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor.cs
  3. 1
      modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/_Imports.razor

27
modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor

@ -1,26 +1,9 @@
@page "/setting-management" @page "/setting-management"
@using Microsoft.Extensions.Localization
@using Volo.Abp.SettingManagement.Localization
@inject IStringLocalizer<AbpSettingManagementResource> L
@inherits SettingManagementBase @inherits SettingManagementBase
@* ************************* PAGE HEADER ************************* *@ @* ************************* PAGE HEADER ************************* *@
<div class="row entry-row"> <PageHeader Title="@L["Settings"]" BreadcrumbItems="@BreadcrumbItems">
<div class="col-auto">
<h1 class="content-header-title">@L["Settings"]</h1> </PageHeader>
</div>
<div class="col-lg-auto pl-lg-0">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="~/"><i class="fa fa-home"></i> </a></li>
<li class="breadcrumb-item active" aria-current="page">@L["Settings"]</li>
</ol>
</div>
<div class="col">
<div class="text-lg-right pt-2" id="AbpContentToolbar">
</div>
</div>
</div>
<Card> <Card>
<CardBody> <CardBody>
@ -39,7 +22,7 @@
<TabPanel Name="@GetNormalizedString(group.Id)"> <TabPanel Name="@GetNormalizedString(group.Id)">
<h2>@group.DisplayName</h2> <h2>@group.DisplayName</h2>
<Divider /> <Divider />
@{ @{
SettingItemRenders.Add(builder => SettingItemRenders.Add(builder =>
{ {
@ -47,7 +30,7 @@
builder.CloseComponent(); builder.CloseComponent();
}); });
} }
@SettingItemRenders.Last() @SettingItemRenders.Last()
</TabPanel> </TabPanel>
} }

15
modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor.cs

@ -3,7 +3,10 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Volo.Abp.BlazoriseUI;
using Volo.Abp.SettingManagement.Localization;
namespace Volo.Abp.SettingManagement.Blazor.Pages.SettingManagement namespace Volo.Abp.SettingManagement.Blazor.Pages.SettingManagement
{ {
@ -11,18 +14,21 @@ namespace Volo.Abp.SettingManagement.Blazor.Pages.SettingManagement
{ {
[Inject] [Inject]
protected IServiceProvider ServiceProvider { get; set; } protected IServiceProvider ServiceProvider { get; set; }
protected SettingComponentCreationContext SettingComponentCreationContext { get; set; } protected SettingComponentCreationContext SettingComponentCreationContext { get; set; }
[Inject] [Inject]
protected IOptions<SettingManagementComponentOptions> _options { get; set; } protected IOptions<SettingManagementComponentOptions> _options { get; set; }
[Inject]
protected IStringLocalizer<AbpSettingManagementResource> L { get; set; }
protected SettingManagementComponentOptions Options => _options.Value; protected SettingManagementComponentOptions Options => _options.Value;
protected List<RenderFragment> SettingItemRenders { get; set; } = new List<RenderFragment>(); protected List<RenderFragment> SettingItemRenders { get; set; } = new List<RenderFragment>();
protected string SelectedGroup; protected string SelectedGroup;
protected List<BreadcrumbItem> BreadcrumbItems = new List<BreadcrumbItem>();
protected override async Task OnInitializedAsync() protected override async Task OnInitializedAsync()
{ {
SettingComponentCreationContext = new SettingComponentCreationContext(ServiceProvider); SettingComponentCreationContext = new SettingComponentCreationContext(ServiceProvider);
@ -31,10 +37,11 @@ namespace Volo.Abp.SettingManagement.Blazor.Pages.SettingManagement
{ {
await contributor.ConfigureAsync(SettingComponentCreationContext); await contributor.ConfigureAsync(SettingComponentCreationContext);
} }
SettingItemRenders.Clear(); SettingItemRenders.Clear();
SelectedGroup = GetNormalizedString(SettingComponentCreationContext.Groups.First().Id); SelectedGroup = GetNormalizedString(SettingComponentCreationContext.Groups.First().Id);
BreadcrumbItems.Add(new BreadcrumbItem(L["Settings"]));
} }
protected string GetNormalizedString(string value) protected string GetNormalizedString(string value)

1
modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/_Imports.razor

@ -1,5 +1,6 @@
@using Microsoft.AspNetCore.Components.Web @using Microsoft.AspNetCore.Components.Web
@using Volo.Abp.AspNetCore.Components.WebAssembly @using Volo.Abp.AspNetCore.Components.WebAssembly
@using Volo.Abp.BlazoriseUI @using Volo.Abp.BlazoriseUI
@using Volo.Abp.BlazoriseUI.Components
@using Blazorise @using Blazorise
@using Blazorise.DataGrid @using Blazorise.DataGrid
Loading…
Cancel
Save