67 lines
3.2 KiB
PHP
67 lines
3.2 KiB
PHP
<div class="page-header">
|
|
<div>
|
|
<h1>جهات الاتصال</h1>
|
|
<p>إدارة شبكة جهات الاتصال والتفاعلات مع المستثمرين والشركاء</p>
|
|
</div>
|
|
<a href="/admin/contacts/create" class="btn btn-primary">+ إضافة جهة اتصال</a>
|
|
</div>
|
|
|
|
<?php if ($flashSuccess = $this->session->getFlash('success')): ?>
|
|
<div class="alert alert-success"><span><?= $this->escape($flashSuccess) ?></span></div>
|
|
<?php endif; ?>
|
|
|
|
<div class="filters-bar">
|
|
<form method="GET" class="filters-form">
|
|
<input type="text" name="search" class="form-control" placeholder="البحث عن جهات الاتصال..." value="<?= $this->escape($search) ?>">
|
|
<button type="submit" class="btn btn-secondary">بحث</button>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="glass-panel" style="overflow-x: auto;">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th>الاسم</th>
|
|
<th>المسمى الوظيفي</th>
|
|
<th>المنظمة / الجهة</th>
|
|
<th>البريد الإلكتروني</th>
|
|
<th>التفاعلات</th>
|
|
<th>الإجراءات</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php if (empty($contacts)): ?>
|
|
<tr><td colspan="6" style="text-align: center; padding: 40px; color: var(--text-muted);">لا توجد جهات اتصال حالياً.</td></tr>
|
|
<?php else: ?>
|
|
<?php foreach ($contacts as $contact): ?>
|
|
<tr>
|
|
<td><a href="/admin/contacts/<?= $contact['id'] ?>" style="font-weight: 600;"><?= $this->escape($contact['name']) ?></a></td>
|
|
<td><?= $this->escape($contact['position'] ?? '-') ?></td>
|
|
<td><?= $contact['org_name'] ? $this->escape($contact['org_name']) : '-' ?></td>
|
|
<td><?= $contact['email'] ? $this->escape($contact['email']) : '-' ?></td>
|
|
<td><?= $contact['interaction_count'] ?? 0 ?></td>
|
|
<td>
|
|
<a href="/admin/contacts/<?= $contact['id'] ?>" class="btn btn-sm btn-secondary">عرض</a>
|
|
<a href="/admin/contacts/<?= $contact['id'] ?>/edit" class="btn btn-sm btn-secondary">تعديل</a>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
<?php endif; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<?php if ($total > $perPage): ?>
|
|
<div class="pagination">
|
|
<?php for ($i = 1; $i <= ceil($total / $perPage); $i++): ?>
|
|
<a href="?page=<?= $i ?>&search=<?= urlencode($search) ?>" class="btn btn-sm <?= $i === $page ? 'btn-primary' : 'btn-secondary' ?>"><?= $i ?></a>
|
|
<?php endfor; ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<style>
|
|
.data-table { width: 100%; border-collapse: collapse; }
|
|
.data-table th, .data-table td { padding: 12px 16px; text-align: right; border-bottom: 1px solid rgba(255,255,255,0.05); }
|
|
.data-table th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); font-weight: 600; }
|
|
.data-table tr:hover { background: rgba(255,255,255,0.02); }
|
|
</style>
|