Cleanup UI
This commit is contained in:
parent
5d4a591de6
commit
1d4196d50b
22
calendar.php
22
calendar.php
@ -176,11 +176,6 @@ $infomercials = $db->query("
|
|||||||
<div class="infomercial-duration">
|
<div class="infomercial-duration">
|
||||||
<i class="bi bi-clock"></i> <?= $infomercial['duration'] ?>
|
<i class="bi bi-clock"></i> <?= $infomercial['duration'] ?>
|
||||||
</div>
|
</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>
|
||||||
<div>
|
<div>
|
||||||
<i class="bi bi-grip-vertical text-muted"></i>
|
<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>
|
<h6 class="mb-0"><i class="bi bi-palette"></i> Legenda</h6>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body p-2">
|
<div class="card-body p-2">
|
||||||
<div class="small">
|
<div class="small text-muted">
|
||||||
<?php
|
<p class="mb-0">Kleuren worden automatisch toegewezen per infomercial</p>
|
||||||
$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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -399,12 +399,6 @@ $infomercials = $db->query("
|
|||||||
<small class="text-muted">Formaat: UU:MM:SS</small>
|
<small class="text-muted">Formaat: UU:MM:SS</small>
|
||||||
</div>
|
</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'] ?>">
|
<input type="hidden" name="season_id" value="<?= $_ENV['TV_SEASON_ID'] ?>">
|
||||||
|
|
||||||
@ -453,7 +447,6 @@ $infomercials = $db->query("
|
|||||||
<th>Kleur</th>
|
<th>Kleur</th>
|
||||||
<th>Titel</th>
|
<th>Titel</th>
|
||||||
<th>Duur</th>
|
<th>Duur</th>
|
||||||
<th>Series</th>
|
|
||||||
<th>Label</th>
|
<th>Label</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
<th>Gebruik</th>
|
<th>Gebruik</th>
|
||||||
@ -477,9 +470,6 @@ $infomercials = $db->query("
|
|||||||
<td>
|
<td>
|
||||||
<span class="badge bg-info"><?= $c['duration'] ?></span>
|
<span class="badge bg-info"><?= $c['duration'] ?></span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
|
||||||
<?= $c['series_code'] ? '<span class="badge bg-secondary">' . htmlspecialchars($c['series_code']) . '</span>' : '-' ?>
|
|
||||||
</td>
|
|
||||||
<td>
|
<td>
|
||||||
<code class="small"><?= htmlspecialchars($c['media_asset_label']) ?></code>
|
<code class="small"><?= htmlspecialchars($c['media_asset_label']) ?></code>
|
||||||
</td>
|
</td>
|
||||||
@ -496,20 +486,18 @@ $infomercials = $db->query("
|
|||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="btn-group btn-group-sm">
|
<div class="action-buttons">
|
||||||
<form method="POST" style="display:inline;">
|
<form method="POST" style="display:inline;">
|
||||||
<input type="hidden" name="infomercial_id" value="<?= $c['id'] ?>">
|
<input type="hidden" name="infomercial_id" value="<?= $c['id'] ?>">
|
||||||
<button type="submit" name="refresh_infomercial"
|
<button type="submit" name="refresh_infomercial"
|
||||||
class="btn btn-outline-info"
|
class="btn-icon btn-icon-xs btn-icon-info">
|
||||||
title="Ververs vanuit Talpa">
|
|
||||||
<i class="bi bi-arrow-clockwise"></i>
|
<i class="bi bi-arrow-clockwise"></i>
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="btn btn-outline-primary"
|
class="btn-icon btn-icon-xs btn-icon-primary"
|
||||||
data-bs-toggle="modal"
|
data-bs-toggle="modal"
|
||||||
data-bs-target="#editModal<?= $c['id'] ?>"
|
data-bs-target="#editModal<?= $c['id'] ?>">
|
||||||
title="Bewerken">
|
|
||||||
<i class="bi bi-pencil"></i>
|
<i class="bi bi-pencil"></i>
|
||||||
</button>
|
</button>
|
||||||
<?php if ($c['usage_count'] == 0): ?>
|
<?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?');">
|
onsubmit="return confirm('Weet je zeker dat je deze infomercial wilt verwijderen?');">
|
||||||
<input type="hidden" name="infomercial_id" value="<?= $c['id'] ?>">
|
<input type="hidden" name="infomercial_id" value="<?= $c['id'] ?>">
|
||||||
<button type="submit" name="delete_commercial"
|
<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>
|
<i class="bi bi-trash"></i>
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
@ -573,12 +561,6 @@ $infomercials = $db->query("
|
|||||||
<option value="uploaded" <?= $c['upload_status'] == 'uploaded' ? 'selected' : '' ?>>Uploaded</option>
|
<option value="uploaded" <?= $c['upload_status'] == 'uploaded' ? 'selected' : '' ?>>Uploaded</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</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">
|
<div class="mb-3">
|
||||||
<label class="form-label">Kleurcode</label>
|
<label class="form-label">Kleurcode</label>
|
||||||
<input type="color" name="color_code" class="form-control form-control-color"
|
<input type="color" name="color_code" class="form-control form-control-color"
|
||||||
|
|||||||
@ -506,7 +506,6 @@ function calculateNextStartTimeForBlock($db, $date, $channel, $blockId) {
|
|||||||
<thead class="table-light">
|
<thead class="table-light">
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 40px;"></th>
|
<th style="width: 40px;"></th>
|
||||||
<th style="width: 50px;">Code</th>
|
|
||||||
<th>Product</th>
|
<th>Product</th>
|
||||||
<th style="width: 80px;">Duur</th>
|
<th style="width: 80px;">Duur</th>
|
||||||
<th style="width: 70px;">Start</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 ?>">
|
<tbody data-block-id="<?= $block['id'] ?>" data-channel="<?= $channel ?>" data-date="<?= $selectedDate ?>">
|
||||||
<?php if (empty($blockTransmissions)): ?>
|
<?php if (empty($blockTransmissions)): ?>
|
||||||
<tr>
|
<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>
|
<small>Nog geen uitzendingen in dit blok</small>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -536,9 +535,6 @@ function calculateNextStartTimeForBlock($db, $date, $channel, $blockId) {
|
|||||||
<td>
|
<td>
|
||||||
<div class="color-indicator" style="background-color: <?= htmlspecialchars($tx['color_code']) ?>;"></div>
|
<div class="color-indicator" style="background-color: <?= htmlspecialchars($tx['color_code']) ?>;"></div>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-center">
|
|
||||||
<small><strong><?= htmlspecialchars($tx['series_code'] ?? '-') ?></strong></small>
|
|
||||||
</td>
|
|
||||||
<td>
|
<td>
|
||||||
<strong><?= htmlspecialchars($tx['title']) ?></strong>
|
<strong><?= htmlspecialchars($tx['title']) ?></strong>
|
||||||
</td>
|
</td>
|
||||||
@ -623,7 +619,7 @@ function calculateNextStartTimeForBlock($db, $date, $channel, $blockId) {
|
|||||||
data-block-id="<?= $block['id'] ?>"
|
data-block-id="<?= $block['id'] ?>"
|
||||||
data-channel="<?= $channel ?>"
|
data-channel="<?= $channel ?>"
|
||||||
data-date="<?= $selectedDate ?>">
|
data-date="<?= $selectedDate ?>">
|
||||||
<td colspan="8">
|
<td colspan="7">
|
||||||
<form method="POST" class="row g-2 align-items-center">
|
<form method="POST" class="row g-2 align-items-center">
|
||||||
<input type="hidden" name="date" value="<?= $selectedDate ?>">
|
<input type="hidden" name="date" value="<?= $selectedDate ?>">
|
||||||
<input type="hidden" name="channel" value="<?= $channel ?>">
|
<input type="hidden" name="channel" value="<?= $channel ?>">
|
||||||
@ -634,7 +630,6 @@ function calculateNextStartTimeForBlock($db, $date, $channel, $blockId) {
|
|||||||
<option value="">+ Voeg infomercial toe...</option>
|
<option value="">+ Voeg infomercial toe...</option>
|
||||||
<?php foreach ($infomercials as $c): ?>
|
<?php foreach ($infomercials as $c): ?>
|
||||||
<option value="<?= $c['id'] ?>">
|
<option value="<?= $c['id'] ?>">
|
||||||
<?= htmlspecialchars($c['series_code'] ?? '') ?> -
|
|
||||||
<?= htmlspecialchars($c['title']) ?>
|
<?= htmlspecialchars($c['title']) ?>
|
||||||
(<?= round(timeToSeconds($c['duration']) / 60) ?> min)
|
(<?= round(timeToSeconds($c['duration']) / 60) ?> min)
|
||||||
</option>
|
</option>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user