youtube_live_calendar/views/admin/channel.ejs

67 lines
2.5 KiB
Plaintext
Raw Permalink Normal View History

<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/css/hyAdmin/common.css">
</head>
<%- include("../partials/head") %>
<body>
<%- include("../partials/admin/header") %>
<div class="header-spacer"></div>
<div class="main-content">
<h1>チャンネル管理</h1>
<div class="add-channel">
<a href="/hyAdmin/channel/new" class="btn">新しいチャンネルを追加</a>
</div>
<table class="admin-table">
<thead>
<tr>
<th>ID</th>
<th>チャンネル名</th>
<th>ハンドル</th>
<th>YouTube ID</th>
<th>操作</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>
<div class="action-buttons">
<form action="/hyAdmin/channel/<%= channel.id %>/edit" method="GET">
<button type="submit" class="btn btn-edit">編集</button>
</form>
<form action="/hyAdmin/channel/<%= channel.id %>?_method=DELETE" method="POST">
<button type="submit" class="btn btn-delete" onclick="return confirm('本当にこのチャンネルを削除しますか?');">削除</button>
</form>
<form action="/hyAdmin/channel/<%= channel.id %>/run" method="GET">
<button type="submit" class="btn btn-run">スケジュール取得</button>
</form>
<form action="/hyAdmin/channel/<%= channel.id %>/fetch-history" method="POST" class="history-form">
<div class="date-group">
<label>
開始日:
<input type="date" name="startDate" required>
</label>
<label>
終了日:
<input type="date" name="endDate" required>
</label>
<button type="submit" class="btn btn-fetch">履歴取得</button>
</div>
</form>
</div>
</td>
</tr>
<% }) %>
</tbody>
</table>
</div>
</body>
</html>