fehler in connections

This commit is contained in:
2026-02-12 09:45:00 +01:00
parent 2c1a8c2a1f
commit 88c8a3fd58
2 changed files with 9 additions and 135 deletions

View File

@@ -77,7 +77,7 @@ $devices = $sql->get("SELECT id, name FROM devices ORDER BY name", "", []);
Filter-Toolbar
========================= -->
<div class="filter-form">
<form method="GET" style="display: flex; gap: 10px; flex-wrap: wrap; align-items: center;">
<form method="GET">
<input type="hidden" name="module" value="connections">
<input type="hidden" name="action" value="list">
@@ -96,7 +96,7 @@ $devices = $sql->get("SELECT id, name FROM devices ORDER BY name", "", []);
<button type="submit" class="button">Filter</button>
<a href="?module=connections&action=list" class="button">Reset</a>
<a href="?module=connections&action=save" class="button button-primary" style="margin-left: auto;">+ Neue Verbindung</a>
<a href="?module=connections&action=save" class="button button-primary">+ Neue Verbindung</a>
</form>
</div>
@@ -146,7 +146,12 @@ $devices = $sql->get("SELECT id, name FROM devices ORDER BY name", "", []);
<td class="actions">
<a href="?module=connections&action=edit&id=<?php echo $conn['id']; ?>" class="button button-small">Bearbeiten</a>
<a href="#" class="button button-small button-danger" onclick="confirmDelete(<?php echo $conn['id']; ?>)">Löschen</a>
<a href="#" class="button button-small button-danger"
data-confirm-delete="true"
data-confirm-message="Diese Verbindung wirklich löschen?"
data-confirm-feedback="Löschen noch nicht implementiert">
Löschen
</a>
</td>
</tr>
<?php endforeach; ?>
@@ -165,122 +170,6 @@ $devices = $sql->get("SELECT id, name FROM devices ORDER BY name", "", []);
<?php endif; ?>
</div>
<style>
.connections-container {
padding: 20px;
max-width: 1200px;
margin: 0 auto;
}
.filter-form {
margin: 20px 0;
}
.filter-form form {
display: flex;
gap: 10px;
flex-wrap: wrap;
align-items: center;
}
.filter-form input,
.filter-form select {
padding: 8px 12px;
border: 1px solid #ddd;
border-radius: 4px;
}
.search-input {
flex: 1;
min-width: 250px;
}
.connections-list {
width: 100%;
border-collapse: collapse;
margin: 15px 0;
}
.connections-list th {
background: #f5f5f5;
padding: 12px;
text-align: left;
border-bottom: 2px solid #ddd;
font-weight: bold;
}
.connections-list td {
padding: 12px;
border-bottom: 1px solid #ddd;
}
.connections-list tr:hover {
background: #f9f9f9;
}
.actions {
white-space: nowrap;
}
.button {
display: inline-block;
padding: 8px 12px;
background: #007bff;
color: white;
text-decoration: none;
border-radius: 4px;
border: none;
cursor: pointer;
font-size: 0.9em;
}
.button:hover {
background: #0056b3;
}
.button-primary {
background: #28a745;
}
.button-primary:hover {
background: #218838;
}
.button-small {
padding: 4px 8px;
font-size: 0.85em;
}
.button-danger {
background: #dc3545;
}
.button-danger:hover {
background: #c82333;
}
.empty-state {
text-align: center;
padding: 40px 20px;
background: #f9f9f9;
border: 1px solid #eee;
border-radius: 8px;
}
</style>
<script>
function confirmDelete(id) {
if (confirm('Diese Verbindung wirklich löschen?')) {
// TODO: AJAX-Delete implementieren
alert('Löschen noch nicht implementiert');
}
}
</script>
>
<!-- wird komplett per JS gerendert -->
</svg>
</div>
<!-- =========================
Sidebar / Details
========================= -->
@@ -297,18 +186,3 @@ function confirmDelete(id) {
<!-- TODO: Verbindung bearbeiten / löschen -->
</aside>
<!-- =========================
JS-Konfiguration
========================= -->
<script>
/**
* Konfiguration für network-view.js
* Wird bewusst hier gesetzt, nicht im JS selbst
*/
// TODO: Kontext-ID aus PHP setzen
// window.NETWORK_CONTEXT_ID = <?= (int)$contextId ?>;
</script>

View File

@@ -9,7 +9,7 @@
</main>
<footer>
<p>&copy; <?php echo date('Y'); ?> Meine Firma - Netzwerk Dokumentation</p>
<p>&copy; <?php echo date('Y'); ?> Troy Grunt - NDT</p>
<!-- TODO: Optional: Statusanzeige, Debug-Info, Session-Hinweis -->
</footer>