2026-02-25 02:12:56 +00:00

34 lines
1.1 KiB
Markdown

# TODO: Add Delete and Edit options to channel video 3-dot menu
## Task
In `https://video.innovator.bh/channel/2`, the 3-dot menu must have Delete and Edit options.
## Requirements
- `/videos` (public area) - NO edit/delete options
- `/channel/{id}` (user channel page) - Edit and Delete options for the channel owner only
## Plan
### Step 1: Modify app.blade.php
- Add include for edit-video-modal partial
### Step 2: Modify channel.blade.php
- Add conditional check for video ownership
- Add Edit button that calls openEditVideoModal()
- Add Delete button with confirmation
- Add separator before owner-only options
### Step 3: Add JavaScript for delete functionality
- Add deleteVideo() function with AJAX call
### Step 4: Update VideoController
- Add ownership check to destroy method
- Return JSON for AJAX requests
## Status: Completed
## Files Modified
1. `resources/views/layouts/app.blade.php` - Added edit-video-modal include
2. `resources/views/user/channel.blade.php` - Added Edit/Delete in dropdown
3. `app/Http/Controllers/VideoController.php` - Updated destroy method