Deploy on 2026-06-05 17:47:27
This commit is contained in:
@@ -1,39 +1,63 @@
|
||||
<div class="page-header">
|
||||
<div>
|
||||
<h1>Opportunities</h1>
|
||||
<p>Grants, competitions, events, partnerships and investment opportunities</p>
|
||||
<h1>الفرص الاستثمارية</h1>
|
||||
<p>المنح، المسابقات، الفعاليات، الشراكات وفرص الاستثمار</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Filters -->
|
||||
<div class="filters-bar">
|
||||
<form method="GET" class="filters-form">
|
||||
<input type="text" name="search" class="form-control" placeholder="Search opportunities..." value="<?= $this->escape($search) ?>">
|
||||
<input type="text" name="search" class="form-control" placeholder="البحث عن الفرص..." value="<?= $this->escape($search) ?>">
|
||||
<select name="type" class="form-control">
|
||||
<option value="">All Types</option>
|
||||
<?php foreach ($types as $t): ?>
|
||||
<option value="<?= $t ?>" <?= $type === $t ? 'selected' : '' ?>><?= ucfirst($t) ?></option>
|
||||
<option value="">جميع الأنواع</option>
|
||||
<?php foreach ($types as $t_key): ?>
|
||||
<?php
|
||||
$trans = [
|
||||
'grant' => 'المنح',
|
||||
'competition' => 'المسابقات',
|
||||
'demo_day' => 'أيام العروض',
|
||||
'event' => 'الفعاليات',
|
||||
'partnership' => 'الشراكات',
|
||||
'investment' => 'الاستثمارات',
|
||||
'other' => 'أخرى'
|
||||
];
|
||||
$transName = $trans[$t_key] ?? ucfirst($t_key);
|
||||
?>
|
||||
<option value="<?= $t_key ?>" <?= $type === $t_key ? 'selected' : '' ?>><?= $transName ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="status" class="form-control">
|
||||
<option value="">All Statuses</option>
|
||||
<?php foreach ($statuses as $s): ?>
|
||||
<option value="<?= $s ?>" <?= $status === $s ? 'selected' : '' ?>><?= ucfirst($s) ?></option>
|
||||
<option value="">جميع الحالات</option>
|
||||
<?php foreach ($statuses as $s_key): ?>
|
||||
<option value="<?= $s_key ?>" <?= $status === $s_key ? 'selected' : '' ?>><?= $s_key === 'active' ? 'نشط' : ($s_key === 'inactive' ? 'غير نشط' : $s_key) ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<button type="submit" class="btn btn-secondary">Filter</button>
|
||||
<button type="submit" class="btn btn-secondary">تصفية</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Type Summary -->
|
||||
<div class="metrics-grid" style="margin-bottom: 20px;">
|
||||
<div class="glass-panel metric-card">
|
||||
<span class="metric-title">Total</span>
|
||||
<span class="metric-title">الإجمالي</span>
|
||||
<span class="metric-value"><?= $total ?></span>
|
||||
</div>
|
||||
<?php foreach ($typeCounts as $t => $c): ?>
|
||||
<?php foreach ($typeCounts as $t_key => $c): ?>
|
||||
<?php
|
||||
$trans = [
|
||||
'grant' => 'المنح',
|
||||
'competition' => 'المسابقات',
|
||||
'demo_day' => 'أيام العروض',
|
||||
'event' => 'الفعاليات',
|
||||
'partnership' => 'الشراكات',
|
||||
'investment' => 'الاستثمارات',
|
||||
'other' => 'أخرى'
|
||||
];
|
||||
$transName = $trans[$t_key] ?? ucfirst($t_key);
|
||||
?>
|
||||
<div class="glass-panel metric-card">
|
||||
<span class="metric-title"><?= ucfirst($t) ?></span>
|
||||
<span class="metric-title"><?= $transName ?></span>
|
||||
<span class="metric-value"><?= $c ?></span>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
@@ -44,20 +68,35 @@
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Type</th>
|
||||
<th>Source</th>
|
||||
<th>Score</th>
|
||||
<th>Status</th>
|
||||
<th>Created</th>
|
||||
<th>العنوان</th>
|
||||
<th>النوع</th>
|
||||
<th>المصدر/الشركة</th>
|
||||
<th>التقييم</th>
|
||||
<th>الحالة</th>
|
||||
<th>تاريخ الإضافة</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (empty($opportunities)): ?>
|
||||
<tr><td colspan="7" style="text-align: center; padding: 40px; color: var(--text-muted);">No opportunities yet. Run the collector first.</td></tr>
|
||||
<tr><td colspan="7" style="text-align: center; padding: 40px; color: var(--text-muted);">لا توجد فرص استثمارية حالياً. يرجى تشغيل جامع البيانات أولاً.</td></tr>
|
||||
<?php else: ?>
|
||||
<?php foreach ($opportunities as $opp): ?>
|
||||
<?php
|
||||
$trans = [
|
||||
'grant' => 'المنح',
|
||||
'competition' => 'المسابقات',
|
||||
'demo_day' => 'أيام العروض',
|
||||
'event' => 'الفعاليات',
|
||||
'partnership' => 'الشراكات',
|
||||
'investment' => 'الاستثمارات',
|
||||
'other' => 'أخرى',
|
||||
'vc_funding' => 'تمويل رأس مال جريء',
|
||||
'accelerator' => 'مسرعة أعمال',
|
||||
'incubator' => 'حاضنة أعمال'
|
||||
];
|
||||
$transType = $trans[$opp['type']] ?? $opp['type'];
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/admin/opportunities/<?= $opp['id'] ?>" style="font-weight: 600;"><?= $this->escape(mb_substr($opp['title'], 0, 60)) ?></a>
|
||||
@@ -65,12 +104,12 @@
|
||||
<br><small style="color: var(--text-muted);"><?= $this->escape(implode(', ', explode(',', $opp['tag_names']))) ?></small>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><span class="badge badge-type-<?= $opp['type'] ?>"><?= $this->escape($opp['type']) ?></span></td>
|
||||
<td><span class="badge badge-type-<?= $opp['type'] ?>"><?= $this->escape($transType) ?></span></td>
|
||||
<td><?= $opp['org_name'] ? $this->escape($opp['org_name']) : '-' ?></td>
|
||||
<td><span class="badge" style="background: rgba(251, 191, 36, 0.2); color: #fbbf24;"><?= $opp['score'] ?></span></td>
|
||||
<td><?= $this->escape($opp['status']) ?></td>
|
||||
<td><?= date('M j', strtotime($opp['created_at'])) ?></td>
|
||||
<td><a href="<?= $this->escape($opp['url']) ?>" target="_blank" class="btn btn-sm btn-secondary">Open</a></td>
|
||||
<td><span class="badge" style="background: rgba(251, 191, 36, 0.2); color: #fbbf24;"><?= $opp['score'] ?>/100</span></td>
|
||||
<td><?= $opp['status'] === 'active' ? 'نشط' : 'غير نشط' ?></td>
|
||||
<td><?= date('Y-m-d', strtotime($opp['created_at'])) ?></td>
|
||||
<td><a href="<?= $this->escape($opp['url']) ?>" target="_blank" class="btn btn-sm btn-secondary">فتح</a></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
@@ -98,4 +137,7 @@
|
||||
.badge-type-event { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
|
||||
.badge-type-demo_day { background: rgba(248, 113, 113, 0.2); color: #f87171; }
|
||||
.badge-type-partnership { background: rgba(167, 139, 250, 0.2); color: #c4b5fd; }
|
||||
.badge-type-vc_funding { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }
|
||||
.badge-type-accelerator { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
|
||||
.badge-type-incubator { background: rgba(52, 211, 153, 0.2); color: #34d399; }
|
||||
</style>
|
||||
@@ -1,49 +1,64 @@
|
||||
<?php
|
||||
$trans = [
|
||||
'grant' => 'المنح',
|
||||
'competition' => 'المسابقات',
|
||||
'demo_day' => 'أيام العروض',
|
||||
'event' => 'الفعاليات',
|
||||
'partnership' => 'الشراكات',
|
||||
'investment' => 'الاستثمارات',
|
||||
'other' => 'أخرى',
|
||||
'vc_funding' => 'تمويل رأس مال جريء',
|
||||
'accelerator' => 'مسرعة أعمال',
|
||||
'incubator' => 'حاضنة أعمال'
|
||||
];
|
||||
$transType = $trans[$opportunity['type']] ?? $opportunity['type'];
|
||||
?>
|
||||
<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 style="margin-top: 10px; display: flex; gap: 8px;">
|
||||
<span class="badge badge-type-<?= $opportunity['type'] ?>"><?= $this->escape($transType) ?></span>
|
||||
<span class="badge" style="background: rgba(251, 191, 36, 0.2); color: #fbbf24;">التقييم: <?= $opportunity['score'] ?>/100</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="detail-grid">
|
||||
<div class="glass-panel">
|
||||
<h3 style="margin-bottom: 20px;">Details</h3>
|
||||
<h3 style="margin-bottom: 20px;">التفاصيل</h3>
|
||||
<div class="detail-row">
|
||||
<span class="detail-label">Status</span>
|
||||
<span><?= $this->escape($opportunity['status']) ?></span>
|
||||
<span class="detail-label">الحالة</span>
|
||||
<span><?= $opportunity['status'] === 'active' ? 'نشط' : 'غير نشط' ?></span>
|
||||
</div>
|
||||
<?php if ($opportunity['org_name']): ?>
|
||||
<div class="detail-row">
|
||||
<span class="detail-label">Organization</span>
|
||||
<span class="detail-label">الجهة/الشركة</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>
|
||||
<span class="detail-label">الرابط</span>
|
||||
<span><a href="<?= $this->escape($opportunity['url']) ?>" target="_blank">فتح الرابط ←</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>
|
||||
<span class="detail-label">الموعد النهائي</span>
|
||||
<span><?= date('Y-m-d', strtotime($opportunity['deadline'])) ?></span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ($opportunity['amount']): ?>
|
||||
<div class="detail-row">
|
||||
<span class="detail-label">Amount</span>
|
||||
<span class="detail-label">المبلغ</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>
|
||||
<span class="detail-label">تاريخ الإضافة</span>
|
||||
<span><?= date('Y-m-d', 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>
|
||||
<span class="detail-label">الوسوم</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>
|
||||
@@ -52,21 +67,21 @@
|
||||
</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>
|
||||
<span class="detail-label">الوصف ونقاط القوة</span>
|
||||
<p style="margin-top: 8px; line-height: 1.6; text-align: justify;"><?= $this->escape($opportunity['description']) ?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="glass-panel">
|
||||
<h3 style="margin-bottom: 16px;">Applications (<?= count($applications) ?>)</h3>
|
||||
<h3 style="margin-bottom: 16px;">الطلبات المتتبعة (<?= count($applications) ?>)</h3>
|
||||
<?php if (empty($applications)): ?>
|
||||
<p style="color: var(--text-muted);">No applications tracked yet.</p>
|
||||
<p style="color: var(--text-muted);">لا توجد طلبات متتبعة حالياً لهذه الفرصة.</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><?= date('Y-m-d', 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']): ?>
|
||||
@@ -85,4 +100,13 @@
|
||||
.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; } }
|
||||
.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-demo_day { background: rgba(248, 113, 113, 0.2); color: #f87171; }
|
||||
.badge-type-partnership { background: rgba(167, 139, 250, 0.2); color: #c4b5fd; }
|
||||
.badge-type-vc_funding { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }
|
||||
.badge-type-accelerator { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
|
||||
.badge-type-incubator { background: rgba(52, 211, 153, 0.2); color: #34d399; }
|
||||
</style>
|
||||
Reference in New Issue
Block a user