45 lines
1.4 KiB
Plaintext
45 lines
1.4 KiB
Plaintext
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Channel List</title>
|
|
</head>
|
|
<body>
|
|
<h1>Channel List</h1>
|
|
<a href="/admin/channels/new">Add New Channel</a>
|
|
<table border="1">
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Name</th>
|
|
<th>Channel Handle</th>
|
|
<th>YouTube ID</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% channels.forEach(channel => { %>
|
|
<tr>
|
|
<td><%= channel.id %></td>
|
|
<td><%= channel.name %></td>
|
|
<td><%= channel.channel_handle %></td>
|
|
<td><%= channel.youtube_id %></td>
|
|
<td>
|
|
<form action="/admin/channels/<%= channel.id %>/edit" method="GET" style="display:inline;">
|
|
<button type="submit">Edit</button>
|
|
</form>
|
|
<form action="/admin/channels/<%= channel.id %>?_method=DELETE" method="POST" style="display:inline;">
|
|
<button type="submit" onclick="return confirm('Are you sure you want to delete this channel?');">Delete</button>
|
|
</form>
|
|
<form action="/admin/channels/<%= channel.id %>/test" method="GET" style="display:inline;">
|
|
<button type="submit">Test</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
<% }) %>
|
|
</tbody>
|
|
</table>
|
|
</body>
|
|
</html>
|