Files
MoneyFlix/crm/Views/layouts/sidebar.php
1sonhador c2fecefa55 refactor: Remove BetZoo and WDMI references, standardize to MoneyFlix
- Replace "BetZoo CRM" with "MoneyFlix" in Advertising module description
- Replace "Betzoo" option with "MoneyFlix" in ErrorMonitoring project filter
- Update GoogleSheetsService to use environment variable for credentials path
- Update CDN config from betzoo.app to moneyflix.com
- Remove WDMI-specific checks in layouts (topbar, sidebar, main, public-blank)
- Update database profile examples from wdmi_importer to moneyflix_importer
- Keep BitReport references (company/product name)
2025-10-30 10:00:46 +00:00

95 lines
3.6 KiB
PHP

<?php
declare(strict_types=1);
if (defined('SIDEBAR_INCLUDED')) {
return; // Already included, skip silently
}
define('SIDEBAR_INCLUDED', true);
use App\Core\View;
use App\Core\MenuRenderer;
use App\Core\MenuManager;
use App\Core\InputSanitizer;
// Branding dinâmico
if (!isset($branding)) {
$branding = \App\Core\Branding::get();
}
// Obter menu dinâmico dos módulos
$menu_final = MenuManager::getFinalMenu();
// Fallback para menu estático se não houver módulos registados
if (empty($menu_final)) {
$menu_final = [
[
'id' => 1,
'label' => 'Dashboard',
'icon' => 'ri-dashboard-2-line',
'url' => '/dashboard',
'order' => 1,
'parent_id' => null,
'dev' => 0,
],
[
'id' => 2,
'label' => 'Analytics',
'icon' => 'ri-bar-chart-line',
'url' => '/dashboard/analytics',
'order' => 2,
'parent_id' => null,
'dev' => 0,
],
];
}
$currentUrl = $_SERVER['REQUEST_URI'] ?? '';
$editmenuValue = InputSanitizer::get('editmenu', 'GET');
$editMode = (null !== $editmenuValue) && $editmenuValue == 1;
?>
<!-- ========== MENU DINÂMICO (Módulos) ========== -->
<div class="app-menu navbar-menu">
<!-- LOGO -->
<div class="navbar-brand-box">
<?php if (($branding['client_id'] ?? '') === 'moneyflix'): ?>
<!-- MoneyFlix: Só um logo (ícone + texto), nunca duplicado -->
<a href="/" class="logo logo-<?php echo $branding['client_id']; ?>" style="margin-top: 0.75rem; margin-bottom: 1.25rem; display: block;">
<span class="logo-lg d-flex align-items-center">
<img src="<?php echo htmlspecialchars($branding['logo_url']); ?>" alt="<?php echo htmlspecialchars($branding['company_name']); ?> Logo" height="22">
</span>
</a>
<?php else: ?>
<!-- Outros clientes: comportamento padrão -->
<a href="/" class="logo logo-dark">
<span class="logo-sm d-flex align-items-center">
<img src="<?php echo htmlspecialchars($branding['logo_url']); ?>" alt="<?php echo htmlspecialchars($branding['company_name']); ?> Logo" height="22">
</span>
<span class="logo-lg">
<img src="<?php echo htmlspecialchars($branding['logo_url']); ?>" alt="<?php echo htmlspecialchars($branding['company_name']); ?> Logo" height="17">
</span>
</a>
<a href="/" class="logo logo-light">
<span class="logo-sm d-flex align-items-center">
<img src="<?php echo htmlspecialchars($branding['logo_url']); ?>" alt="<?php echo htmlspecialchars($branding['company_name']); ?> Logo" height="22">
</span>
<span class="logo-lg">
<img src="<?php echo htmlspecialchars($branding['logo_url']); ?>" alt="<?php echo htmlspecialchars($branding['company_name']); ?> Logo" height="17">
</span>
</a>
<?php endif; ?>
<button type="button" class="btn btn-sm p-0 fs-20 header-item float-end btn-vertical-sm-hover" id="vertical-hover">
<i class="ri-record-circle-line"></i>
</button>
</div>
<div id="scrollbar">
<div class="container-fluid">
<div id="two-column-menu"></div>
<ul class="navbar-nav" id="navbar-nav">
<?php MenuRenderer::render($menu_final, $currentUrl, $editMode); ?>
</ul>
</div>
</div>
<div class="sidebar-background"></div>
</div>