feat: Erweiterung der Module für Geräte, Stockwerke und Racks mit grundlegenden Funktionen und Strukturen
This commit is contained in:
@@ -1,2 +1,111 @@
|
||||
<?php
|
||||
// Liste aller Geräte anzeigen
|
||||
/**
|
||||
* app/devices/list.php
|
||||
*
|
||||
* Übersicht aller Geräte
|
||||
* - Anzeigen
|
||||
* - Bearbeiten
|
||||
* - Löschen
|
||||
* - SVG / JPG Vorschau
|
||||
*/
|
||||
|
||||
// TODO: bootstrap laden
|
||||
// require_once __DIR__ . '/../../bootstrap.php';
|
||||
|
||||
// TODO: Auth erzwingen
|
||||
// requireAuth();
|
||||
|
||||
// =========================
|
||||
// Geräte laden
|
||||
// =========================
|
||||
|
||||
// TODO: Geräte aus DB laden
|
||||
// $devices = $sql->get("SELECT * FROM devices ORDER BY name", "", []);
|
||||
|
||||
?>
|
||||
|
||||
<h2>Geräte</h2>
|
||||
|
||||
<!-- =========================
|
||||
Toolbar
|
||||
========================= -->
|
||||
|
||||
<div class="toolbar">
|
||||
<a href="/?page=devices/edit" class="button">
|
||||
+ Neues Gerät
|
||||
</a>
|
||||
|
||||
<!-- TODO: Suchfeld -->
|
||||
<!-- TODO: Filter (Device-Type, Standort, Floor, Rack) -->
|
||||
</div>
|
||||
|
||||
<!-- =========================
|
||||
Geräte-Tabelle
|
||||
========================= -->
|
||||
|
||||
<table class="device-list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Vorschau</th>
|
||||
<th>Name</th>
|
||||
<th>Gerätetyp</th>
|
||||
<th>Standort</th>
|
||||
<th>Rack</th>
|
||||
<th>Rack-Pos</th>
|
||||
<th>Ports</th>
|
||||
<th>Aktionen</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php /* foreach ($devices as $device): */ ?>
|
||||
<tr>
|
||||
<td class="preview">
|
||||
<!-- TODO: SVG / JPG Thumbnail -->
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<!-- TODO: Name -->
|
||||
Gerät XY
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<!-- TODO: Gerätetyp -->
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<!-- TODO: Standort / Floor -->
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<!-- TODO: Rack -->
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<!-- TODO: Rack-Position -->
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<!-- TODO: Anzahl Ports -->
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a href="/?page=devices/edit&id=1">Bearbeiten</a>
|
||||
<button> Löschen </button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php /* endforeach; */ ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- =========================
|
||||
Leerer Zustand
|
||||
========================= -->
|
||||
|
||||
<?php /* if (empty($devices)): */ ?>
|
||||
<div class="empty-state">
|
||||
<p>Noch keine Geräte angelegt.</p>
|
||||
<p><a href="/?page=devices/edit">Erstes Gerät anlegen</a></p>
|
||||
</div>
|
||||
<?php /* endif; */ ?>
|
||||
|
||||
Reference in New Issue
Block a user