Merge pull request #894 from hishamco/localize-user-profiles-pages
Localize User Profile Pages
This commit is contained in:
commit
bd198fef7b
|
@ -1,15 +1,16 @@
|
||||||
@namespace Oqtane.Modules.Admin.UserProfile
|
@namespace Oqtane.Modules.Admin.UserProfile
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IUserService UserService
|
@inject IUserService UserService
|
||||||
@inject INotificationService NotificationService
|
@inject INotificationService NotificationService
|
||||||
|
@inject IStringLocalizer<Add> Localizer
|
||||||
|
|
||||||
@if (PageState.User != null)
|
@if (PageState.User != null)
|
||||||
{
|
{
|
||||||
<table class="table table-borderless">
|
<table class="table table-borderless">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<Label For="to" HelpText="Enter the username you wish to send a message to">To: </Label>
|
<Label For="to" HelpText="Enter the username you wish to send a message to" ResourceKey="To">To: </Label>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input id="to" class="form-control" @bind="@username" />
|
<input id="to" class="form-control" @bind="@username" />
|
||||||
|
@ -17,7 +18,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<Label For="subject" HelpText="Enter the subject of the message">Subject: </Label>
|
<Label For="subject" HelpText="Enter the subject of the message" ResourceKey="Subject">Subject: </Label>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input id="subject" class="form-control" @bind="@subject" />
|
<input id="subject" class="form-control" @bind="@subject" />
|
||||||
|
@ -25,15 +26,15 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<Label For="message" HelpText="Enter the message">Message: </Label>
|
<Label For="message" HelpText="Enter the message" ResourceKey="Message">Message: </Label>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<textarea id="message" class="form-control" @bind="@body" rows="5" />
|
<textarea id="message" class="form-control" @bind="@body" rows="5" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<button type="button" class="btn btn-primary" @onclick="Send">Send</button>
|
<button type="button" class="btn btn-primary" @onclick="Send">@Localizer["Send"]</button>
|
||||||
<NavLink class="btn btn-secondary" href="@NavigateUrl()">Cancel</NavLink>
|
<NavLink class="btn btn-secondary" href="@NavigateUrl()">@Localizer["Cancel"]</NavLink>
|
||||||
}
|
}
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
@inject IProfileService ProfileService
|
@inject IProfileService ProfileService
|
||||||
@inject ISettingService SettingService
|
@inject ISettingService SettingService
|
||||||
@inject INotificationService NotificationService
|
@inject INotificationService NotificationService
|
||||||
|
@inject IStringLocalizer<Index> Localizer
|
||||||
|
|
||||||
@if (PageState.User != null && photofileid != -1)
|
@if (PageState.User != null && photofileid != -1)
|
||||||
{
|
{
|
||||||
|
@ -15,13 +16,13 @@ else
|
||||||
<br />
|
<br />
|
||||||
}
|
}
|
||||||
<TabStrip>
|
<TabStrip>
|
||||||
<TabPanel Name="Identity">
|
<TabPanel Name="Identity" ResourceKey="Identity">
|
||||||
@if (PageState.User != null)
|
@if (PageState.User != null)
|
||||||
{
|
{
|
||||||
<table class="table table-borderless">
|
<table class="table table-borderless">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<label for="Name" class="control-label">Username: </label>
|
<label for="Name" class="control-label">@Localizer["Username:"] </label>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input class="form-control" @bind="@username" readonly />
|
<input class="form-control" @bind="@username" readonly />
|
||||||
|
@ -29,7 +30,7 @@ else
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<label for="Name" class="control-label">Password: </label>
|
<label for="Name" class="control-label">@Localizer["Password:"] </label>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="password" class="form-control" @bind="@password" autocomplete="new-password" />
|
<input type="password" class="form-control" @bind="@password" autocomplete="new-password" />
|
||||||
|
@ -37,7 +38,7 @@ else
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<label for="Name" class="control-label">Confirm Password: </label>
|
<label for="Name" class="control-label">@Localizer["Confirm Password:"] </label>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="password" class="form-control" @bind="@confirm" autocomplete="new-password" />
|
<input type="password" class="form-control" @bind="@confirm" autocomplete="new-password" />
|
||||||
|
@ -45,7 +46,7 @@ else
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<label for="Name" class="control-label">Email: </label>
|
<label for="Name" class="control-label">@Localizer["Email:"] </label>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input class="form-control" @bind="@email" />
|
<input class="form-control" @bind="@email" />
|
||||||
|
@ -53,7 +54,7 @@ else
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<label for="Name" class="control-label">Full Name: </label>
|
<label for="Name" class="control-label">@Localizer["Full Name:"] </label>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input class="form-control" @bind="@displayname" />
|
<input class="form-control" @bind="@displayname" />
|
||||||
|
@ -61,18 +62,18 @@ else
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<label for="Name" class="control-label">Photo: </label>
|
<label for="Name" class="control-label">@Localizer["Photo:"] </label>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<FileManager FileId="@photofileid" @ref="filemanager" />
|
<FileManager FileId="@photofileid" @ref="filemanager" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<button type="button" class="btn btn-primary" @onclick="Save">Save</button>
|
<button type="button" class="btn btn-primary" @onclick="Save">@Localizer["Save"]</button>
|
||||||
<button type="button" class="btn btn-secondary" @onclick="Cancel">Cancel</button>
|
<button type="button" class="btn btn-secondary" @onclick="Cancel">@Localizer["Cancel"]</button>
|
||||||
}
|
}
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
<TabPanel Name="Profile">
|
<TabPanel Name="Profile" ResourceKey="Profile">
|
||||||
@if (profiles != null && settings != null)
|
@if (profiles != null && settings != null)
|
||||||
{
|
{
|
||||||
<table class="table table-borderless">
|
<table class="table table-borderless">
|
||||||
|
@ -127,14 +128,14 @@ else
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</table>
|
</table>
|
||||||
<button type="button" class="btn btn-primary" @onclick="Save">Save</button>
|
<button type="button" class="btn btn-primary" @onclick="Save">@Localizer["Save"]</button>
|
||||||
<button type="button" class="btn btn-secondary" @onclick="Cancel">Cancel</button>
|
<button type="button" class="btn btn-secondary" @onclick="Cancel">@Localizer["Cancel"]</button>
|
||||||
}
|
}
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
<TabPanel Name="Notifications">
|
<TabPanel Name="Notifications" ResourceKey="Notifications">
|
||||||
@if (notifications != null)
|
@if (notifications != null)
|
||||||
{
|
{
|
||||||
<ActionLink Action="Add" Text="Send Notification" Security="SecurityAccessLevel.View" EditMode="false" />
|
<ActionLink Action="Add" Text="Send Notification" Security="SecurityAccessLevel.View" EditMode="false" ResourceKey="SendNotification" />
|
||||||
<br /><br />
|
<br /><br />
|
||||||
@if (filter == "to")
|
@if (filter == "to")
|
||||||
{
|
{
|
||||||
|
@ -142,13 +143,13 @@ else
|
||||||
<Header>
|
<Header>
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
<th>From</th>
|
<th>@Localizer["From"]</th>
|
||||||
<th>Subject</th>
|
<th>@Localizer["Subject"]</th>
|
||||||
<th>Received</th>
|
<th>@Localizer["Received"]</th>
|
||||||
</Header>
|
</Header>
|
||||||
<Row>
|
<Row>
|
||||||
<td><ActionLink Action="View" Parameters="@($"id=" + context.NotificationId.ToString())" Security="SecurityAccessLevel.View" EditMode="false" /></td>
|
<td><ActionLink Action="View" Parameters="@($"id=" + context.NotificationId.ToString())" Security="SecurityAccessLevel.View" EditMode="false" ResourceKey="ViewNotification" /></td>
|
||||||
<td><ActionDialog Header="Delete Notification" Message="@("Are You Sure You Wish To Delete This Notification?")" Action="Delete" Security="SecurityAccessLevel.View" Class="btn btn-danger" OnClick="@(async () => await Delete(context))" EditMode="false" /></td>
|
<td><ActionDialog Header="Delete Notification" Message="@("Are You Sure You Wish To Delete This Notification?")" Action="Delete" Security="SecurityAccessLevel.View" Class="btn btn-danger" OnClick="@(async () => await Delete(context))" EditMode="false" ResourceKey="DeleteNotification" /></td>
|
||||||
<td>@context.FromDisplayName</td>
|
<td>@context.FromDisplayName</td>
|
||||||
<td>@context.Subject</td>
|
<td>@context.Subject</td>
|
||||||
<td>@context.CreatedOn</td>
|
<td>@context.CreatedOn</td>
|
||||||
|
@ -174,13 +175,13 @@ else
|
||||||
<Header>
|
<Header>
|
||||||
<th> </th>
|
<th> </th>
|
||||||
<th> </th>
|
<th> </th>
|
||||||
<th>To</th>
|
<th>@Localizer["To"]</th>
|
||||||
<th>Subject</th>
|
<th>@Localizer["Subject"]</th>
|
||||||
<th>Sent</th>
|
<th>@Localizer["Sent"]</th>
|
||||||
</Header>
|
</Header>
|
||||||
<Row>
|
<Row>
|
||||||
<td><ActionLink Action="View" Parameters="@($"id=" + context.NotificationId.ToString())" Security="SecurityAccessLevel.View" EditMode="false" /></td>
|
<td><ActionLink Action="View" Parameters="@($"id=" + context.NotificationId.ToString())" Security="SecurityAccessLevel.View" EditMode="false" ResourceKey="ViewNotification" /></td>
|
||||||
<td><ActionDialog Header="Delete Notification" Message="@("Are You Sure You Wish To Delete This Notification?")" Action="Delete" Security="SecurityAccessLevel.View" Class="btn btn-danger" OnClick="@(async () => await Delete(context))" EditMode="false" /></td>
|
<td><ActionDialog Header="Delete Notification" Message="@("Are You Sure You Wish To Delete This Notification?")" Action="Delete" Security="SecurityAccessLevel.View" Class="btn btn-danger" OnClick="@(async () => await Delete(context))" EditMode="false" ResourceKey="DeleteNotification" /></td>
|
||||||
<td>@context.ToDisplayName</td>
|
<td>@context.ToDisplayName</td>
|
||||||
<td>@context.Subject</td>
|
<td>@context.Subject</td>
|
||||||
<td>@context.CreatedOn</td>
|
<td>@context.CreatedOn</td>
|
||||||
|
@ -202,8 +203,8 @@ else
|
||||||
}
|
}
|
||||||
<br /><hr />
|
<br /><hr />
|
||||||
<select class="form-control" @onchange="(e => FilterChanged(e))">
|
<select class="form-control" @onchange="(e => FilterChanged(e))">
|
||||||
<option value="to">Inbox</option>
|
<option value="to">@Localizer["Inbox"]</option>
|
||||||
<option value="from">Sent Items</option>
|
<option value="from">@Localizer["Sent Items"]</option>
|
||||||
</select>
|
</select>
|
||||||
}
|
}
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
@namespace Oqtane.Modules.Admin.UserProfile
|
@namespace Oqtane.Modules.Admin.UserProfile
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IUserService UserService
|
@inject IUserService UserService
|
||||||
@inject INotificationService NotificationService
|
@inject INotificationService NotificationService
|
||||||
|
@inject IStringLocalizer<View> Localizer
|
||||||
|
|
||||||
@if (PageState.User != null)
|
@if (PageState.User != null)
|
||||||
{
|
{
|
||||||
|
@ -26,7 +27,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<label class="control-label">Subject: </label>
|
<label class="control-label">@Localizer["Subject:"] </label>
|
||||||
</td>
|
</td>
|
||||||
@if (title == "From")
|
@if (title == "From")
|
||||||
{
|
{
|
||||||
|
@ -45,7 +46,7 @@
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<label class="control-label">Date: </label>
|
<label class="control-label">@Localizer["Date:"] </label>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input class="form-control" @bind="@createdon" readonly />
|
<input class="form-control" @bind="@createdon" readonly />
|
||||||
|
@ -56,7 +57,7 @@
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<label class="control-label">Message: </label>
|
<label class="control-label">@Localizer["Message:"] </label>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<textarea class="form-control" @bind="@body" rows="5" readonly />
|
<textarea class="form-control" @bind="@body" rows="5" readonly />
|
||||||
|
@ -67,7 +68,7 @@
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<label class="control-label">Message: </label>
|
<label class="control-label">@Localizer["Message:"] </label>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<textarea class="form-control" @bind="@body" rows="5" />
|
<textarea class="form-control" @bind="@body" rows="5" />
|
||||||
|
@ -79,24 +80,26 @@
|
||||||
|
|
||||||
@if (reply != string.Empty)
|
@if (reply != string.Empty)
|
||||||
{
|
{
|
||||||
<button type="button" class="btn btn-primary" @onclick="Send">Send</button> }
|
<button type="button" class="btn btn-primary" @onclick="Send">@Localizer["Send"]</button>
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (title == "From")
|
if (title == "From")
|
||||||
{
|
{
|
||||||
<button type="button" class="btn btn-primary" @onclick="Reply">Reply</button>}
|
<button type="button" class="btn btn-primary" @onclick="Reply">@Localizer["Reply"]</button>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
<NavLink class="btn btn-secondary" href="@NavigateUrl()">Cancel</NavLink>
|
<NavLink class="btn btn-secondary" href="@NavigateUrl()">@Localizer["Cancel"]</NavLink>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
@if (title == "To")
|
@if (title == "To")
|
||||||
{
|
{
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label">Original Message </label>
|
<label class="control-label">@Localizer["Original Message"] </label>
|
||||||
<textarea class="form-control" @bind="@reply" rows="5" readonly />
|
<textarea class="form-control" @bind="@reply" rows="5" readonly />
|
||||||
</div>
|
</div>
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
private int notificationid;
|
private int notificationid;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user