Merge pull request #3425 from thabaum/net8-UserProfile-Index-Fix

UserProfile/Index.razor: Notifications Formatting and No Notifications Message - Fixes #3413, #3415
This commit is contained in:
Shaun Walker
2023-10-23 11:33:31 -04:00
committed by GitHub
2 changed files with 112 additions and 88 deletions

View File

@ -165,8 +165,11 @@ else
</select>
<br />
<ActionLink Action="Add" Text="Send Notification" Security="SecurityAccessLevel.View" EditMode="false" ResourceKey="SendNotification" />
<br /><br />
<br />
<br />
@if (filter == "to")
{
@if (notifications.Any())
{
<Pager Items="@notifications">
<Header>
@ -217,13 +220,24 @@ else
</td>
</Detail>
</Pager>
<br />
<ActionDialog Header="Clear Notifications" Message="Are You Sure You Wish To Permanently Delete All Notifications ?" Action="Delete All Notifications" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeleteAllNotifications())" ResourceKey="DeleteAllNotifications" />
}
else
{
<div class="no-notifications-text">
@Localizer["NoNotificationsReceived.Text"]
</div>
}
}
else
{
@if (notifications.Any())
{
<Pager Items="@notifications">
<Header>
<th>&nbsp;</th>
<th>&nbsp;</th>
<th style="width: 1px;"></th>
<th style="width: 1px;"></th>
<th>@Localizer["To"]</th>
<th>@Localizer["Subject"]</th>
<th>@Localizer["Sent"]</th>
@ -270,12 +284,16 @@ else
</td>
</Detail>
</Pager>
}
@if (notifications.Any())
{
<br />
<ActionDialog Header="Clear Notifications" Message="Are You Sure You Wish To Permanently Delete All Notifications ?" Action="Delete All Notifications" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeleteAllNotifications())" ResourceKey="DeleteAllNotifications" />
}
else
{
<div class="no-notifications-text">
@Localizer["NoNotificationsSent.Text"]
</div>
}
}
}
</TabPanel>
</TabStrip>

View File

@ -234,4 +234,10 @@
<data name="DeleteNotification.Text" xml:space="preserve">
<value>Delete</value>
</data>
<data name="NoNotificationsReceived.Text" xml:space="preserve">
<value>You have no notifications received.</value>
</data>
<data name="NoNotificationsSent.Text" xml:space="preserve">
<value>You have no sent notififications.</value>
</data>
</root>