Files
scoutiq/resources/views/admin/opportunities/show.php

88 lines
4.3 KiB
PHP

<div class="page-header">
<div>
<h1><?= $this->escape(mb_substr($opportunity['title'], 0, 80)) ?></h1>
<p>
<span class="badge badge-type-<?= $opportunity['type'] ?>"><?= $this->escape($opportunity['type']) ?></span>
<span class="badge" style="background: rgba(251, 191, 36, 0.2); color: #fbbf24;">Score: <?= $opportunity['score'] ?></span>
</p>
</div>
</div>
<div class="detail-grid">
<div class="glass-panel">
<h3 style="margin-bottom: 20px;">Details</h3>
<div class="detail-row">
<span class="detail-label">Status</span>
<span><?= $this->escape($opportunity['status']) ?></span>
</div>
<?php if ($opportunity['org_name']): ?>
<div class="detail-row">
<span class="detail-label">Organization</span>
<span><a href="/admin/organizations/<?= $opportunity['organization_id'] ?>"><?= $this->escape($opportunity['org_name']) ?></a></span>
</div>
<?php endif; ?>
<div class="detail-row">
<span class="detail-label">URL</span>
<span><a href="<?= $this->escape($opportunity['url']) ?>" target="_blank">Open Link →</a></span>
</div>
<?php if ($opportunity['deadline']): ?>
<div class="detail-row">
<span class="detail-label">Deadline</span>
<span><?= date('M j, Y', strtotime($opportunity['deadline'])) ?></span>
</div>
<?php endif; ?>
<?php if ($opportunity['amount']): ?>
<div class="detail-row">
<span class="detail-label">Amount</span>
<span>$<?= number_format($opportunity['amount']) ?></span>
</div>
<?php endif; ?>
<div class="detail-row">
<span class="detail-label">Created</span>
<span><?= date('M j, Y', strtotime($opportunity['created_at'])) ?></span>
</div>
<?php if ($opportunity['tag_names']): ?>
<div class="detail-row" style="flex-direction: column; align-items: flex-start;">
<span class="detail-label">Tags</span>
<div style="display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px;">
<?php foreach (explode(',', $opportunity['tag_names']) as $tag): ?>
<span class="badge" style="background: rgba(139, 92, 246, 0.2); color: #c4b5fd;"><?= $this->escape(trim($tag)) ?></span>
<?php endforeach; ?>
</div>
</div>
<?php endif; ?>
<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($opportunity['description']) ?></p>
</div>
</div>
<div>
<div class="glass-panel">
<h3 style="margin-bottom: 16px;">Applications (<?= count($applications) ?>)</h3>
<?php if (empty($applications)): ?>
<p style="color: var(--text-muted);">No applications tracked yet.</p>
<?php else: ?>
<?php foreach ($applications as $app): ?>
<div class="list-item">
<div style="display: flex; justify-content: space-between;">
<span><?= date('M j', strtotime($app['created_at'])) ?></span>
<span class="badge" style="background: rgba(56, 189, 248, 0.2); color: #38bdf8;"><?= $this->escape($app['status']) ?></span>
</div>
<?php if ($app['notes']): ?>
<p style="margin-top: 4px; font-size: 0.9rem; color: var(--text-muted);"><?= $this->escape($app['notes']) ?></p>
<?php endif; ?>
</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); }
@media (max-width: 768px) { .detail-grid { grid-template-columns: 1fr; } }
</style>