Lagerhaus: stock and history of the legion's items

A new page records items handed in (item, quantity, when, and from whom -
a website account or a free-text name) and taken out (when, now or entered
by hand, and optionally to whom). Stock is always computed from the
movements, withdrawals can't exceed it, and a deposit can only be deleted
once nothing of it has been taken out. Stock is shown as cards with the item
picture and quantity, name and category below, plus search and a category
filter; the history lists every movement with who entered it.

The item list holds 2,301 weapons, armor pieces, accessories and consumables
read from the Aion 2 wiki's MediaWiki API, with each item's icon downscaled
to 128px under assets/images/warehouse/. It is loaded into the database on
first visit and again whenever the JSON changes. Unknown names can be added
as custom items after a confirmation, since the wiki lists no materials.

warehouse.view and warehouse.manage are new permissions. Missing core
permissions are now created automatically and granted to the Administrator
group, and the two tables are created like the other schema additions.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Maaxxs 2026-09-21 08:46:40 +02:00
parent ba8cf2a2ef
commit 3e025b811e
1493 changed files with 5791 additions and 2 deletions

View file

@ -26,6 +26,8 @@ und wird später ausgebaut. Fokus dieser Version ist der Mitglieder-/Admin-Berei
- Karte: interaktive Zoom-Karte aller Regionen (Verteron, Altgard, Elthen, Morheim, Poeta, - Karte: interaktive Zoom-Karte aller Regionen (Verteron, Altgard, Elthen, Morheim, Poeta,
Ishalgen, Reshanta) mit Markern und Kategorie-Filtern, dazu Taktiken in Schritten, die Ishalgen, Reshanta) mit Markern und Kategorie-Filtern, dazu Taktiken in Schritten, die
direkt auf die Karte gezeichnet werden direkt auf die Karte gezeichnet werden
- Lagerhaus: Bestand der Legion mit Einlagerungen (wer hat was wann überreicht) und Entnahmen
(wann, optional an wen), Gegenstandsliste aus dem Aion-2-Wiki mit rund 2.300 Einträgen
- Raids-Seite: zeigt anstehende Raid-Termine, Anforderungen, Gruppen und Anmeldungen, - Raids-Seite: zeigt anstehende Raid-Termine, Anforderungen, Gruppen und Anmeldungen,
bezogen von einer externen API (`config.php: raids_api`), Filter Aktiv/Archiviert/Alle bezogen von einer externen API (`config.php: raids_api`), Filter Aktiv/Archiviert/Alle
- "Mein Profil"-Seite: Anzeigename ändern, Passwort ändern, Discord-Verknüpfung verwalten - "Mein Profil"-Seite: Anzeigename ändern, Passwort ändern, Discord-Verknüpfung verwalten
@ -388,6 +390,47 @@ Berechtigung `map.manage` werden nicht mehr benutzt und können bei bestehenden
gelöscht werden. Die alten Taktiken werden nicht übernommen: Sie lagen als Anteil eines gelöscht werden. Die alten Taktiken werden nicht übernommen: Sie lagen als Anteil eines
selbst erstellten Kartenbildes vor, das mit den neuen Kacheln nicht übereinstimmt. selbst erstellten Kartenbildes vor, das mit den neuen Kacheln nicht übereinstimmt.
### Lagerhaus
Die Seite **Lagerhaus** (`warehouse.php`) führt Buch über die Gegenstände der Legion.
- **Einlagern:** Gegenstand, Anzahl, Zeitpunkt der Übergabe (vorbelegt mit jetzt, deutsche
Zeit) und von wem. Das ist entweder ein Konto der Website oder ein frei eingetragener Name
für Spieler ohne Konto. Optional eine Bemerkung.
- **Entnehmen:** Gegenstand aus dem Bestand, Anzahl, Zeitpunkt (jetzt oder von Hand) und
optional an wen, wieder als Konto oder Name. Mehr als vorhanden lässt sich nicht entnehmen.
- **Bestand** als Kacheln: Bild des Gegenstands mit der Menge, darunter Name und Kategorie.
Dazu Suche und Kategoriefilter. Ein Klick auf eine Kachel zeigt den Verlauf dieses
Gegenstands, die Knöpfe − und + öffnen Entnehmen bzw. Einlagern mit ihm.
- **Verlauf** aller Bewegungen mit dem Konto, das den Eintrag gemacht hat. Fehleingaben
lassen sich löschen. Eine Einlagerung, von der schon etwas entnommen wurde, erst nach der
passenden Entnahme.
Der Bestand wird nicht gespeichert, sondern immer aus den Bewegungen berechnet. Er kann
deshalb nie vom Verlauf abweichen.
**Gegenstandsliste:** `includes/data/warehouse_items.json` enthält 2.301 Waffen, Rüstungen,
Accessoires und Verbrauchsgüter aus dem
[Aion-2-Wiki](https://aion2.wiki.fextralife.com/Equipment_Information), gelesen über dessen
MediaWiki-API (Kategorien Bow, Sword, Boots, Ring, Potion usw.). Die Namen sind englisch wie
im Wiki. Die Website übernimmt die Datei beim ersten Aufruf des Lagerhauses in die Tabelle
`warehouse_items` und danach bei jeder Änderung der Datei. Neue Namen kommen dazu, nichts wird
gelöscht. Rohstoffe und Handwerksmaterialien führt das Wiki nicht: Wer beim Einlagern einen
unbekannten Namen eingibt, wird gefragt, ob er als neuer Gegenstand (Material, Sonstiges, …)
angelegt werden soll. So entstehen aus Tippfehlern keine neuen Einträge.
**Bilder:** Die Symbole der Gegenstände stammen ebenfalls aus dem Wiki (je Gegenstand das
Symbol seiner Wiki-Seite). Sie liegen auf 128×128 verkleinert unter `assets/images/warehouse/`
(1.481 Dateien, rund 10 MB, viele Gegenstände teilen sich ein Symbol) und werden von dort
ausgeliefert, nicht direkt vom Wiki. Die Zuordnung Gegenstand → Bild steht unter `icons` in
`includes/data/warehouse_items.json`. Selbst angelegte Gegenstände und die 7 Wiki-Einträge ohne
Bild zeigen einen Platzhalter.
Rechte: `warehouse.view` (Bestand und Verlauf ansehen) und `warehouse.manage` (einlagern,
entnehmen, Einträge löschen). Beide legt die Website nach dem Update selbst an und gibt sie
der Gruppe „Administrator“. Anderen Gruppen muss man sie unter Berechtigungsgruppen zuweisen.
Die Tabellen `warehouse_items` und `warehouse_movements` entstehen ebenfalls automatisch.
### Mitgliederliste ### Mitgliederliste
Zeigt alle aktiven Gildenmitglieder mit Profilbild und Rollen. Unter Berechtigungsgruppen -> Zeigt alle aktiven Gildenmitglieder mit Profilbild und Rollen. Unter Berechtigungsgruppen ->

View file

@ -527,6 +527,8 @@ label { font-weight: 600; font-size: 0.9rem; }
input[type="text"], input[type="text"],
input[type="email"], input[type="email"],
input[type="password"], input[type="password"],
input[type="number"],
input[type="search"],
input[type="datetime-local"], input[type="datetime-local"],
textarea, textarea,
select { select {
@ -2043,3 +2045,155 @@ a.icon-button:hover { text-decoration: none; }
.discord-sync-form span { flex: 1; min-width: 240px; font-size: 0.85rem; } .discord-sync-form span { flex: 1; min-width: 240px; font-size: 0.85rem; }
.flash-info { background: rgba(201, 162, 39, 0.12); border: 1px solid var(--gold); color: var(--gold); } .flash-info { background: rgba(201, 162, 39, 0.12); border: 1px solid var(--gold); color: var(--gold); }
/* --- Lagerhaus --- */
.app-content.bg-warehouse {
background-image: linear-gradient(rgba(20, 20, 20, 0.7), rgba(20, 20, 20, 0.85)), url('/assets/images/Landscapes/web/landscape6-bg.jpg');
}
.warehouse-head {
display: flex;
align-items: flex-start;
justify-content: space-between;
flex-wrap: wrap;
gap: 0.75rem 1.5rem;
}
.warehouse-head h1, .warehouse-head h2 { margin-bottom: 0.25rem; }
.warehouse-head p { margin-top: 0; }
.warehouse-filters {
display: flex;
flex-wrap: wrap;
gap: 0.75rem;
margin: 1rem 0;
}
.warehouse-filters input { flex: 1; min-width: 220px; }
.warehouse-filters select { width: auto; min-width: 200px; }
th.num, td.num { text-align: right; white-space: nowrap; }
.warehouse-no-match { margin-top: 0.75rem; }
.warehouse-pages {
display: flex;
justify-content: space-between;
margin-top: 1rem;
}
.warehouse-row,
.warehouse-counterpart {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0.75rem;
}
.warehouse-counterpart + .field-hint { margin: -0.25rem 0 0.75rem; }
.warehouse-new-item {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 0.5rem 1rem;
padding: 0.6rem 0.8rem;
margin-bottom: 0.75rem;
border: 1px solid var(--gold);
border-radius: 6px;
background: rgba(201, 162, 39, 0.08);
}
.warehouse-new-item label { margin: 0; }
.warehouse-new-item select { width: auto; }
@media (max-width: 600px) {
.warehouse-row, .warehouse-counterpart { grid-template-columns: 1fr; }
}
/* Bestand als Kacheln: Bild mit Menge, darunter Name und Kategorie */
.warehouse-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
gap: 0.75rem;
}
.warehouse-card {
display: flex;
flex-direction: column;
border: 1px solid var(--border);
border-radius: 10px;
background: rgba(35, 35, 35, 0.72);
transition: border-color 0.15s, transform 0.15s;
}
.warehouse-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.warehouse-card[hidden] { display: none; }
.warehouse-card-link {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.35rem;
flex: 1;
padding: 0.9rem 0.6rem 0.6rem;
color: var(--text);
text-align: center;
}
.warehouse-card-link:hover { text-decoration: none; color: var(--text); }
.warehouse-card-image { position: relative; display: inline-block; }
.warehouse-card-qty {
position: absolute;
right: -0.5rem;
bottom: -0.35rem;
min-width: 1.6rem;
padding: 0.05rem 0.4rem;
border-radius: 999px;
background: var(--gold);
color: #1a1a1a;
font-size: 0.8rem;
font-weight: 700;
line-height: 1.3rem;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
.warehouse-card-name {
margin-top: 0.3rem;
font-weight: 600;
font-size: 0.88rem;
line-height: 1.25;
overflow-wrap: anywhere;
}
.warehouse-card-category { font-size: 0.75rem; color: var(--text-muted); }
.warehouse-card-actions {
display: flex;
justify-content: center;
gap: 0.4rem;
padding: 0 0.6rem 0.7rem;
}
.warehouse-card-actions .icon-button { width: 30px; height: 30px; font-size: 1.05rem; }
.warehouse-icon {
display: inline-flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
border-radius: 8px;
background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.35));
object-fit: contain;
}
.warehouse-icon-placeholder { color: var(--text-muted); border: 1px dashed var(--border); }
.warehouse-icon-placeholder .icon { width: 45%; height: 45%; }
.warehouse-item-inline {
display: inline-flex;
align-items: center;
gap: 0.5rem;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Some files were not shown because too many files have changed in this diff Show more