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>
|
||||
Reference in New Issue
Block a user