toolbar applied on Identity Roles

pull/6575/head
Ahmet 5 years ago
parent 0402423b64
commit bc7eb4296f

@ -81,6 +81,18 @@ namespace Volo.Abp.Identity.Web
);
}
);
options.Configure<Volo.Abp.Identity.Web.Pages.Identity.Roles.IndexModel>(
toolbar =>
{
toolbar.AddButton(
LocalizableString.Create<IdentityResource>("NewRole"),
icon: "plus",
name: "CreateRole",
requiredPolicyName: IdentityPermissions.Roles.Create
);
}
);
});
}

@ -2,6 +2,7 @@
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Mvc.Localization
@using Volo.Abp.AspNetCore.Mvc.UI.Layout
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Pages.Shared.Components.AbpPageToolbar
@using Volo.Abp.Identity
@using Volo.Abp.Identity.Localization
@using Volo.Abp.Identity.Web.Navigation
@ -33,10 +34,7 @@
<abp-card-title>@L["Roles"]</abp-card-title>
</abp-column>
<abp-column size-md="_6" class="text-right">
@if (await Authorization.IsGrantedAsync(IdentityPermissions.Roles.Create))
{
<abp-button button-type="Primary" name="CreateRole" text="@L["NewRole"].Value" icon="plus" />
}
@await Component.InvokeAsync(typeof(AbpPageToolbarViewComponent), new { pageName = typeof(IndexModel).FullName })
</abp-column>
</abp-row>
</abp-card-header>

Loading…
Cancel
Save