Localize non components strings in roles pages
This commit is contained in:
parent
c70f37d33c
commit
b4333a743d
|
@ -1,7 +1,8 @@
|
||||||
@namespace Oqtane.Modules.Admin.Roles
|
@namespace Oqtane.Modules.Admin.Roles
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IRoleService RoleService
|
@inject IRoleService RoleService
|
||||||
|
@inject IStringLocalizer<Add> Localizer
|
||||||
|
|
||||||
<table class="table table-borderless">
|
<table class="table table-borderless">
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -26,14 +27,14 @@
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<select id="isautoassigned" class="form-control" @bind="@_isautoassigned">
|
<select id="isautoassigned" class="form-control" @bind="@_isautoassigned">
|
||||||
<option value="True">Yes</option>
|
<option value="True">@Localizer["Yes"]</option>
|
||||||
<option value="False">No</option>
|
<option value="False">@Localizer["No"]</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<button type="button" class="btn btn-success" @onclick="SaveRole">Save</button>
|
<button type="button" class="btn btn-success" @onclick="SaveRole">@Localizer["Save"]</button>
|
||||||
<NavLink class="btn btn-secondary" href="@NavigateUrl()">Cancel</NavLink>
|
<NavLink class="btn btn-secondary" href="@NavigateUrl()">@Localizer["Cancel"]</NavLink>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
private string _name = string.Empty;
|
private string _name = string.Empty;
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
@namespace Oqtane.Modules.Admin.Roles
|
@namespace Oqtane.Modules.Admin.Roles
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IRoleService RoleService
|
@inject IRoleService RoleService
|
||||||
|
@inject IStringLocalizer<Edit> Localizer
|
||||||
|
|
||||||
<table class="table table-borderless">
|
<table class="table table-borderless">
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -26,14 +27,14 @@
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<select id="isautoassigned" class="form-control" @bind="@_isautoassigned">
|
<select id="isautoassigned" class="form-control" @bind="@_isautoassigned">
|
||||||
<option value="True">Yes</option>
|
<option value="True">@Localizer["Yes"]</option>
|
||||||
<option value="False">No</option>
|
<option value="False">@Localizer["No"]</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<button type="button" class="btn btn-success" @onclick="SaveRole">Save</button>
|
<button type="button" class="btn btn-success" @onclick="SaveRole">@Localizer["Save"]</button>
|
||||||
<NavLink class="btn btn-secondary" href="@NavigateUrl()">Cancel</NavLink>
|
<NavLink class="btn btn-secondary" href="@NavigateUrl()">@Localizer["Cancel"]</NavLink>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
private int _roleid;
|
private int _roleid;
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
@namespace Oqtane.Modules.Admin.Roles
|
@namespace Oqtane.Modules.Admin.Roles
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject IRoleService RoleService
|
@inject IRoleService RoleService
|
||||||
|
@inject IStringLocalizer<Index> Localizer
|
||||||
|
|
||||||
@if (_roles == null)
|
@if (_roles == null)
|
||||||
{
|
{
|
||||||
<p><em>Loading...</em></p>
|
<p><em>@Localizer["Loading..."]</em></p>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -15,7 +16,7 @@ else
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
<th>Name</th>
|
<th>@Localizer["Name"]</th>
|
||||||
</Header>
|
</Header>
|
||||||
<Row>
|
<Row>
|
||||||
<td><ActionLink Action="Edit" Parameters="@($"id=" + context.RoleId.ToString())" Disabled="@(context.IsSystem)" ResourceKey="Edit" /></td>
|
<td><ActionLink Action="Edit" Parameters="@($"id=" + context.RoleId.ToString())" Disabled="@(context.IsSystem)" ResourceKey="Edit" /></td>
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
@namespace Oqtane.Modules.Admin.Roles
|
@namespace Oqtane.Modules.Admin.Roles
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject IRoleService RoleService
|
@inject IRoleService RoleService
|
||||||
@inject IUserRoleService UserRoleService
|
@inject IUserRoleService UserRoleService
|
||||||
|
@inject IStringLocalizer<Users> Localizer
|
||||||
|
|
||||||
@if (userroles == null)
|
@if (userroles == null)
|
||||||
{
|
{
|
||||||
<p><em>Loading...</em></p>
|
<p><em>@Localizer["Loading..."]</em></p>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -49,20 +50,20 @@ else
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<button type="button" class="btn btn-success" @onclick="SaveUserRole">Save</button>
|
<button type="button" class="btn btn-success" @onclick="SaveUserRole">@Localizer["Save"]</button>
|
||||||
<NavLink class="btn btn-secondary" href="@NavigateUrl()">Cancel</NavLink>
|
<NavLink class="btn btn-secondary" href="@NavigateUrl()">@Localizer["Cancel"]</NavLink>
|
||||||
|
|
||||||
<hr class="app-rule" />
|
<hr class="app-rule" />
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<Pager Items="@userroles">
|
<Pager Items="@userroles">
|
||||||
<Header>
|
<Header>
|
||||||
<th>Users</th>
|
<th>@Localizer["Users"]</th>
|
||||||
<th> </th>
|
<th> </th>
|
||||||
</Header>
|
</Header>
|
||||||
<Row>
|
<Row>
|
||||||
<td>@context.User.DisplayName</td>
|
<td>@context.User.DisplayName</td>
|
||||||
<td>
|
<td>
|
||||||
<button type="button" class="btn btn-danger" @onclick=@(async () => await DeleteUserRole(context.UserRoleId))>Delete</button>
|
<button type="button" class="btn btn-danger" @onclick=@(async () => await DeleteUserRole(context.UserRoleId))>@Localizer["Delete"]</button>
|
||||||
</td>
|
</td>
|
||||||
</Row>
|
</Row>
|
||||||
</Pager>
|
</Pager>
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
@using Microsoft.AspNetCore.Components.Authorization
|
@using Microsoft.AspNetCore.Components.Authorization
|
||||||
@using Microsoft.AspNetCore.Components.Routing
|
@using Microsoft.AspNetCore.Components.Routing
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
@using Microsoft.AspNetCore.Components.Web
|
||||||
|
@using Microsoft.Extensions.Localization
|
||||||
@using Microsoft.JSInterop
|
@using Microsoft.JSInterop
|
||||||
|
|
||||||
@using Oqtane.Models
|
@using Oqtane.Models
|
||||||
|
|
Loading…
Reference in New Issue
Block a user