Localize components of the pages
This commit is contained in:
		| @ -1,17 +1,17 @@ | ||||
| @namespace Oqtane.Modules.Admin.Pages | ||||
| @namespace Oqtane.Modules.Admin.Pages | ||||
| @inherits ModuleBase | ||||
| @inject NavigationManager NavigationManager | ||||
| @inject IPageService PageService | ||||
| @inject IThemeService  ThemeService | ||||
|  | ||||
| <TabStrip> | ||||
|     <TabPanel Name="Settings"> | ||||
|     <TabPanel Name="Settings" ResourceKey="Settings"> | ||||
|         @if (_themeList != null) | ||||
|         { | ||||
|             <table class="table table-borderless"> | ||||
|                 <tr> | ||||
|                     <td> | ||||
|                         <Label For="Name" HelpText="Enter the page name">Name: </Label> | ||||
|                         <Label For="Name" HelpText="Enter the page name" ResourceKey="Name">Name: </Label> | ||||
|                     </td> | ||||
|                     <td> | ||||
|                         <input id="Name" class="form-control" @bind="@_name" /> | ||||
| @ -19,7 +19,7 @@ | ||||
|                 </tr> | ||||
|                 <tr> | ||||
|                     <td> | ||||
|                         <Label For="Parent" HelpText="Select the parent for the page in the site hierarchy">Parent: </Label> | ||||
|                         <Label For="Parent" HelpText="Select the parent for the page in the site hierarchy" ResourceKey="Parent">Parent: </Label> | ||||
|                     </td> | ||||
|                     <td> | ||||
|                         <select id="Parent" class="form-control" @onchange="(e => ParentChanged(e))"> | ||||
| @ -33,7 +33,7 @@ | ||||
|                 </tr> | ||||
|                 <tr> | ||||
|                     <td> | ||||
|                         <Label For="Insert" HelpText="Select the location where you would like the page to be inserted in relation to other pages">Insert: </Label> | ||||
|                         <Label For="Insert" HelpText="Select the location where you would like the page to be inserted in relation to other pages" ResourceKey="Insert">Insert: </Label> | ||||
|                     </td> | ||||
|                     <td> | ||||
|                         <select id="Insert" class="form-control" @bind="@_insert"> | ||||
| @ -59,7 +59,7 @@ | ||||
|                 </tr> | ||||
|                 <tr> | ||||
|                     <td> | ||||
|                         <Label For="Navigation" HelpText="Select whether the page is part of the site navigation or hidden">Navigation? </Label> | ||||
|                         <Label For="Navigation" HelpText="Select whether the page is part of the site navigation or hidden" ResourceKey="Navigation">Navigation? </Label> | ||||
|                     </td> | ||||
|                     <td> | ||||
|                         <select id="Navigation" class="form-control" @bind="@_isnavigation"> | ||||
| @ -70,7 +70,7 @@ | ||||
|                 </tr> | ||||
|                 <tr> | ||||
|                     <td> | ||||
|                         <Label For="Path" HelpText="Optionally enter a url path for this page (ie. home ). If you do not provide a url path, the page name will be used.">Url Path: </Label> | ||||
|                         <Label For="Path" HelpText="Optionally enter a url path for this page (ie. home ). If you do not provide a url path, the page name will be used." ResourceKey="UrlPath">Url Path: </Label> | ||||
|                     </td> | ||||
|                     <td> | ||||
|                         <input id="Path" class="form-control" @bind="@_path" /> | ||||
| @ -78,18 +78,18 @@ | ||||
|                 </tr> | ||||
|                 <tr> | ||||
|                     <td> | ||||
|                         <Label For="Url" HelpText="Optionally enter a url which this page should redirect to when a user navigates to it">Redirect: </Label> | ||||
|                         <Label For="Url" HelpText="Optionally enter a url which this page should redirect to when a user navigates to it" ResourceKey="Redirect">Redirect: </Label> | ||||
|                     </td> | ||||
|                     <td> | ||||
|                         <input id="Url" class="form-control" @bind="@_url" /> | ||||
|                     </td> | ||||
|                 </tr> | ||||
|             </table> | ||||
|             <Section Name="Appearance"> | ||||
|             <Section Name="Appearance" ResourceKey="Appearance"> | ||||
|                 <table class="table table-borderless"> | ||||
|                     <tr> | ||||
|                         <td> | ||||
|                             <Label For="Title" HelpText="Optionally enter the page title. If you do not provide a page title, the page name will be used.">Title: </Label> | ||||
|                             <Label For="Title" HelpText="Optionally enter the page title. If you do not provide a page title, the page name will be used." ResourceKey="Title">Title: </Label> | ||||
|                         </td> | ||||
|                         <td> | ||||
|                             <input id="Title" class="form-control" @bind="@_title" /> | ||||
| @ -97,7 +97,7 @@ | ||||
|                     </tr> | ||||
|                     <tr> | ||||
|                         <td> | ||||
|                             <Label For="Theme" HelpText="Select the theme for this page">Theme: </Label> | ||||
|                             <Label For="Theme" HelpText="Select the theme for this page" ResourceKey="Theme">Theme: </Label> | ||||
|                         </td> | ||||
|                         <td> | ||||
|                             <select id="Theme" class="form-control" @onchange="(e => ThemeChanged(e))"> | ||||
| @ -120,7 +120,7 @@ | ||||
|                     { | ||||
|                         <tr> | ||||
|                             <td> | ||||
|                                 <Label For="Layout" HelpText="Select a layout for the page (if the selected theme supports it)">Layout: </Label> | ||||
|                                 <Label For="Layout" HelpText="Select a layout for the page (if the selected theme supports it)" ResourceKey="Layout">Layout: </Label> | ||||
|                             </td> | ||||
|                             <td> | ||||
|                                 <select id="Layout" class="form-control" @bind="@_layouttype"> | ||||
| @ -142,7 +142,7 @@ | ||||
|                     } | ||||
|                     <tr> | ||||
|                         <td> | ||||
|                             <Label For="defaultContainer" HelpText="Select the default container for the page">Default Container: </Label> | ||||
|                             <Label For="defaultContainer" HelpText="Select the default container for the page" ResourceKey="DefaultContainer">Default Container: </Label> | ||||
|                         </td> | ||||
|                         <td> | ||||
|                             <select id="defaultContainer" class="form-control" @bind="@_containertype"> | ||||
| @ -156,7 +156,7 @@ | ||||
|                     </tr> | ||||
|                     <tr> | ||||
|                         <td> | ||||
|                             <Label For="Icon" HelpText="Optionally provide an icon for this page which will be displayed in the site navigation">Icon: </Label> | ||||
|                             <Label For="Icon" HelpText="Optionally provide an icon for this page which will be displayed in the site navigation" ResourceKey="Icon">Icon: </Label> | ||||
|                         </td> | ||||
|                         <td> | ||||
|                             <input id="Icon" class="form-control" @bind="@_icon" /> | ||||
| @ -164,7 +164,7 @@ | ||||
|                     </tr> | ||||
|                     <tr> | ||||
|                         <td> | ||||
|                             <Label For="Personalizable" HelpText="Select whether you would like users to be able to personalize this page with their own content">Personalizable? </Label> | ||||
|                             <Label For="Personalizable" HelpText="Select whether you would like users to be able to personalize this page with their own content" ResourceKey="Personalizable">Personalizable? </Label> | ||||
|                         </td> | ||||
|                         <td> | ||||
|                             <select id="Personalizable" class="form-control" @bind="@_ispersonalizable"> | ||||
| @ -177,7 +177,7 @@ | ||||
|             </Section> | ||||
|         } | ||||
|     </TabPanel> | ||||
|     <TabPanel Name="Permissions"> | ||||
|     <TabPanel Name="Permissions" ResourceKey="Permissions"> | ||||
|         <table class="table table-borderless"> | ||||
|             <tr> | ||||
|                 <td> | ||||
|  | ||||
| @ -1,17 +1,17 @@ | ||||
| @namespace Oqtane.Modules.Admin.Pages | ||||
| @namespace Oqtane.Modules.Admin.Pages | ||||
| @inherits ModuleBase | ||||
| @inject NavigationManager NavigationManager | ||||
| @inject IPageService PageService | ||||
| @inject IThemeService  ThemeService | ||||
|  | ||||
| <TabStrip> | ||||
|     <TabPanel Name="Settings"> | ||||
|     <TabPanel Name="Settings" ResourceKey="Settings"> | ||||
|         @if (_themeList != null) | ||||
|         { | ||||
|             <table class="table table-borderless"> | ||||
|                 <tr> | ||||
|                     <td> | ||||
|                         <Label For="Name" HelpText="Enter the page name">Name: </Label> | ||||
|                         <Label For="Name" HelpText="Enter the page name" ResourceKey="Name">Name: </Label> | ||||
|                     </td> | ||||
|                     <td> | ||||
|                         <input id="Name" class="form-control" @bind="@_name" /> | ||||
| @ -19,7 +19,7 @@ | ||||
|                 </tr> | ||||
|                 <tr> | ||||
|                     <td> | ||||
|                         <Label For="Parent" HelpText="Select the parent for the page in the site hierarchy">Parent: </Label> | ||||
|                         <Label For="Parent" HelpText="Select the parent for the page in the site hierarchy" ResourceKey="Parent">Parent: </Label> | ||||
|                     </td> | ||||
|                     <td> | ||||
|                         <select id="Parent" class="form-control" @onchange="(e => ParentChanged(e))"> | ||||
| @ -40,7 +40,7 @@ | ||||
|                 </tr> | ||||
|                 <tr> | ||||
|                     <td> | ||||
|                         <Label For="Move" HelpText="Select the location where you would like the page to be moved in relation to other pages">Move: </Label> | ||||
|                         <Label For="Move" HelpText="Select the location where you would like the page to be moved in relation to other pages" ResourceKey="Move">Move: </Label> | ||||
|                     </td> | ||||
|                     <td> | ||||
|                         <select id="Move" class="form-control" @bind="@_insert"> | ||||
| @ -70,7 +70,7 @@ | ||||
|                 </tr> | ||||
|                 <tr> | ||||
|                     <td> | ||||
|                         <Label For="Navigation" HelpText="Select whether the page is part of the site navigation or hidden">Navigation? </Label> | ||||
|                         <Label For="Navigation" HelpText="Select whether the page is part of the site navigation or hidden" ResourceKey="Navigation">Navigation? </Label> | ||||
|                     </td> | ||||
|                     <td> | ||||
|                         <select id="Navigation" class="form-control" @bind="@_isnavigation"> | ||||
| @ -81,7 +81,7 @@ | ||||
|                 </tr> | ||||
|                 <tr> | ||||
|                     <td> | ||||
|                         <Label For="Path" HelpText="Optionally enter a url path for this page (ie. home ). If you do not provide a url path, the page name will be used.">Url Path: </Label> | ||||
|                         <Label For="Path" HelpText="Optionally enter a url path for this page (ie. home ). If you do not provide a url path, the page name will be used." ResourceKey="UrlPath">Url Path: </Label> | ||||
|                     </td> | ||||
|                     <td> | ||||
|                         <input id="Path" class="form-control" @bind="@_path" /> | ||||
| @ -89,18 +89,18 @@ | ||||
|                 </tr> | ||||
|                 <tr> | ||||
|                     <td> | ||||
|                         <Label For="Url" HelpText="Optionally enter a url which this page should redirect to when a user navigates to it">Redirect: </Label> | ||||
|                         <Label For="Url" HelpText="Optionally enter a url which this page should redirect to when a user navigates to it" ResourceKey="Redirect">Redirect: </Label> | ||||
|                     </td> | ||||
|                     <td> | ||||
|                         <input id="Url" class="form-control" @bind="@_url" /> | ||||
|                     </td> | ||||
|                 </tr> | ||||
|             </table> | ||||
|             <Section Name="Appearance"> | ||||
|             <Section Name="Appearance" ResourceKey="Appearance"> | ||||
|                 <table class="table table-borderless"> | ||||
|                     <tr> | ||||
|                         <td> | ||||
|                             <Label For="Title" HelpText="Optionally enter the page title. If you do not provide a page title, the page name will be used.">Title: </Label> | ||||
|                             <Label For="Title" HelpText="Optionally enter the page title. If you do not provide a page title, the page name will be used." ResourceKey="Title">Title: </Label> | ||||
|                         </td> | ||||
|                         <td> | ||||
|                             <input id="Title" class="form-control" @bind="@_title" /> | ||||
| @ -108,7 +108,7 @@ | ||||
|                     </tr> | ||||
|                     <tr> | ||||
|                         <td> | ||||
|                             <Label For="Theme" HelpText="Select the theme for this page">Theme: </Label> | ||||
|                             <Label For="Theme" HelpText="Select the theme for this page" ResourceKey="Theme">Theme: </Label> | ||||
|                         </td> | ||||
|                         <td> | ||||
|                             <select id="Theme" class="form-control" @onchange="(e => ThemeChanged(e))"> | ||||
| @ -131,7 +131,7 @@ | ||||
|                     { | ||||
|                         <tr> | ||||
|                             <td> | ||||
|                                 <Label For="Layout" HelpText="Select a layout for the page (if the selected theme supports it)">Layout: </Label> | ||||
|                                 <Label For="Layout" HelpText="Select a layout for the page (if the selected theme supports it)" ResourceKey="Layout">Layout: </Label> | ||||
|                             </td> | ||||
|                             <td> | ||||
|                                 <select id="Layout" class="form-control" @bind="@_layouttype"> | ||||
| @ -153,7 +153,7 @@ | ||||
|                     } | ||||
|                     <tr> | ||||
|                         <td> | ||||
|                             <Label For="defaultContainer" HelpText="Select the default container for the page">Default Container: </Label> | ||||
|                             <Label For="defaultContainer" HelpText="Select the default container for the page" ResourceKey="DefaultContainer">Default Container: </Label> | ||||
|                         </td> | ||||
|                         <td> | ||||
|                             <select id="defaultContainer" class="form-control" @bind="@_containertype"> | ||||
| @ -167,7 +167,7 @@ | ||||
|                     </tr> | ||||
|                     <tr> | ||||
|                         <td> | ||||
|                             <Label For="Icon" HelpText="Optionally provide an icon for this page which will be displayed in the site navigation">Icon: </Label> | ||||
|                             <Label For="Icon" HelpText="Optionally provide an icon for this page which will be displayed in the site navigation" ResourceKey="Icon">Icon: </Label> | ||||
|                         </td> | ||||
|                         <td> | ||||
|                             <input id="Icon" class="form-control" @bind="@_icon" /> | ||||
| @ -175,7 +175,7 @@ | ||||
|                     </tr> | ||||
|                     <tr> | ||||
|                         <td> | ||||
|                             <Label For="Personalizable" HelpText="Select whether you would like users to be able to personalize this page with their own content">Personalizable? </Label> | ||||
|                             <Label For="Personalizable" HelpText="Select whether you would like users to be able to personalize this page with their own content" ResourceKey="Personalizable">Personalizable? </Label> | ||||
|                         </td> | ||||
|                         <td> | ||||
|                             <select id="Personalizable" class="form-control" @bind="@_ispersonalizable"> | ||||
| @ -190,7 +190,7 @@ | ||||
|             <AuditInfo CreatedBy="@_createdby" CreatedOn="@_createdon" ModifiedBy="@_modifiedby" ModifiedOn="@_modifiedon" DeletedBy="@_deletedby" DeletedOn="@_deletedon"></AuditInfo> | ||||
|         } | ||||
|     </TabPanel> | ||||
|     <TabPanel Name="Permissions"> | ||||
|     <TabPanel Name="Permissions" ResourceKey="Permissions"> | ||||
|         @if (_permissions != null) | ||||
|         { | ||||
|             <table class="table table-borderless"> | ||||
|  | ||||
| @ -1,11 +1,11 @@ | ||||
| @namespace Oqtane.Modules.Admin.Pages | ||||
| @namespace Oqtane.Modules.Admin.Pages | ||||
| @inherits ModuleBase | ||||
| @inject NavigationManager NavigationManager | ||||
| @inject IPageService PageService | ||||
|  | ||||
| @if (PageState.Pages != null) | ||||
| { | ||||
|     <ActionLink Action="Add" Text="Add Page" /> | ||||
|     <ActionLink Action="Add" Text="Add Page" ResourceKey="AddPage" /> | ||||
|  | ||||
|     <Pager Items="@PageState.Pages.Where(item => !item.IsDeleted)"> | ||||
|         <Header> | ||||
| @ -14,8 +14,8 @@ | ||||
|             <th>Name</th> | ||||
|         </Header> | ||||
|         <Row> | ||||
|             <td><ActionLink Action="Edit" Parameters="@($"id=" + context.PageId.ToString())" /></td> | ||||
|             <td><ActionDialog Header="Delete Page" Message="@("Are You Sure You Wish To Delete The " + context.Name + " Page?")" Action="Delete" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeletePage(context))" /></td> | ||||
|             <td><ActionLink Action="Edit" Parameters="@($"id=" + context.PageId.ToString())" ResourceKey="EditPage" /></td> | ||||
|             <td><ActionDialog Header="Delete Page" Message="@("Are You Sure You Wish To Delete The " + context.Name + " Page?")" Action="Delete" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeletePage(context))" ResourceKey="DeletePage" /></td> | ||||
|             <td>@(new string('-', context.Level * 2))@(context.Name)</td> | ||||
|         </Row> | ||||
|     </Pager> | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 hishamco
					hishamco