roomplan persistence
This commit is contained in:
5
src/main/resources/db/migration/V0002__image.sql
Normal file
5
src/main/resources/db/migration/V0002__image.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
create table image (
|
||||
id bigint not null primary key,
|
||||
name varchar not null unique,
|
||||
data bytea not null
|
||||
);
|
||||
@@ -2,11 +2,15 @@
|
||||
{#room_active}active{/}
|
||||
{#contents}
|
||||
|
||||
<div class="mt-2">
|
||||
<img src="/room/plan" alt="kein Raumplan vorhanden">
|
||||
</div>
|
||||
|
||||
{#if is_admin}
|
||||
<div class="mt-2">
|
||||
<form action="/room/plan" method="POST" enctype="multipart/form-data">
|
||||
<label id="filelabel" class="btn btn-secondary" for="fileinput">
|
||||
Raumplan auswählen...
|
||||
neuen Raumplan auswählen...
|
||||
</label>
|
||||
<input id="fileinput" type="file" name="file" accept="image/*" hidden
|
||||
onchange="document.getElementById('filelabel').innerHTML = 'Datei: ' + this.files[0].name;" />
|
||||
|
||||
Reference in New Issue
Block a user