From f6e7460b2468e0fc13c2433a9c76797804bb2b2b Mon Sep 17 00:00:00 2001 From: Cody Date: Fri, 20 Oct 2023 21:31:23 -0700 Subject: [PATCH 1/5] Fix Formatting + Add No Notifictions Message --- .../Modules/Admin/UserProfile/Index.razor | 186 ++++++++++-------- 1 file changed, 100 insertions(+), 86 deletions(-) diff --git a/Oqtane.Client/Modules/Admin/UserProfile/Index.razor b/Oqtane.Client/Modules/Admin/UserProfile/Index.razor index 694f28aa..af2521cf 100644 --- a/Oqtane.Client/Modules/Admin/UserProfile/Index.razor +++ b/Oqtane.Client/Modules/Admin/UserProfile/Index.razor @@ -165,116 +165,130 @@ else
-

+
+
@if (filter == "to") { - -
+ @if (notifications.Any()) + { + +
    @Localizer["From"] @Localizer["Subject"] @Localizer["Received"] -
- - - - - @if (context.IsRead) - { - @context.FromDisplayName - @context.Subject - @string.Format("{0:dd-MMM-yyyy HH:mm:ss}", @context.CreatedOn) - } - else - { - @context.FromDisplayName - @context.Subject - @string.Format("{0:dd-MMM-yyyy HH:mm:ss}", @context.CreatedOn) - } - - - - - @{ - string input = "___"; - if (context.Body.Contains(input)) - { - context.Body = context.Body.Split(input)[0]; - context.Body = context.Body.Replace("\n", ""); - context.Body = context.Body.Replace("\r", ""); - } - notificationSummary = context.Body.Length > 100 ? (context.Body.Substring(0, 97) + "...") : context.Body; - } +
+ + + + @if (context.IsRead) { - @notificationSummary + @context.FromDisplayName + @context.Subject + @string.Format("{0:dd-MMM-yyyy HH:mm:ss}", @context.CreatedOn) } else { - @notificationSummary + @context.FromDisplayName + @context.Subject + @string.Format("{0:dd-MMM-yyyy HH:mm:ss}", @context.CreatedOn) } - - -
+ + + + + @{ + string input = "___"; + if (context.Body.Contains(input)) + { + context.Body = context.Body.Split(input)[0]; + context.Body = context.Body.Replace("\n", ""); + context.Body = context.Body.Replace("\r", ""); + } + notificationSummary = context.Body.Length > 100 ? (context.Body.Substring(0, 97) + "...") : context.Body; + } + @if (context.IsRead) + { + @notificationSummary + } + else + { + @notificationSummary + } + + + +
+ + } + else + { + You have not received any notifications. + } } else { - -
-   -   + @if (notifications.Any()) + { + +
+ + @Localizer["To"] @Localizer["Subject"] @Localizer["Sent"] -
- - - +
+ + + - @if (context.IsRead) - { - @context.ToDisplayName - @context.Subject - @string.Format("{0:dd-MMM-yyyy HH:mm:ss}", @context.CreatedOn) - } - else - { - @context.ToDisplayName - @context.Subject - @string.Format("{0:dd-MMM-yyyy HH:mm:ss}", @context.CreatedOn) - } - - - - - - @{ - string input = "___"; - if (context.Body.Contains(input)) - { - context.Body = context.Body.Split(input)[0]; - context.Body = context.Body.Replace("\n", ""); - context.Body = context.Body.Replace("\r", ""); - } - notificationSummary = context.Body.Length > 100 ? (context.Body.Substring(0, 97) + "...") : context.Body; - } @if (context.IsRead) { - @notificationSummary + @context.ToDisplayName + @context.Subject + @string.Format("{0:dd-MMM-yyyy HH:mm:ss}", @context.CreatedOn) } - else + else { - @notificationSummary - } - - -
- } - @if (notifications.Any()) - { -
- + @context.ToDisplayName + @context.Subject + @string.Format("{0:dd-MMM-yyyy HH:mm:ss}", @context.CreatedOn) + } + + + + + + @{ + string input = "___"; + if (context.Body.Contains(input)) + { + context.Body = context.Body.Split(input)[0]; + context.Body = context.Body.Replace("\n", ""); + context.Body = context.Body.Replace("\r", ""); + } + notificationSummary = context.Body.Length > 100 ? (context.Body.Substring(0, 97) + "...") : context.Body; + } + @if (context.IsRead) + { + @notificationSummary + } + else + { + @notificationSummary + } + + + +
+ + } + else + { + You have not sent any notifications. + } } } From 17289099642f5f65e11686ebb47ebd4744d305e6 Mon Sep 17 00:00:00 2001 From: Cody Date: Fri, 20 Oct 2023 21:34:43 -0700 Subject: [PATCH 2/5] Adds Localization To No Notification Messages --- Oqtane.Client/Modules/Admin/UserProfile/Index.razor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Oqtane.Client/Modules/Admin/UserProfile/Index.razor b/Oqtane.Client/Modules/Admin/UserProfile/Index.razor index af2521cf..526544fa 100644 --- a/Oqtane.Client/Modules/Admin/UserProfile/Index.razor +++ b/Oqtane.Client/Modules/Admin/UserProfile/Index.razor @@ -225,7 +225,7 @@ else } else { - You have not received any notifications. + @Localizer["NoNotificationsReceived"] } } else @@ -287,7 +287,7 @@ else } else { - You have not sent any notifications. + @Localizer["NoNotificationsSent"] } } } From f3a4881261a6ef90893203e8193fe25a24ad84b8 Mon Sep 17 00:00:00 2001 From: Cody Date: Fri, 20 Oct 2023 21:38:06 -0700 Subject: [PATCH 3/5] No notification messages. --- .../Resources/Modules/Admin/UserProfile/Index.resx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Oqtane.Client/Resources/Modules/Admin/UserProfile/Index.resx b/Oqtane.Client/Resources/Modules/Admin/UserProfile/Index.resx index 7021f4a8..7d201217 100644 --- a/Oqtane.Client/Resources/Modules/Admin/UserProfile/Index.resx +++ b/Oqtane.Client/Resources/Modules/Admin/UserProfile/Index.resx @@ -233,5 +233,11 @@ Delete - - \ No newline at end of file + + + You have no notifications received. + + + You have no sent notififications. + + From d0050f7d5906b693684cd1e89e4b59150f5e7dd7 Mon Sep 17 00:00:00 2001 From: Cody Date: Fri, 20 Oct 2023 21:39:19 -0700 Subject: [PATCH 4/5] Updates Localization of No Notifications Messages --- Oqtane.Client/Modules/Admin/UserProfile/Index.razor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Oqtane.Client/Modules/Admin/UserProfile/Index.razor b/Oqtane.Client/Modules/Admin/UserProfile/Index.razor index 526544fa..e6b2bcc6 100644 --- a/Oqtane.Client/Modules/Admin/UserProfile/Index.razor +++ b/Oqtane.Client/Modules/Admin/UserProfile/Index.razor @@ -225,7 +225,7 @@ else } else { - @Localizer["NoNotificationsReceived"] + @Localizer["NoNotificationsReceived.Text"] } } else @@ -287,7 +287,7 @@ else } else { - @Localizer["NoNotificationsSent"] + @Localizer["NoNotificationsSent.Text"] } } } From c00012f28b561ea2da471f98eaaa22f474ef0848 Mon Sep 17 00:00:00 2001 From: Cody Date: Fri, 20 Oct 2023 21:57:42 -0700 Subject: [PATCH 5/5] class= --- Oqtane.Client/Modules/Admin/UserProfile/Index.razor | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Oqtane.Client/Modules/Admin/UserProfile/Index.razor b/Oqtane.Client/Modules/Admin/UserProfile/Index.razor index e6b2bcc6..dd1b4065 100644 --- a/Oqtane.Client/Modules/Admin/UserProfile/Index.razor +++ b/Oqtane.Client/Modules/Admin/UserProfile/Index.razor @@ -225,7 +225,9 @@ else } else { - @Localizer["NoNotificationsReceived.Text"] +
+ @Localizer["NoNotificationsReceived.Text"] +
} } else @@ -287,7 +289,9 @@ else } else { - @Localizer["NoNotificationsSent.Text"] +
+ @Localizer["NoNotificationsSent.Text"] +
} } }