Fix channel management: add delete, edit, and content management functionality with proper navigation
This commit is contained in:
@@ -57,7 +57,11 @@
|
||||
<i class="bi bi-person-circle"></i> {{ current_user.username }}
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" href="{{ url_for('admin') }}"><i class="bi bi-house"></i> Dashboard</a></li>
|
||||
{% if current_user.role == 'admin' %}
|
||||
<li><a class="dropdown-item" href="{{ url_for('admin') }}"><i class="bi bi-house"></i> Admin Dashboard</a></li>
|
||||
{% else %}
|
||||
<li><a class="dropdown-item" href="{{ url_for('user_dashboard') }}"><i class="bi bi-house"></i> User Dashboard</a></li>
|
||||
{% endif %}
|
||||
<li><a class="dropdown-item" href="{{ url_for('view_schedules') }}"><i class="bi bi-calendar"></i> Schedules</a></li>
|
||||
<li><a class="dropdown-item" href="{{ url_for('view_channels') }}"><i class="bi bi-collection-play"></i> Channels</a></li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
@@ -259,16 +263,16 @@
|
||||
}
|
||||
|
||||
function editChannel(channelId) {
|
||||
alert('Edit channel functionality coming soon!');
|
||||
window.location.href = `/edit_channel/${channelId}`;
|
||||
}
|
||||
|
||||
function manageContent(channelId) {
|
||||
alert('Content management functionality coming soon!');
|
||||
window.location.href = `/manage_content/${channelId}`;
|
||||
}
|
||||
|
||||
function deleteChannel(channelId) {
|
||||
if (confirm('Are you sure you want to delete this channel?')) {
|
||||
alert('Delete channel functionality coming soon!');
|
||||
if (confirm('Are you sure you want to delete this channel? This action cannot be undone.')) {
|
||||
window.location.href = `/delete_channel/${channelId}`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user