- Created separate MoneyFlix project directory - Copied Node.js redirector from production server - Added CRM PHP code (Redirects module, Core classes, Config, Routes, Views) - Created comprehensive documentation (README_MONEYFLIX.md) - Added sync script to keep CRM code updated (sync-from-crm.sh) - Configured .gitignore for Node.js and PHP - Set up proper project structure for multi-client isolation This separates MoneyFlix from the main CRM to avoid confusion between different client systems and provides a dedicated environment for MoneyFlix-specific development and maintenance.
158 lines
4.5 KiB
PHP
158 lines
4.5 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
use App\Core\View;
|
|
|
|
$title = $title ?? 'Dashboard';
|
|
|
|
// Novo: breadcrumbs dinâmicos
|
|
$breadcrumbs = $breadcrumbs ?? [
|
|
['label' => $title, 'url' => null]
|
|
];
|
|
|
|
// Detectar se estamos no layout público (verificar se a URL contém /public/)
|
|
$isPublicLayout = strpos($_SERVER['REQUEST_URI'] ?? '', '/public/') !== false;
|
|
|
|
// Se for layout público, remover o "Home" dos breadcrumbs
|
|
if ($isPublicLayout && !empty($breadcrumbs)) {
|
|
// Remover o primeiro item se for "Home"
|
|
if ($breadcrumbs[0]['label'] === 'Home' || $breadcrumbs[0]['label'] === 'redirects.common.home') {
|
|
array_shift($breadcrumbs);
|
|
}
|
|
}
|
|
?>
|
|
<!-- Page Title -->
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="page-title-box d-sm-flex align-items-center justify-content-between">
|
|
<div class="page-title-left">
|
|
<h4 class="mb-sm-0 fw-semibold text-dark">
|
|
<i class="ri-bar-chart-line me-2 text-primary"></i>
|
|
<?php echo htmlspecialchars($title); ?>
|
|
</h4>
|
|
<p class="text-muted mb-0 mt-1">
|
|
<i class="ri-information-line me-1"></i>
|
|
<?php echo htmlspecialchars($title); ?> statistics and analytics
|
|
</p>
|
|
</div>
|
|
<div class="page-title-right">
|
|
<nav aria-label="breadcrumb">
|
|
<ol class="breadcrumb m-0">
|
|
<?php foreach ($breadcrumbs as $i => $crumb): ?>
|
|
<?php if ($i < count($breadcrumbs) - 1 && !empty($crumb['url'])): ?>
|
|
<li class="breadcrumb-item">
|
|
<a href="<?php echo htmlspecialchars($crumb['url']); ?>"
|
|
class="text-decoration-none text-muted hover-primary">
|
|
<i class="ri-home-4-line me-1"></i>
|
|
<?php echo htmlspecialchars($crumb['label']); ?>
|
|
</a>
|
|
</li>
|
|
<?php else: ?>
|
|
<li class="breadcrumb-item active" aria-current="page">
|
|
<span class="text-primary fw-semibold">
|
|
<i class="ri-arrow-right-s-line me-1"></i>
|
|
<?php echo htmlspecialchars($crumb['label']); ?>
|
|
</span>
|
|
</li>
|
|
<?php endif; ?>
|
|
<?php endforeach; ?>
|
|
</ol>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
.page-title-box {
|
|
background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
|
|
border-radius: 12px;
|
|
padding: 1.5rem;
|
|
margin-bottom: 1.5rem;
|
|
box-shadow: 0 2px 8px rgba(0,0,0,0.04);
|
|
border: 1px solid rgba(0,0,0,0.05);
|
|
}
|
|
|
|
.page-title-left h4 {
|
|
font-size: 1.5rem;
|
|
font-weight: 600;
|
|
color: #2c3e50;
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
|
|
.page-title-left p {
|
|
font-size: 0.875rem;
|
|
color: #6c757d;
|
|
margin: 0;
|
|
}
|
|
|
|
.breadcrumb {
|
|
background: transparent;
|
|
padding: 0;
|
|
margin: 0;
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.breadcrumb-item {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.breadcrumb-item + .breadcrumb-item::before {
|
|
content: "";
|
|
display: inline-block;
|
|
width: 4px;
|
|
height: 4px;
|
|
background: #6c757d;
|
|
border-radius: 50%;
|
|
margin: 0 0.5rem;
|
|
}
|
|
|
|
.breadcrumb-item a {
|
|
color: #6c757d;
|
|
text-decoration: none;
|
|
transition: all 0.2s ease;
|
|
padding: 0.25rem 0.5rem;
|
|
border-radius: 6px;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.breadcrumb-item a:hover {
|
|
color: #405189;
|
|
background: rgba(64, 81, 137, 0.1);
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.breadcrumb-item.active span {
|
|
color: #405189;
|
|
font-weight: 600;
|
|
padding: 0.25rem 0.5rem;
|
|
background: rgba(64, 81, 137, 0.1);
|
|
border-radius: 6px;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.hover-primary:hover {
|
|
color: #405189 !important;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.page-title-box {
|
|
flex-direction: column;
|
|
text-align: center;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.page-title-left h4 {
|
|
font-size: 1.25rem;
|
|
}
|
|
|
|
.breadcrumb {
|
|
justify-content: center;
|
|
flex-wrap: wrap;
|
|
}
|
|
}
|
|
</style>
|
|
<!-- End Page Title -->
|