Cleanup UI

This commit is contained in:
Mark Pinkster 2026-01-16 13:05:11 +01:00
parent 5d4a591de6
commit 1d4196d50b
3 changed files with 9 additions and 50 deletions

View File

@ -176,11 +176,6 @@ $infomercials = $db->query("
<div class="infomercial-duration">
<i class="bi bi-clock"></i> <?= $infomercial['duration'] ?>
</div>
<?php if ($infomercial['series_code']): ?>
<div class="infomercial-series">
<i class="bi bi-tag"></i> <?= htmlspecialchars($infomercial['series_code']) ?>
</div>
<?php endif; ?>
</div>
<div>
<i class="bi bi-grip-vertical text-muted"></i>
@ -206,21 +201,8 @@ $infomercials = $db->query("
<h6 class="mb-0"><i class="bi bi-palette"></i> Legenda</h6>
</div>
<div class="card-body p-2">
<div class="small">
<?php
$uniqueColors = [];
foreach ($infomercials as $infomercial) {
if ($infomercial['series_code'] && !isset($uniqueColors[$infomercial['series_code']])) {
$uniqueColors[$infomercial['series_code']] = $infomercial['color_code'];
}
}
?>
<?php foreach ($uniqueColors as $code => $color): ?>
<div class="d-flex align-items-center mb-2">
<div style="width: 20px; height: 20px; background-color: <?= $color ?>; border-radius: 3px; margin-right: 8px;"></div>
<span><?= htmlspecialchars($code) ?></span>
</div>
<?php endforeach; ?>
<div class="small text-muted">
<p class="mb-0">Kleuren worden automatisch toegewezen per infomercial</p>
</div>
</div>
</div>

View File

@ -399,12 +399,6 @@ $infomercials = $db->query("
<small class="text-muted">Formaat: UU:MM:SS</small>
</div>
<div class="mb-3">
<label class="form-label">Series Code (optioneel)</label>
<input type="text" name="series_code" class="form-control"
placeholder="bijv. 006a">
<small class="text-muted">Voor groepering in kalender</small>
</div>
<input type="hidden" name="season_id" value="<?= $_ENV['TV_SEASON_ID'] ?>">
@ -453,7 +447,6 @@ $infomercials = $db->query("
<th>Kleur</th>
<th>Titel</th>
<th>Duur</th>
<th>Series</th>
<th>Label</th>
<th>Status</th>
<th>Gebruik</th>
@ -477,9 +470,6 @@ $infomercials = $db->query("
<td>
<span class="badge bg-info"><?= $c['duration'] ?></span>
</td>
<td>
<?= $c['series_code'] ? '<span class="badge bg-secondary">' . htmlspecialchars($c['series_code']) . '</span>' : '-' ?>
</td>
<td>
<code class="small"><?= htmlspecialchars($c['media_asset_label']) ?></code>
</td>
@ -496,20 +486,18 @@ $infomercials = $db->query("
</span>
</td>
<td>
<div class="btn-group btn-group-sm">
<div class="action-buttons">
<form method="POST" style="display:inline;">
<input type="hidden" name="infomercial_id" value="<?= $c['id'] ?>">
<button type="submit" name="refresh_infomercial"
class="btn btn-outline-info"
title="Ververs vanuit Talpa">
class="btn-icon btn-icon-xs btn-icon-info">
<i class="bi bi-arrow-clockwise"></i>
</button>
</form>
<button type="button"
class="btn btn-outline-primary"
class="btn-icon btn-icon-xs btn-icon-primary"
data-bs-toggle="modal"
data-bs-target="#editModal<?= $c['id'] ?>"
title="Bewerken">
data-bs-target="#editModal<?= $c['id'] ?>">
<i class="bi bi-pencil"></i>
</button>
<?php if ($c['usage_count'] == 0): ?>
@ -517,7 +505,7 @@ $infomercials = $db->query("
onsubmit="return confirm('Weet je zeker dat je deze infomercial wilt verwijderen?');">
<input type="hidden" name="infomercial_id" value="<?= $c['id'] ?>">
<button type="submit" name="delete_commercial"
class="btn btn-outline-danger" title="Verwijderen">
class="btn-icon btn-icon-xs btn-icon-danger">
<i class="bi bi-trash"></i>
</button>
</form>
@ -573,12 +561,6 @@ $infomercials = $db->query("
<option value="uploaded" <?= $c['upload_status'] == 'uploaded' ? 'selected' : '' ?>>Uploaded</option>
</select>
</div>
<div class="mb-3">
<label class="form-label">Series Code</label>
<input type="text" name="series_code" class="form-control"
value="<?= htmlspecialchars($c['series_code'] ?? '') ?>"
placeholder="bijv. 006a">
</div>
<div class="mb-3">
<label class="form-label">Kleurcode</label>
<input type="color" name="color_code" class="form-control form-control-color"

View File

@ -506,7 +506,6 @@ function calculateNextStartTimeForBlock($db, $date, $channel, $blockId) {
<thead class="table-light">
<tr>
<th style="width: 40px;"></th>
<th style="width: 50px;">Code</th>
<th>Product</th>
<th style="width: 80px;">Duur</th>
<th style="width: 70px;">Start</th>
@ -519,7 +518,7 @@ function calculateNextStartTimeForBlock($db, $date, $channel, $blockId) {
<tbody data-block-id="<?= $block['id'] ?>" data-channel="<?= $channel ?>" data-date="<?= $selectedDate ?>">
<?php if (empty($blockTransmissions)): ?>
<tr>
<td colspan="8" class="text-center text-muted py-3">
<td colspan="7" class="text-center text-muted py-3">
<small>Nog geen uitzendingen in dit blok</small>
</td>
</tr>
@ -536,9 +535,6 @@ function calculateNextStartTimeForBlock($db, $date, $channel, $blockId) {
<td>
<div class="color-indicator" style="background-color: <?= htmlspecialchars($tx['color_code']) ?>;"></div>
</td>
<td class="text-center">
<small><strong><?= htmlspecialchars($tx['series_code'] ?? '-') ?></strong></small>
</td>
<td>
<strong><?= htmlspecialchars($tx['title']) ?></strong>
</td>
@ -623,7 +619,7 @@ function calculateNextStartTimeForBlock($db, $date, $channel, $blockId) {
data-block-id="<?= $block['id'] ?>"
data-channel="<?= $channel ?>"
data-date="<?= $selectedDate ?>">
<td colspan="8">
<td colspan="7">
<form method="POST" class="row g-2 align-items-center">
<input type="hidden" name="date" value="<?= $selectedDate ?>">
<input type="hidden" name="channel" value="<?= $channel ?>">
@ -634,7 +630,6 @@ function calculateNextStartTimeForBlock($db, $date, $channel, $blockId) {
<option value="">+ Voeg infomercial toe...</option>
<?php foreach ($infomercials as $c): ?>
<option value="<?= $c['id'] ?>">
<?= htmlspecialchars($c['series_code'] ?? '') ?> -
<?= htmlspecialchars($c['title']) ?>
(<?= round(timeToSeconds($c['duration']) / 60) ?> min)
</option>