Files
netwatch/app/modules/floors/list.php

97 lines
2.0 KiB
PHP

<?php
/**
* app/floors/list.php
*
* Übersicht aller Floors / Stockwerke
* - Anzeigen
* - Bearbeiten
* - Löschen
* - SVG-Vorschau optional
*/
// TODO: bootstrap laden
// require_once __DIR__ . '/../../bootstrap.php';
// TODO: Auth erzwingen
// requireAuth();
// =========================
// Floors laden
// =========================
// TODO: Floors aus DB laden
// $floors = $sql->get("SELECT * FROM floors ORDER BY name", "", []);
?>
<h2>Stockwerke</h2>
<!-- =========================
Toolbar
========================= -->
<div class="toolbar">
<a href="/?page=floors/edit" class="button">
+ Neues Stockwerk
</a>
<!-- TODO: Suchfeld -->
<!-- TODO: Filter (Gebäude / Standort) -->
</div>
<!-- =========================
Floor-Tabelle
========================= -->
<table class="floor-list">
<thead>
<tr>
<th>Vorschau</th>
<th>Name</th>
<th>Beschreibung</th>
<th>Räume</th>
<th>Aktionen</th>
</tr>
</thead>
<tbody>
<?php /* foreach ($floors as $floor): */ ?>
<tr>
<td class="preview">
<!-- TODO: SVG / JPG Thumbnail Floorplan -->
</td>
<td>
<!-- TODO: Name -->
Floor 1
</td>
<td>
<!-- TODO: Beschreibung -->
</td>
<td>
<!-- TODO: Anzahl Räume -->
</td>
<td>
<a href="/?page=floors/edit&id=1">Bearbeiten</a>
<button>Löschen</button>
</td>
</tr>
<?php /* endforeach; */ ?>
</tbody>
</table>
<!-- =========================
Leerer Zustand
========================= -->
<?php /* if (empty($floors)): */ ?>
<div class="empty-state">
<p>Noch keine Stockwerke angelegt.</p>
<p><a href="/?page=floors/edit">Erstes Stockwerk anlegen</a></p>
</div>
<?php /* endif; */ ?>