 <h3 class="p-2">Activities <span class="float-sm-end">
  <?php if(has_permission('ReddSettings.manageActivities')):?>
    <button type="button" class="btn btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#activityModal">Add Activity</button>
  <?php endif;?>
	</span>
</h3>
<div class="table-responsive">
	<table class="table table-sm table-striped">
		<thead class="bg-dark text-white" style="font-size:12px;">
			<th>#ID</th>
			<th>Name</th>
			<th></th>
			<th></th>
		</thead>
		<tbody style="font-size:12px;">
			<?php foreach($activities as $activity):?>
				<tr>
					<td><?= $activity->id; ?></td>
					<td>
						<strong><?= $activity->name; ?></strong>
						<small class="text-muted d-flex"><?= $activity->description; ?></small>
					</td>
					<td><img src="<?= $activity->photo;?>" alt="" class="rounded" style="width:80px;height:60px;object-fit:cover;"></td>
					<td>
						<div class="btn-group">
							<button type="button" class="btn btn-sm btn-info rounded-circle me-2 editActivity" data-id="<?= $activity->id; ?>"><i class="bi bi-pencil"></i></button>
							<button type="button" class="btn btn-sm btn-danger rounded-circle" onclick="delete_activity(<?= $activity->id ?>, '<?= $activity->name; ?>')"><i class="bi bi-trash"></i></button>
						</div>
					</td>
				</tr>
			<?php endforeach;?>
		</tbody>
	</table>
</div>