Localize components of sites page

This commit is contained in:
hishamco 2020-11-18 00:09:51 +03:00
parent 2b371b2a9f
commit 236a4bd3d9
3 changed files with 29 additions and 29 deletions

View File

@ -1,4 +1,4 @@
@namespace Oqtane.Modules.Admin.Sites @namespace Oqtane.Modules.Admin.Sites
@inherits ModuleBase @inherits ModuleBase
@inject NavigationManager NavigationManager @inject NavigationManager NavigationManager
@inject ITenantService TenantService @inject ITenantService TenantService
@ -18,7 +18,7 @@ else
<table class="table table-borderless"> <table class="table table-borderless">
<tr> <tr>
<td> <td>
<Label For="name" HelpText="Enter the name of the site">Site Name: </Label> <Label For="name" HelpText="Enter the name of the site" ResourceKey="Name">Site Name: </Label>
</td> </td>
<td> <td>
<input id="name" class="form-control" @bind="@_name" /> <input id="name" class="form-control" @bind="@_name" />
@ -26,7 +26,7 @@ else
</tr> </tr>
<tr> <tr>
<td> <td>
<Label For="alias" HelpText="Enter the alias for the server">Aliases: </Label> <Label For="alias" HelpText="Enter the alias for the server" ResourceKey="Aliases">Aliases: </Label>
</td> </td>
<td> <td>
<textarea id="alias" class="form-control" @bind="@_urls" rows="3"></textarea> <textarea id="alias" class="form-control" @bind="@_urls" rows="3"></textarea>
@ -34,7 +34,7 @@ else
</tr> </tr>
<tr> <tr>
<td> <td>
<Label For="defaultTheme" HelpText="Select the default theme for the website">Default Theme: </Label> <Label For="defaultTheme" HelpText="Select the default theme for the website" ResourceKey="DefaultTheme">Default Theme: </Label>
</td> </td>
<td> <td>
<select id="defaultTheme" class="form-control" @onchange="(e => ThemeChanged(e))"> <select id="defaultTheme" class="form-control" @onchange="(e => ThemeChanged(e))">
@ -50,7 +50,7 @@ else
{ {
<tr> <tr>
<td> <td>
<Label For="defaultLayout" HelpText="Select the default layout for the site">Default Layout: </Label> <Label For="defaultLayout" HelpText="Select the default layout for the site" ResourceKey="DefaultLayout">Default Layout: </Label>
</td> </td>
<td> <td>
<select id="defaultLayout" class="form-control" @bind="@_layouttype"> <select id="defaultLayout" class="form-control" @bind="@_layouttype">
@ -65,7 +65,7 @@ else
} }
<tr> <tr>
<td> <td>
<Label For="defaultContainer" HelpText="Select the default container for the site">Default Container: </Label> <Label For="defaultContainer" HelpText="Select the default container for the site" ResourceKey="DefaultContainer">Default Container: </Label>
</td> </td>
<td> <td>
<select id="defaultContainer" class="form-control" @bind="@_containertype"> <select id="defaultContainer" class="form-control" @bind="@_containertype">
@ -79,7 +79,7 @@ else
</tr> </tr>
<tr> <tr>
<td> <td>
<Label For="siteTemplate" HelpText="Select the site template">Site Template: </Label> <Label For="siteTemplate" HelpText="Select the site template" ResourceKey="SiteTemplate">Site Template: </Label>
</td> </td>
<td> <td>
<select id="siteTemplate" class="form-control" @bind="@_sitetemplatetype"> <select id="siteTemplate" class="form-control" @bind="@_sitetemplatetype">
@ -93,7 +93,7 @@ else
</tr> </tr>
<tr> <tr>
<td> <td>
<Label For="tenant" HelpText="Select the tenant for the site">Tenant: </Label> <Label For="tenant" HelpText="Select the tenant for the site" ResourceKey="Tenant">Tenant: </Label>
</td> </td>
<td> <td>
<select id="tenant" class="form-control" @onchange="(e => TenantChanged(e))"> <select id="tenant" class="form-control" @onchange="(e => TenantChanged(e))">
@ -115,7 +115,7 @@ else
</tr> </tr>
<tr> <tr>
<td> <td>
<Label For="name" HelpText="Enter the name for the tenant">Tenant Name: </Label> <Label For="name" HelpText="Enter the name for the tenant" ResourceKey="TenantName">Tenant Name: </Label>
</td> </td>
<td> <td>
<input id="name" class="form-control" @bind="@_tenantname" /> <input id="name" class="form-control" @bind="@_tenantname" />
@ -123,7 +123,7 @@ else
</tr> </tr>
<tr> <tr>
<td> <td>
<Label For="databaseType" HelpText="Select the database type for the tenant">Database Type: </Label> <Label For="databaseType" HelpText="Select the database type for the tenant" ResourceKey="DatabaseType">Database Type: </Label>
</td> </td>
<td> <td>
<select id="databaseType" class="custom-select" @bind="@_databasetype"> <select id="databaseType" class="custom-select" @bind="@_databasetype">
@ -134,7 +134,7 @@ else
</tr> </tr>
<tr> <tr>
<td> <td>
<Label For="server" HelpText="Enter the server for the tenant">Server: </Label> <Label For="server" HelpText="Enter the server for the tenant" ResourceKey="DatabaseServer">Server: </Label>
</td> </td>
<td> <td>
<input id="server" type="text" class="form-control" @bind="@_server" /> <input id="server" type="text" class="form-control" @bind="@_server" />
@ -142,7 +142,7 @@ else
</tr> </tr>
<tr> <tr>
<td> <td>
<Label For="database" HelpText="Enter the database for the tenant">Database: </Label> <Label For="database" HelpText="Enter the database for the tenant" ResourceKey="Database">Database: </Label>
</td> </td>
<td> <td>
<input id="database" type="text" class="form-control" @bind="@_database" /> <input id="database" type="text" class="form-control" @bind="@_database" />
@ -150,7 +150,7 @@ else
</tr> </tr>
<tr> <tr>
<td> <td>
<Label For="integratedSecurity" HelpText="Select if you want integrated security or not">Integrated Security: </Label> <Label For="integratedSecurity" HelpText="Select if you want integrated security or not" ResourceKey="IntegratedSecurity">Integrated Security: </Label>
</td> </td>
<td> <td>
<select id="integratedSecurity" class="custom-select" @onchange="SetIntegratedSecurity"> <select id="integratedSecurity" class="custom-select" @onchange="SetIntegratedSecurity">
@ -163,7 +163,7 @@ else
{ {
<tr> <tr>
<td> <td>
<Label For="username" HelpText="Enter the username for the integrated security">Database Username: </Label> <Label For="username" HelpText="Enter the username for the integrated security" ResourceKey="DatabaseUsername">Database Username: </Label>
</td> </td>
<td> <td>
<input id="username" type="text" class="form-control" @bind="@_username" /> <input id="username" type="text" class="form-control" @bind="@_username" />
@ -171,7 +171,7 @@ else
</tr> </tr>
<tr> <tr>
<td> <td>
<Label For="password" HelpText="Enter the password for the integrated security">Database Password: </Label> <Label For="password" HelpText="Enter the password for the integrated security" ResourceKey="DatabasePassword">Database Password: </Label>
</td> </td>
<td> <td>
<input id="password" type="password" class="form-control" @bind="@_password" /> <input id="password" type="password" class="form-control" @bind="@_password" />
@ -180,7 +180,7 @@ else
} }
<tr> <tr>
<td> <td>
<Label For="hostUsername" HelpText="Enter the username of the host for this site">Host Username:</Label> <Label For="hostUsername" HelpText="Enter the username of the host for this site" ResourceKey="HostUsername">Host Username:</Label>
</td> </td>
<td> <td>
<input id="hostUsername" class="form-control" @bind="@_hostusername" readonly /> <input id="hostUsername" class="form-control" @bind="@_hostusername" readonly />
@ -188,7 +188,7 @@ else
</tr> </tr>
<tr> <tr>
<td> <td>
<Label For="hostPassword" HelpText="Enter the password for the host of this site">Host Password:</Label> <Label For="hostPassword" HelpText="Enter the password for the host of this site" ResourceKey="HostPassword">Host Password:</Label>
</td> </td>
<td> <td>
<input id="hostPassword" type="password" class="form-control" @bind="@_hostpassword" /> <input id="hostPassword" type="password" class="form-control" @bind="@_hostpassword" />

View File

@ -1,4 +1,4 @@
@namespace Oqtane.Modules.Admin.Sites @namespace Oqtane.Modules.Admin.Sites
@inherits ModuleBase @inherits ModuleBase
@inject NavigationManager NavigationManager @inject NavigationManager NavigationManager
@inject ISiteService SiteService @inject ISiteService SiteService
@ -11,7 +11,7 @@
<table class="table table-borderless"> <table class="table table-borderless">
<tr> <tr>
<td> <td>
<Label For="name" HelpText="Enter the name of the site">Name: </Label> <Label For="name" HelpText="Enter the name of the site" ResourceKey="Name">Name: </Label>
</td> </td>
<td> <td>
<input id="name" class="form-control" @bind="@_name" /> <input id="name" class="form-control" @bind="@_name" />
@ -19,7 +19,7 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<Label For="tenant" HelpText="Enter the tenant for the site">Tenant: </Label> <Label For="tenant" HelpText="Enter the tenant for the site" ResourceKey="Tenant">Tenant: </Label>
</td> </td>
<td> <td>
<input id="tenant" class="form-control" @bind="@_tenant" readonly /> <input id="tenant" class="form-control" @bind="@_tenant" readonly />
@ -27,7 +27,7 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<Label For="alias" HelpText="Enter the alias for the server">Aliases: </Label> <Label For="alias" HelpText="Enter the alias for the server" ResourceKey="Aliases">Aliases: </Label>
</td> </td>
<td> <td>
<textarea id="alias" class="form-control" @bind="@_urls" rows="3" /> <textarea id="alias" class="form-control" @bind="@_urls" rows="3" />
@ -35,7 +35,7 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<Label For="defaultTheme" HelpText="Select the default theme for the website">Default Theme: </Label> <Label For="defaultTheme" HelpText="Select the default theme for the website" ResourceKey="DefaultTheme">Default Theme: </Label>
</td> </td>
<td> <td>
<select id="defaultTheme" class="form-control" @onchange="(e => ThemeChanged(e))"> <select id="defaultTheme" class="form-control" @onchange="(e => ThemeChanged(e))">
@ -58,7 +58,7 @@
{ {
<tr> <tr>
<td> <td>
<Label For="defaultLayout" HelpText="Select the default layout for the site">Default Layout: </Label> <Label For="defaultLayout" HelpText="Select the default layout for the site" ResourceKey="DefaultLayout">Default Layout: </Label>
</td> </td>
<td> <td>
<select id="defaultLayout" class="form-control" @bind="@_layouttype"> <select id="defaultLayout" class="form-control" @bind="@_layouttype">
@ -73,7 +73,7 @@
} }
<tr> <tr>
<td> <td>
<Label For="defaultContainer" HelpText="Select the default container for the site">Default Container: </Label> <Label For="defaultContainer" HelpText="Select the default container for the site" ResourceKey="DefaultContainer">Default Container: </Label>
</td> </td>
<td> <td>
<select id="defaultIdea" class="form-control" @bind="@_containertype"> <select id="defaultIdea" class="form-control" @bind="@_containertype">
@ -87,7 +87,7 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<Label For="isDeleted" HelpText="Has this site been deleted?">Is Deleted? </Label> <Label For="isDeleted" HelpText="Has this site been deleted?" ResourceKey="IsDeleted">Is Deleted? </Label>
</td> </td>
<td> <td>
<select id="isDeleted" class="form-control" @bind="@_isdeleted"> <select id="isDeleted" class="form-control" @bind="@_isdeleted">

View File

@ -1,4 +1,4 @@
@namespace Oqtane.Modules.Admin.Sites @namespace Oqtane.Modules.Admin.Sites
@inherits ModuleBase @inherits ModuleBase
@inject NavigationManager NavigationManager @inject NavigationManager NavigationManager
@inject IAliasService AliasService @inject IAliasService AliasService
@ -10,7 +10,7 @@
} }
else else
{ {
<ActionLink Action="Add" Text="Add Site" /> <ActionLink Action="Add" Text="Add Site" ResourceKey="AddSite" />
<Pager Items="@_sites"> <Pager Items="@_sites">
<Header> <Header>
@ -19,8 +19,8 @@ else
<th>Name</th> <th>Name</th>
</Header> </Header>
<Row> <Row>
<td><ActionLink Action="Edit" Parameters="@($"id=" + context.AliasId.ToString())" /></td> <td><ActionLink Action="Edit" Parameters="@($"id=" + context.AliasId.ToString())" ResourceKey="EditSite" /></td>
<td><ActionDialog Header="Delete Site" Message="@("Are You Sure You Wish To Delete The " + context.Name + " Site?")" Action="Delete" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeleteSite(context))" /></td> <td><ActionDialog Header="Delete Site" Message="@("Are You Sure You Wish To Delete The " + context.Name + " Site?")" Action="Delete" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeleteSite(context))" ResourceKey="DeleteSite" /></td>
<td><a href="@(_scheme + context.Name)">@context.Name</a></td> <td><a href="@(_scheme + context.Name)">@context.Name</a></td>
</Row> </Row>
</Pager> </Pager>