Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup Notifications #16977

Merged
merged 2 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@ public sealed class NotificationDisplayDriver : DisplayDriver<Notification>
{
public override Task<IDisplayResult> DisplayAsync(Notification notification, BuildDisplayContext context)
{
var results = new List<IDisplayResult>()
{
return CombineAsync(
Shape("NotificationsMeta_SummaryAdmin", new NotificationViewModel(notification))
.Location("SummaryAdmin", "Meta:20"),
Shape("NotificationsActions_SummaryAdmin", new NotificationViewModel(notification))
.Location("SummaryAdmin", "Actions:5"),
Shape("NotificationsButtonActions_SummaryAdmin", new NotificationViewModel(notification))
.Location("SummaryAdmin", "ActionsMenu:10"),
};

return CombineAsync(results);
.Location("SummaryAdmin", "ActionsMenu:10")
);
}
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
@model ListNotificationOptions

@inject IDisplayManager<ListNotificationOptions> ContentOptionsDisplayManager
@inject IDisplayManager<ListNotificationOptions> OptionsDisplayManager

<div class="dropdown" style="display: none" id="actions">
<button class="btn btn-sm btn-light dropdown-toggle" type="button" id="bulk-action-menu-button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
@T["Actions"]
</button>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="bulk-action-menu-button">
@{
var bulkActions = await ContentOptionsDisplayManager.BuildDisplayAsync(Model, null, "BulkActions");
var bulkActions = await OptionsDisplayManager.BuildDisplayAsync(Model, null, "BulkActions");
if (bulkActions.TryGetProperty<IShape>("Content", out var content))
{
@await DisplayAsync(content)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@using OrchardCore.Localization

@model ListNotificationOptions
@inject IDisplayManager<ListNotificationOptions> DisplayManager

<div class="has-search">
<input asp-for="OriginalSearchText" type="hidden" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@using Microsoft.AspNetCore.Mvc.Localization

@model ListNotificationOptions

<div class="text-nowrap">
Expand Down