unread notifs
This commit is contained in:
@@ -50,7 +50,6 @@
|
||||
<th>Timestamp</th>
|
||||
<th>Type</th>
|
||||
<th>From</th>
|
||||
<th>Details</th>
|
||||
<th>Status</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
@@ -84,14 +83,6 @@
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ notif.sender.username + ' ' + notif.sender.last_name if notif.sender else 'System' }}</td>
|
||||
<td>
|
||||
<button class="btn btn-sm btn-secondary"
|
||||
data-bs-toggle="modal"
|
||||
data-bs-target="#notifDetailsModal"
|
||||
data-notif-id="{{ notif.id }}">
|
||||
<i class="fas fa-info-circle"></i> View Details
|
||||
</button>
|
||||
</td>
|
||||
<td>
|
||||
{% if notif.read %}
|
||||
<span class="badge bg-success">Read</span>
|
||||
@@ -103,21 +94,39 @@
|
||||
<div class="btn-group">
|
||||
{% if notif.notif_type in ['room_invite', 'room_invite_removed'] and notif.details and notif.details.room_id %}
|
||||
<a href="{{ url_for('rooms.room', room_id=notif.details.room_id) }}"
|
||||
class="btn btn-sm btn-primary">
|
||||
<i class="fas fa-door-open"></i> View Room
|
||||
class="btn btn-sm btn-primary"
|
||||
data-bs-toggle="tooltip"
|
||||
title="View Room">
|
||||
<i class="fas fa-door-open"></i>
|
||||
</a>
|
||||
{% elif notif.notif_type in ['conversation_invite', 'conversation_invite_removed', 'conversation_message'] and notif.details and notif.details.conversation_id %}
|
||||
<a href="{{ url_for('conversations.conversation', conversation_id=notif.details.conversation_id) }}"
|
||||
class="btn btn-sm btn-primary">
|
||||
<i class="fas fa-comments"></i> View Conversation
|
||||
class="btn btn-sm btn-primary"
|
||||
data-bs-toggle="tooltip"
|
||||
title="View Conversation">
|
||||
<i class="fas fa-comments"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
<button class="btn btn-sm btn-secondary"
|
||||
data-bs-toggle="modal"
|
||||
data-bs-target="#notifDetailsModal"
|
||||
data-notif-id="{{ notif.id }}"
|
||||
data-bs-toggle="tooltip"
|
||||
title="View Details">
|
||||
<i class="fas fa-info-circle"></i>
|
||||
</button>
|
||||
{% if not notif.read %}
|
||||
<button class="btn btn-sm btn-success mark-read" data-notif-id="{{ notif.id }}">
|
||||
<i class="fas fa-check"></i> Mark as Read
|
||||
<button class="btn btn-sm btn-success mark-read"
|
||||
data-notif-id="{{ notif.id }}"
|
||||
data-bs-toggle="tooltip"
|
||||
title="Mark as Read">
|
||||
<i class="fas fa-check"></i>
|
||||
</button>
|
||||
{% endif %}
|
||||
<button class="btn btn-sm btn-danger delete-notif" data-notif-id="{{ notif.id }}">
|
||||
<button class="btn btn-sm btn-danger delete-notif"
|
||||
data-notif-id="{{ notif.id }}"
|
||||
data-bs-toggle="tooltip"
|
||||
title="Delete">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
@@ -126,7 +135,7 @@
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="6" class="text-center">No notifications found</td>
|
||||
<td colspan="5" class="text-center">No notifications found</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user