Files
Anatolii Grynchuk 6434e3e636 fix: serve bootstrap locally, fix modal button null reference
- Replace CDN bootstrap with local /lib/bootstrap/ - CDN SRI hash was
  mismatching and blocking the script entirely (no Bootstrap = no modals)
- Fix addEventListener null error: script runs before @section FormActions
  renders the button, so use document-level event delegation instead

Ref: IT-628

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-02 03:45:20 +03:00

52 lines
2.0 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@{
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="/lib/bootstrap/bootstrap.min.css" rel="stylesheet" />
<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="/lib/bootstrap/bootstrap.bundle.min.js"></script>
@RenderSection("Scripts", required: false)
</body>
</html>