Localize non components strings in roles pages
This commit is contained in:
		| @ -1,7 +1,8 @@ | ||||
| @namespace Oqtane.Modules.Admin.Roles | ||||
| @namespace Oqtane.Modules.Admin.Roles | ||||
| @inherits ModuleBase | ||||
| @inject NavigationManager NavigationManager | ||||
| @inject IRoleService RoleService | ||||
| @inject IStringLocalizer<Add> Localizer | ||||
|  | ||||
| <table class="table table-borderless"> | ||||
|     <tr> | ||||
| @ -26,16 +27,16 @@ | ||||
|         </td> | ||||
|         <td> | ||||
|             <select id="isautoassigned" class="form-control" @bind="@_isautoassigned"> | ||||
|                 <option value="True">Yes</option> | ||||
|                 <option value="False">No</option> | ||||
|                 <option value="True">@Localizer["Yes"]</option> | ||||
|                 <option value="False">@Localizer["No"]</option> | ||||
|             </select> | ||||
|         </td> | ||||
|     </tr> | ||||
| </table> | ||||
| <button type="button" class="btn btn-success" @onclick="SaveRole">Save</button> | ||||
| <NavLink class="btn btn-secondary" href="@NavigateUrl()">Cancel</NavLink> | ||||
| <button type="button" class="btn btn-success" @onclick="SaveRole">@Localizer["Save"]</button> | ||||
| <NavLink class="btn btn-secondary" href="@NavigateUrl()">@Localizer["Cancel"]</NavLink> | ||||
|  | ||||
| @code {  | ||||
| @code { | ||||
|     private string _name = string.Empty; | ||||
|     private string _description = string.Empty; | ||||
|     private string _isautoassigned = "False"; | ||||
|  | ||||
| @ -1,7 +1,8 @@ | ||||
| @namespace Oqtane.Modules.Admin.Roles | ||||
| @namespace Oqtane.Modules.Admin.Roles | ||||
| @inherits ModuleBase | ||||
| @inject NavigationManager NavigationManager | ||||
| @inject IRoleService RoleService | ||||
| @inject IStringLocalizer<Edit> Localizer | ||||
|  | ||||
| <table class="table table-borderless"> | ||||
|     <tr> | ||||
| @ -26,14 +27,14 @@ | ||||
|         </td> | ||||
|         <td> | ||||
|             <select id="isautoassigned" class="form-control" @bind="@_isautoassigned"> | ||||
|                 <option value="True">Yes</option> | ||||
|                 <option value="False">No</option> | ||||
|                 <option value="True">@Localizer["Yes"]</option> | ||||
|                 <option value="False">@Localizer["No"]</option> | ||||
|             </select> | ||||
|         </td> | ||||
|     </tr> | ||||
| </table> | ||||
| <button type="button" class="btn btn-success" @onclick="SaveRole">Save</button> | ||||
| <NavLink class="btn btn-secondary" href="@NavigateUrl()">Cancel</NavLink> | ||||
| <button type="button" class="btn btn-success" @onclick="SaveRole">@Localizer["Save"]</button> | ||||
| <NavLink class="btn btn-secondary" href="@NavigateUrl()">@Localizer["Cancel"]</NavLink> | ||||
|  | ||||
| @code { | ||||
|     private int _roleid; | ||||
|  | ||||
| @ -1,10 +1,11 @@ | ||||
| @namespace Oqtane.Modules.Admin.Roles | ||||
| @namespace Oqtane.Modules.Admin.Roles | ||||
| @inherits ModuleBase | ||||
| @inject IRoleService RoleService | ||||
| @inject IStringLocalizer<Index> Localizer | ||||
|  | ||||
| @if (_roles == null) | ||||
| { | ||||
|     <p><em>Loading...</em></p> | ||||
|     <p><em>@Localizer["Loading..."]</em></p> | ||||
| } | ||||
| else | ||||
| { | ||||
| @ -15,7 +16,7 @@ else | ||||
|             <th style="width: 1px;"> </th> | ||||
|             <th style="width: 1px;"> </th> | ||||
|             <th style="width: 1px;"> </th> | ||||
|             <th>Name</th> | ||||
|             <th>@Localizer["Name"]</th> | ||||
|         </Header> | ||||
|         <Row> | ||||
|             <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 | ||||
| @inject IRoleService RoleService | ||||
| @inject IUserRoleService UserRoleService | ||||
| @inject IStringLocalizer<Users> Localizer | ||||
|  | ||||
| @if (userroles == null) | ||||
| { | ||||
|     <p><em>Loading...</em></p> | ||||
|     <p><em>@Localizer["Loading..."]</em></p> | ||||
| } | ||||
| else | ||||
| { | ||||
| @ -49,20 +50,20 @@ else | ||||
|             </td> | ||||
|         </tr> | ||||
|     </table> | ||||
|     <button type="button" class="btn btn-success" @onclick="SaveUserRole">Save</button> | ||||
|     <NavLink class="btn btn-secondary" href="@NavigateUrl()">Cancel</NavLink> | ||||
|     <button type="button" class="btn btn-success" @onclick="SaveUserRole">@Localizer["Save"]</button> | ||||
|     <NavLink class="btn btn-secondary" href="@NavigateUrl()">@Localizer["Cancel"]</NavLink> | ||||
|  | ||||
|     <hr class="app-rule" /> | ||||
|     <p align="center"> | ||||
|         <Pager Items="@userroles"> | ||||
|             <Header> | ||||
|                 <th>Users</th> | ||||
|                 <th>@Localizer["Users"]</th> | ||||
|                 <th> </th> | ||||
|             </Header> | ||||
|             <Row> | ||||
|                 <td>@context.User.DisplayName</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> | ||||
|             </Row> | ||||
|         </Pager> | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 hishamco
					hishamco