moved add news button
This commit is contained in:
@@ -457,11 +457,23 @@ $counts['total'] = count($all_contributions);
|
||||
<!-- News Article Tab -->
|
||||
<!-- ========================================================= -->
|
||||
<div id="tab-news" class="page-tab-content" style="display:none;">
|
||||
<div class="tab-header">
|
||||
<h2><i class="fa-solid fa-newspaper"></i> Neuigkeiten</h2>
|
||||
<button class="btn btn-approve" onclick="createNews()">
|
||||
<i class="fa-solid fa-plus"></i> Nachricht hinzufügen
|
||||
</button>
|
||||
|
||||
<!-- Filter -->
|
||||
<div class="filter-tabs" id="news-filter-tabs">
|
||||
<button class="filter-tab active" onclick="filterNewsByStatus('all', this)">
|
||||
Alle <span class="tab-count"><?= count($news_items) ?></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Sort Controls -->
|
||||
<div class="sort-controls">
|
||||
<span id="news-visible-count"><?= count($news_items) ?> Neuigkeiten</span>
|
||||
<div style="display:flex;gap:var(--space-sm);align-items:center;">
|
||||
<select onchange="sortNewsRows(this.value)">
|
||||
<option value="date-desc">Neueste zuerst</option>
|
||||
<option value="date-asc">Älteste zuerst</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (empty($news_items)): ?>
|
||||
@@ -471,7 +483,7 @@ $counts['total'] = count($all_contributions);
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<?php foreach ($news_items as $news): ?>
|
||||
<div class="contribution-row" data-id="<?= $news['news_id'] ?>">
|
||||
<div class="contribution-row" data-id="<?= $news['news_id'] ?>" data-date="<?= $news['published_at'] ?>">
|
||||
<div class="contribution-row-header" onclick="toggleRow(this.parentElement)">
|
||||
<div class="contribution-row-summary">
|
||||
<span class="title"><?= htmlspecialchars($news['title']) ?></span>
|
||||
@@ -498,6 +510,12 @@ $counts['total'] = count($all_contributions);
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="tab-footer-action">
|
||||
<button class="btn btn-approve" onclick="createNews()">
|
||||
<i class="fa-solid fa-plus"></i> Neuigkeit hinzufügen
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user