215285d3c0
- Use AsNoTracking() on all EmailChannelRepository read methods to prevent
EF identity conflict when Update() attaches a new entity with same key
- Move test modal to @section Scripts rendered at end of <body> so
bootstrap.Modal is available and modal is not nested inside card DOM
- Add @RenderSection('Scripts') forwarding in _EditorLayout to bubble
child scripts sections up to _Layout
- Switch Test button to programmatic bootstrap.Modal() open instead of
data-bs-toggle (more reliable across layout section boundaries)
Ref: IT-628
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
57 lines
2.4 KiB
Plaintext
57 lines
2.4 KiB
Plaintext
@{
|
||
var currentController = ViewContext.RouteData.Values["controller"]?.ToString() ?? "";
|
||
bool isTemplates = currentController.Equals("AdminTemplates", StringComparison.OrdinalIgnoreCase);
|
||
bool isChannels = currentController.Equals("AdminChannels", StringComparison.OrdinalIgnoreCase);
|
||
}
|
||
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||
<title>@ViewData["Title"] – Notification Service</title>
|
||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"
|
||
rel="stylesheet"
|
||
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH"
|
||
crossorigin="anonymous" />
|
||
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css"
|
||
rel="stylesheet" />
|
||
<link href="/css/admin.css" rel="stylesheet" />
|
||
</head>
|
||
<body>
|
||
<nav class="navbar navbar-dark bg-dark px-3 admin-navbar">
|
||
<a class="navbar-brand fw-bold" href="/">
|
||
<i class="bi bi-bell-fill me-1"></i> Notification Service
|
||
</a>
|
||
</nav>
|
||
|
||
<div class="container-fluid">
|
||
<div class="row">
|
||
<nav class="col-md-2 d-none d-md-block sidebar py-3">
|
||
<div class="sidebar-section-label">Management</div>
|
||
<ul class="nav flex-column px-2">
|
||
<li class="nav-item">
|
||
<a class="nav-link @(isTemplates ? "active" : "")" href="/admin/templates">
|
||
<i class="bi bi-envelope-paper"></i> Email Templates
|
||
</a>
|
||
</li>
|
||
<li class="nav-item">
|
||
<a class="nav-link @(isChannels ? "active" : "")" href="/admin/channels">
|
||
<i class="bi bi-broadcast"></i> Email Channels
|
||
</a>
|
||
</li>
|
||
</ul>
|
||
</nav>
|
||
|
||
<main class="col-md-10 ms-sm-auto main-content">
|
||
@RenderBody()
|
||
</main>
|
||
</div>
|
||
</div>
|
||
|
||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"
|
||
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc4s9bIOgUxi8T/jzmGBE+rYG8O9HP+CyEb1BQGE8B8Z"
|
||
crossorigin="anonymous"></script>
|
||
@RenderSection("Scripts", required: false)
|
||
</body>
|
||
</html>
|