functioning
This commit is contained in:
@@ -2,14 +2,64 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Player Schedule</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Player Schedule</h1>
|
||||
<ul>
|
||||
{% for item in schedule %}
|
||||
<li>{{ item.file }} - {{ item.duration }} seconds</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<a href="{{ url_for('dashboard') }}">Back to Dashboard</a>
|
||||
<div class="container py-5">
|
||||
<h1 class="text-center mb-4">Player Schedule for {{ player.username }}</h1>
|
||||
|
||||
<!-- Schedule Section -->
|
||||
<div class="card mb-4">
|
||||
<div class="card-header bg-primary text-white">
|
||||
<h2>Schedule</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<ul class="list-group">
|
||||
{% for item in content %}
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
{{ item.file_name }} - {{ item.duration }} seconds
|
||||
</div>
|
||||
<div>
|
||||
<!-- Edit Duration Form -->
|
||||
<form action="{{ url_for('edit_content', content_id=item.id) }}" method="post" class="d-inline">
|
||||
<input type="number" name="duration" value="{{ item.duration }}" class="form-control d-inline-block" style="width: 80px;" required>
|
||||
<button type="submit" class="btn btn-sm btn-warning">Edit</button>
|
||||
</form>
|
||||
<!-- Delete Resource Form -->
|
||||
<form action="{{ url_for('delete_content', content_id=item.id) }}" method="post" class="d-inline">
|
||||
<button type="submit" class="btn btn-sm btn-danger" onclick="return confirm('Are you sure you want to delete this resource?');">Delete</button>
|
||||
</form>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Upload Section -->
|
||||
<div class="card mb-4">
|
||||
<div class="card-header bg-success text-white">
|
||||
<h2>Upload Content</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="{{ url_for('upload_content_to_player', player_id=player.id) }}" method="post" enctype="multipart/form-data">
|
||||
<div class="mb-3">
|
||||
<label for="files" class="form-label">Select Images</label>
|
||||
<input type="file" class="form-control" id="files" name="files" multiple required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="duration" class="form-label">Display Duration (seconds)</label>
|
||||
<input type="number" class="form-control" id="duration" name="duration" required>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Upload</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href="{{ url_for('dashboard') }}" class="btn btn-secondary">Back to Dashboard</a>
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
Reference in New Issue
Block a user