108 lines
5.6 KiB
PHP
108 lines
5.6 KiB
PHP
<div class="page-header">
|
|
<div>
|
|
<h1><?= $this->escape($org['name']) ?></h1>
|
|
<p><?= $this->escape(ucfirst($org['type'])) ?> • <?= $this->escape($org['country'] ?? 'Unknown location') ?></p>
|
|
</div>
|
|
<div style="display: flex; gap: 10px;">
|
|
<a href="/admin/organizations/<?= $org['id'] ?>/edit" class="btn btn-secondary">Edit</a>
|
|
<a href="/admin/contacts/create?organization_id=<?= $org['id'] ?>" class="btn btn-primary">+ Add Contact</a>
|
|
</div>
|
|
</div>
|
|
|
|
<?php if ($flashSuccess = $this->session->getFlash('success')): ?>
|
|
<div class="alert alert-success"><span><?= $this->escape($flashSuccess) ?></span></div>
|
|
<?php endif; ?>
|
|
|
|
<div class="detail-grid">
|
|
<!-- Left: Details -->
|
|
<div class="glass-panel">
|
|
<h3 style="margin-bottom: 20px;">Details</h3>
|
|
<div class="detail-row">
|
|
<span class="detail-label">Domain</span>
|
|
<span><?= $org['domain'] ? $this->escape($org['domain']) : '-' ?></span>
|
|
</div>
|
|
<div class="detail-row">
|
|
<span class="detail-label">Website</span>
|
|
<span><?= $org['website_url'] ? '<a href="' . $this->escape($org['website_url']) . '" target="_blank">' . $this->escape($org['website_url']) . '</a>' : '-' ?></span>
|
|
</div>
|
|
<div class="detail-row">
|
|
<span class="detail-label">Country</span>
|
|
<span><?= $this->escape($org['country'] ?? '-') ?></span>
|
|
</div>
|
|
<div class="detail-row">
|
|
<span class="detail-label">City</span>
|
|
<span><?= $this->escape($org['city'] ?? '-') ?></span>
|
|
</div>
|
|
<div class="detail-row">
|
|
<span class="detail-label">CRM Status</span>
|
|
<span><span class="badge badge-status-<?= strtolower(str_replace(' ', '-', $org['crm_status'])) ?>"><?= $this->escape($org['crm_status']) ?></span></span>
|
|
</div>
|
|
<div class="detail-row">
|
|
<span class="detail-label">Funding Stage</span>
|
|
<span><?= $this->escape($org['funding_stage'] ?? '-') ?></span>
|
|
</div>
|
|
<div class="detail-row">
|
|
<span class="detail-label">Created</span>
|
|
<span><?= date('M j, Y', strtotime($org['created_at'])) ?></span>
|
|
</div>
|
|
<div class="detail-row" style="flex-direction: column; align-items: flex-start;">
|
|
<span class="detail-label">Description</span>
|
|
<p style="margin-top: 8px; line-height: 1.6;"><?= $this->escape($org['description'] ?? 'No description') ?></p>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Right: Opportunities & Contacts -->
|
|
<div>
|
|
<div class="glass-panel" style="margin-bottom: 20px;">
|
|
<h3 style="margin-bottom: 16px;">Opportunities (<?= count($opportunities) ?>)</h3>
|
|
<?php if (empty($opportunities)): ?>
|
|
<p style="color: var(--text-muted);">No opportunities linked to this organization yet.</p>
|
|
<?php else: ?>
|
|
<?php foreach ($opportunities as $opp): ?>
|
|
<div class="list-item">
|
|
<div>
|
|
<a href="/admin/opportunities/<?= $opp['id'] ?>" style="font-weight: 600;"><?= $this->escape($opp['title']) ?></a>
|
|
<div style="display: flex; gap: 8px; margin-top: 6px;">
|
|
<span class="badge badge-type-<?= $opp['type'] ?>"><?= $this->escape($opp['type']) ?></span>
|
|
<span class="badge" style="background: rgba(251, 191, 36, 0.2); color: #fbbf24;">Score: <?= $opp['score'] ?></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php endforeach; ?>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<div class="glass-panel">
|
|
<h3 style="margin-bottom: 16px;">Contacts (<?= count($contacts) ?>)</h3>
|
|
<?php if (empty($contacts)): ?>
|
|
<p style="color: var(--text-muted);">No contacts added yet.</p>
|
|
<?php else: ?>
|
|
<?php foreach ($contacts as $contact): ?>
|
|
<div class="list-item">
|
|
<div>
|
|
<a href="/admin/contacts/<?= $contact['id'] ?>" style="font-weight: 600;"><?= $this->escape($contact['name']) ?></a>
|
|
<div style="font-size: 0.85rem; color: var(--text-muted);">
|
|
<?= $this->escape($contact['position'] ?? '') ?>
|
|
<?= $contact['email'] ? ' • ' . $this->escape($contact['email']) : '' ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php endforeach; ?>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
|
|
.detail-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
|
|
.detail-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }
|
|
.list-item { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
|
|
.list-item:last-child { border-bottom: none; }
|
|
.badge-type-grant { background: rgba(52, 211, 153, 0.2); color: #34d399; }
|
|
.badge-type-competition { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
|
|
.badge-type-investment { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }
|
|
.badge-type-event { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
|
|
.badge-type-partnership { background: rgba(167, 139, 250, 0.2); color: #c4b5fd; }
|
|
@media (max-width: 768px) { .detail-grid { grid-template-columns: 1fr; } }
|
|
</style>
|