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

NEST-480: Adding Admin Dashboard feature support for Email Quota modul #91

Merged
merged 5 commits into from
Oct 9, 2023
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 @@ -2,6 +2,7 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using OrchardCore.Admin.Controllers;
using OrchardCore.AdminDashboard.Controllers;
using OrchardCore.DisplayManagement;
using OrchardCore.DisplayManagement.Layout;
using OrchardCore.Mvc.Core.Utilities;
Expand Down Expand Up @@ -37,9 +38,12 @@ public async Task OnResultExecutionAsync(ResultExecutingContext context, ResultE
var actionRouteArea = context.ActionDescriptor.RouteValues["Area"];
var actionRouteValue = context.ActionDescriptor.RouteValues["Action"];

if (actionRouteController == typeof(AdminController).ControllerName() &&
actionRouteArea == $"{nameof(OrchardCore)}.{nameof(OrchardCore.Admin)}" &&
actionRouteValue is nameof(AdminController.Index) &&
if ((actionRouteController == typeof(AdminController).ControllerName() ||
actionRouteController == typeof(DashboardController).ControllerName()) &&
actionRouteArea is $"{nameof(OrchardCore)}.{nameof(OrchardCore.Admin)}" or
$"{nameof(OrchardCore)}.{nameof(OrchardCore.AdminDashboard)}" &&
actionRouteValue is nameof(AdminController.Index) or
nameof(DashboardController.Index) &&
context.Result is ViewResult &&
_emailQuotaService.ShouldLimitEmails())
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@* This div is needed otherwise float elements above might interfere with the styling here. *@
<div class="clearfix"></div> @* #spell-check-ignore-line *@
@if (Model.IsOverQuota)
{
<p class="alert alert-danger">
Expand Down