mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2026-02-04 10:35:30 +00:00
+reihen edit, personen edit
This commit is contained in:
@@ -2962,29 +2962,38 @@ class ai extends HTMLElement {
|
||||
});
|
||||
}
|
||||
}
|
||||
const li = "filter-list", ri = "scroll-button", oi = "tool-tip", di = "abbrev-tooltips", hi = "int-link", ci = "popup-image", ui = "tab-list", mi = "filter-pill", _i = "image-reel", pi = "multi-select-places", fi = "multi-select-simple", gi = "single-select-remote", Me = "reset-button", bi = "div-manager", Ei = "items-editor", Si = "almanach-edit-page", vi = "relations-editor";
|
||||
customElements.define(hi, je);
|
||||
customElements.define(di, T);
|
||||
customElements.define(li, Ue);
|
||||
customElements.define(ri, ze);
|
||||
customElements.define(oi, Ke);
|
||||
customElements.define(ci, We);
|
||||
customElements.define(ui, Ge);
|
||||
customElements.define(mi, He);
|
||||
customElements.define(_i, Je);
|
||||
customElements.define(pi, Re);
|
||||
customElements.define(fi, Oe);
|
||||
customElements.define(gi, Kt);
|
||||
class li extends HTMLElement {
|
||||
connectedCallback() {
|
||||
setTimeout(() => {
|
||||
const t = this.querySelector("form");
|
||||
t && typeof window.FormLoad == "function" && window.FormLoad(t);
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
const ri = "filter-list", oi = "scroll-button", di = "tool-tip", hi = "abbrev-tooltips", ci = "int-link", ui = "popup-image", mi = "tab-list", _i = "filter-pill", pi = "image-reel", fi = "multi-select-places", gi = "multi-select-simple", bi = "single-select-remote", Me = "reset-button", Ei = "div-manager", Si = "items-editor", vi = "almanach-edit-page", Li = "relations-editor", yi = "edit-page";
|
||||
customElements.define(ci, je);
|
||||
customElements.define(hi, T);
|
||||
customElements.define(ri, Ue);
|
||||
customElements.define(oi, ze);
|
||||
customElements.define(di, Ke);
|
||||
customElements.define(ui, We);
|
||||
customElements.define(mi, Ge);
|
||||
customElements.define(_i, He);
|
||||
customElements.define(pi, Je);
|
||||
customElements.define(fi, Re);
|
||||
customElements.define(gi, Oe);
|
||||
customElements.define(bi, Kt);
|
||||
customElements.define(Me, It);
|
||||
customElements.define(bi, xt);
|
||||
customElements.define(Ei, Pt);
|
||||
customElements.define(Si, Gt);
|
||||
customElements.define(vi, ai);
|
||||
function Li() {
|
||||
customElements.define(Ei, xt);
|
||||
customElements.define(Si, Pt);
|
||||
customElements.define(vi, Gt);
|
||||
customElements.define(Li, ai);
|
||||
customElements.define(yi, li);
|
||||
function Ai() {
|
||||
const l = window.location.pathname, t = window.location.search, e = l + t;
|
||||
return encodeURIComponent(e);
|
||||
}
|
||||
function yi(l = 5e3, t = 100) {
|
||||
function Ii(l = 5e3, t = 100) {
|
||||
return new Promise((e, i) => {
|
||||
let s = 0;
|
||||
const n = setInterval(() => {
|
||||
@@ -2992,8 +3001,8 @@ function yi(l = 5e3, t = 100) {
|
||||
}, t);
|
||||
});
|
||||
}
|
||||
async function Ai(l) {
|
||||
const t = await yi(), e = document.getElementById("qr");
|
||||
async function Ci(l) {
|
||||
const t = await Ii(), e = document.getElementById("qr");
|
||||
e && (e.innerHTML = "", e.classList.add("hidden"), new t(e, {
|
||||
text: l,
|
||||
width: 1280,
|
||||
@@ -3005,7 +3014,7 @@ async function Ai(l) {
|
||||
e.classList.remove("hidden");
|
||||
}, 20));
|
||||
}
|
||||
function Ii(l) {
|
||||
function Ti(l) {
|
||||
l && (l.addEventListener("focus", (t) => {
|
||||
t.preventDefault(), l.select();
|
||||
}), l.addEventListener("mousedown", (t) => {
|
||||
@@ -3018,7 +3027,7 @@ function Ii(l) {
|
||||
l.select();
|
||||
}));
|
||||
}
|
||||
function Ci() {
|
||||
function wi() {
|
||||
document.body.addEventListener("htmx:responseError", function(l) {
|
||||
const t = l.detail.requestConfig;
|
||||
if (t.boosted) {
|
||||
@@ -3028,7 +3037,7 @@ function Ci() {
|
||||
}
|
||||
});
|
||||
}
|
||||
function Ti(l, t) {
|
||||
function xi(l, t) {
|
||||
if (!(l instanceof HTMLElement)) {
|
||||
console.warn("Target must be an HTMLElement.");
|
||||
return;
|
||||
@@ -3073,7 +3082,7 @@ function E(l) {
|
||||
function Ne(l) {
|
||||
l.key === "Enter" && l.preventDefault();
|
||||
}
|
||||
function wi(l) {
|
||||
function ki(l) {
|
||||
if (!(l instanceof HTMLTextAreaElement)) {
|
||||
console.warn("HookupTextareaAutoResize: Provided element is not a textarea.");
|
||||
return;
|
||||
@@ -3082,7 +3091,7 @@ function wi(l) {
|
||||
E(l);
|
||||
});
|
||||
}
|
||||
function xi(l) {
|
||||
function Ri(l) {
|
||||
if (!(l instanceof HTMLTextAreaElement)) {
|
||||
console.warn("DisconnectTextareaAutoResize: Provided element is not a textarea.");
|
||||
return;
|
||||
@@ -3091,23 +3100,23 @@ function xi(l) {
|
||||
E(l);
|
||||
});
|
||||
}
|
||||
function ki(l) {
|
||||
function Oi(l) {
|
||||
!(l instanceof HTMLTextAreaElement) && l.classList.contains("no-enter") || l.addEventListener("keydown", Ne);
|
||||
}
|
||||
function Ri(l) {
|
||||
function Bi(l) {
|
||||
!(l instanceof HTMLTextAreaElement) && l.classList.contains("no-enter") || l.removeEventListener("keydown", Ne);
|
||||
}
|
||||
function Oi(l, t) {
|
||||
function Mi(l, t) {
|
||||
const e = !$e();
|
||||
for (const i of l)
|
||||
if (i.type === "childList") {
|
||||
for (const s of i.addedNodes)
|
||||
s.nodeType === Node.ELEMENT_NODE && s.matches("textarea") && e && (wi(s), E(s));
|
||||
s.nodeType === Node.ELEMENT_NODE && s.matches("textarea") && e && (ki(s), E(s));
|
||||
for (const s of i.removedNodes)
|
||||
s.nodeType === Node.ELEMENT_NODE && s.matches("textarea") && (Ri(s), e && xi(s));
|
||||
s.nodeType === Node.ELEMENT_NODE && s.matches("textarea") && (Bi(s), e && Ri(s));
|
||||
}
|
||||
}
|
||||
function Bi(l) {
|
||||
function $i(l) {
|
||||
if (console.log("=== FormLoad CALLED ==="), !(l instanceof HTMLFormElement)) {
|
||||
console.warn("FormLoad: Provided element is not a form.");
|
||||
return;
|
||||
@@ -3125,8 +3134,8 @@ function Bi(l) {
|
||||
}, 200);
|
||||
const e = document.querySelectorAll("textarea.no-enter");
|
||||
for (const n of e)
|
||||
ki(n);
|
||||
new MutationObserver(Oi).observe(l, {
|
||||
Oi(n);
|
||||
new MutationObserver(Mi).observe(l, {
|
||||
childList: !0,
|
||||
subtree: !0
|
||||
}), new MutationObserver((n) => {
|
||||
@@ -3151,16 +3160,17 @@ document.addEventListener("keydown", (l) => {
|
||||
const t = l.target;
|
||||
t instanceof HTMLElement && t.matches("textarea.no-enter") && l.preventDefault();
|
||||
});
|
||||
window.ShowBoostedErrors = Ci;
|
||||
window.GenQRCode = Ai;
|
||||
window.SelectableInput = Ii;
|
||||
window.PathPlusQuery = Li;
|
||||
window.HookupRBChange = Ti;
|
||||
window.FormLoad = Bi;
|
||||
window.ShowBoostedErrors = wi;
|
||||
window.GenQRCode = Ci;
|
||||
window.SelectableInput = Ti;
|
||||
window.PathPlusQuery = Ai;
|
||||
window.HookupRBChange = xi;
|
||||
window.FormLoad = $i;
|
||||
window.TextareaAutoResize = E;
|
||||
export {
|
||||
T as AbbreviationTooltips,
|
||||
Gt as AlmanachEditPage,
|
||||
li as EditPage,
|
||||
Ue as FilterList,
|
||||
He as FilterPill,
|
||||
Je as ImageReel,
|
||||
|
||||
@@ -41,6 +41,12 @@
|
||||
<span class="filtercategory">Person</span>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{- if (IsAdminOrEditor $model.request.user) -}}
|
||||
<div class="font-sans mt-1">
|
||||
<i class="ri-edit-line"></i>
|
||||
<a href="/person/{{ $model.result.Agent.Id }}/edit">Bearbeiten</a>
|
||||
</div>
|
||||
{{- end -}}
|
||||
<h1 class="text-3xl font-bold">{{ $model.result.Agent.Name }}</h1>
|
||||
{{- if $model.result.Agent.Pseudonyms -}}
|
||||
<p class="italic">
|
||||
|
||||
147
views/routes/person/edit/body.gohtml
Normal file
147
views/routes/person/edit/body.gohtml
Normal file
@@ -0,0 +1,147 @@
|
||||
{{ $model := . }}
|
||||
{{ $agent := $model.result.Agent }}
|
||||
|
||||
<edit-page>
|
||||
<div class="flex container-normal bg-slate-100 mx-auto px-8">
|
||||
<div class="flex flex-row w-full justify-between">
|
||||
<div class="flex flex-col justify-end-safe flex-2/5">
|
||||
<h1 class="text-2xl w-full font-bold text-slate-900 mb-4">{{ $agent.Name }}</h1>
|
||||
<div class="flex flex-row gap-x-3">
|
||||
<div>
|
||||
<a
|
||||
href="/person/{{ $agent.Id }}"
|
||||
class="text-gray-700 hover:text-slate-950 block no-underline">
|
||||
<i class="ri-eye-line"></i> Anschauen
|
||||
</a>
|
||||
</div>
|
||||
·
|
||||
<div>
|
||||
<a href="/person/{{ $agent.Id }}/edit" class="text-gray-700 no-underline hover:text-slate-950 block">
|
||||
<i class="ri-loop-left-line"></i> Reset
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-row" id="person-header-data">
|
||||
<div class="flex flex-col justify-end gap-y-6 pr-20">
|
||||
<div class="">
|
||||
<div class="font-bold text-sm">
|
||||
<i class="ri-database-2-line"></i> Datenbank-ID
|
||||
</div>
|
||||
<div class="">{{ $agent.Id }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col justify-end gap-y-6 pr-4">
|
||||
<div class="">
|
||||
<div class="font-bold text-sm mb-1"><i class="ri-calendar-line"></i> Zuletzt bearbeitet</div>
|
||||
<div>
|
||||
<div class="px-1.5 py-0.5 rounded-xs bg-gray-200 w-fit" id="person-updated-stamp">
|
||||
<span id="person-updated-date">{{ GermanDate $agent.Updated }}</span>,
|
||||
<span id="person-updated-time">{{ GermanTime $agent.Updated }}</span>h
|
||||
</div>
|
||||
<div
|
||||
class="px-1.5 py-0.5 rounded-xs mt-1.5 bg-gray-200 w-fit {{ if not $model.result.User }}hidden{{ end }}"
|
||||
id="person-updated-user">
|
||||
<i class="ri-user-line mr-1"></i>
|
||||
<span id="person-updated-user-name">{{- if $model.result.User -}}{{ $model.result.User.Name }}{{- end -}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-normal mx-auto mt-4 !px-0">
|
||||
{{ template "_usermessage" $model }}
|
||||
<form
|
||||
class="w-full dbform"
|
||||
id="changepersonform"
|
||||
method="POST"
|
||||
action="/person/{{ $agent.Id }}/edit">
|
||||
<input type="hidden" name="csrf_token" value="{{ $model.csrf_token }}" />
|
||||
<input type="hidden" name="last_edited" value="{{ $agent.Updated }}" />
|
||||
|
||||
<div class="flex gap-8">
|
||||
<div class="flex-1 flex flex-col gap-4">
|
||||
<div class="inputwrapper">
|
||||
<label for="name" class="inputlabel">Name</label>
|
||||
<textarea name="name" id="name" class="inputinput no-enter" autocomplete="off" rows="1">{{- $agent.Name -}}</textarea>
|
||||
</div>
|
||||
<div class="inputwrapper">
|
||||
<label for="pseudonyms" class="inputlabel">Pseudonyme</label>
|
||||
<textarea name="pseudonyms" id="pseudonyms" class="inputinput" autocomplete="off" rows="1">{{- $agent.Pseudonyms -}}</textarea>
|
||||
</div>
|
||||
<div class="inputwrapper">
|
||||
<label for="biographical_data" class="inputlabel">Biografische Angaben</label>
|
||||
<textarea name="biographical_data" id="biographical_data" class="inputinput" autocomplete="off" rows="2">{{- $agent.BiographicalData -}}</textarea>
|
||||
</div>
|
||||
<div class="inputwrapper">
|
||||
<label for="profession" class="inputlabel">Profession</label>
|
||||
<input name="profession" id="profession" class="inputinput" autocomplete="off" value="{{ $agent.Profession }}" />
|
||||
</div>
|
||||
<div class="inputwrapper">
|
||||
<label for="uri" class="inputlabel">URI</label>
|
||||
<input name="uri" id="uri" class="inputinput" autocomplete="off" value="{{ $agent.URI }}" />
|
||||
</div>
|
||||
<div class="inputwrapper">
|
||||
<label for="references" class="inputlabel">Nachweise</label>
|
||||
<textarea name="references" id="references" class="inputinput no-enter" autocomplete="off" rows="1">{{- $agent.References -}}</textarea>
|
||||
</div>
|
||||
<div class="inputwrapper">
|
||||
<label for="annotation" class="inputlabel">Annotation</label>
|
||||
<textarea name="annotation" id="annotation" class="inputinput" autocomplete="off" rows="2">{{- $agent.Annotation -}}</textarea>
|
||||
</div>
|
||||
<div class="inputwrapper">
|
||||
<label class="inputlabel">Typ</label>
|
||||
<div class="px-3 py-2 flex flex-col gap-2">
|
||||
<label class="flex items-center gap-2 text-sm text-gray-700">
|
||||
<input type="checkbox" name="corporate_body" {{ if $agent.CorporateBody }}checked{{ end }} />
|
||||
Körperschaft
|
||||
</label>
|
||||
<label class="flex items-center gap-2 text-sm text-gray-700">
|
||||
<input type="checkbox" name="fictional" {{ if $agent.Fictional }}checked{{ end }} />
|
||||
Fiktiv
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="w-[28rem] shrink-0 flex flex-col gap-3">
|
||||
<div class="inputwrapper">
|
||||
<label for="status" class="inputlabel">Status</label>
|
||||
<select name="status" id="status" autocomplete="off" class="inputselect font-bold">
|
||||
<option value="Unknown" {{ if eq $agent.EditState "Unknown" }}selected{{ end }}>Unbekannt</option>
|
||||
<option value="ToDo" {{ if eq $agent.EditState "ToDo" }}selected{{ end }}>Zu erledigen</option>
|
||||
<option value="Review" {{ if eq $agent.EditState "Review" }}selected{{ end }}>Überprüfen</option>
|
||||
<option value="Seen" {{ if eq $agent.EditState "Seen" }}selected{{ end }}>Autopsiert</option>
|
||||
<option value="Edited" {{ if eq $agent.EditState "Edited" }}selected{{ end }}>Vollständig Erfasst</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="inputwrapper">
|
||||
<label for="edit_comment" class="inputlabel">Bearbeitungsvermerk</label>
|
||||
<textarea name="edit_comment" id="edit_comment" class="inputinput" autocomplete="off" rows="1">{{- $agent.Comment -}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="w-full flex items-end justify-between gap-4 mt-6 flex-wrap">
|
||||
<p id="person-save-feedback" class="text-sm text-gray-600" aria-live="polite"></p>
|
||||
<div class="flex items-center gap-3 self-end flex-wrap">
|
||||
<a href="/person/{{ $agent.Id }}" class="resetbutton w-40 flex items-center gap-2 justify-center">
|
||||
<i class="ri-close-line"></i>
|
||||
<span>Abbrechen</span>
|
||||
</a>
|
||||
<a href="/person/{{ $agent.Id }}/edit" class="resetbutton w-40 flex items-center gap-2 justify-center">
|
||||
<i class="ri-loop-left-line"></i>
|
||||
<span>Reset</span>
|
||||
</a>
|
||||
<button type="submit" class="submitbutton w-40 flex items-center gap-2 justify-center">
|
||||
<i class="ri-save-line"></i>
|
||||
<span>Speichern</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</edit-page>
|
||||
8
views/routes/person/edit/head.gohtml
Normal file
8
views/routes/person/edit/head.gohtml
Normal file
@@ -0,0 +1,8 @@
|
||||
{{ $model := . }}
|
||||
<title>
|
||||
{{- if $model.result -}}
|
||||
Bearbeiten: {{ $model.result.Agent.Name }} - Musenalm
|
||||
{{- else -}}
|
||||
Person bearbeiten - Musenalm
|
||||
{{- end -}}
|
||||
</title>
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
<div class="container-normal flex flex-col font-serif mt-12">
|
||||
<div class="font-sans">
|
||||
{{/* <svg
|
||||
{{/* <svg
|
||||
class="w-[0.9rem] h-[0.9rem] relative bottom-[0.04rem] inline-block"
|
||||
width="65px"
|
||||
height="65px"
|
||||
@@ -39,10 +39,16 @@
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
*/}}
|
||||
*/}}
|
||||
<i class="ri-book-shelf-fill"></i>
|
||||
Reihe
|
||||
</div>
|
||||
{{- if (IsAdminOrEditor $model.request.user) -}}
|
||||
<div class="font-sans mt-1">
|
||||
<i class="ri-edit-line"></i>
|
||||
<a href="/reihe/{{ $r.MusenalmID }}/edit">Bearbeiten</a>
|
||||
</div>
|
||||
{{- end -}}
|
||||
<div class="grow-0">
|
||||
<div>
|
||||
<span class="font-bold text-3xl mr-2">{{ $r.Title }}</span>
|
||||
|
||||
126
views/routes/reihe/edit/body.gohtml
Normal file
126
views/routes/reihe/edit/body.gohtml
Normal file
@@ -0,0 +1,126 @@
|
||||
{{ $model := . }}
|
||||
{{ $series := $model.result.Series }}
|
||||
|
||||
<edit-page>
|
||||
<div class="flex container-normal bg-slate-100 mx-auto px-8">
|
||||
<div class="flex flex-row w-full justify-between">
|
||||
<div class="flex flex-col justify-end-safe flex-2/5">
|
||||
<h1 class="text-2xl w-full font-bold text-slate-900 mb-4">{{ $series.Title }}</h1>
|
||||
<div class="flex flex-row gap-x-3">
|
||||
<div>
|
||||
<a
|
||||
href="/reihe/{{ $series.MusenalmID }}"
|
||||
class="text-gray-700 hover:text-slate-950 block no-underline">
|
||||
<i class="ri-eye-line"></i> Anschauen
|
||||
</a>
|
||||
</div>
|
||||
·
|
||||
<div>
|
||||
<a href="/reihe/{{ $series.MusenalmID }}/edit" class="text-gray-700 no-underline hover:text-slate-950 block">
|
||||
<i class="ri-loop-left-line"></i> Reset
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-row" id="series-header-data">
|
||||
<div class="flex flex-col justify-end gap-y-6 pr-20">
|
||||
<div class="">
|
||||
<div class="font-bold text-sm">
|
||||
<i class="ri-database-2-line"></i> Datenbank-ID
|
||||
</div>
|
||||
<div class="">{{ $series.Id }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col justify-end gap-y-6 pr-4">
|
||||
<div class="">
|
||||
<div class="font-bold text-sm mb-1"><i class="ri-calendar-line"></i> Zuletzt bearbeitet</div>
|
||||
<div>
|
||||
<div class="px-1.5 py-0.5 rounded-xs bg-gray-200 w-fit" id="series-updated-stamp">
|
||||
<span id="series-updated-date">{{ GermanDate $series.Updated }}</span>,
|
||||
<span id="series-updated-time">{{ GermanTime $series.Updated }}</span>h
|
||||
</div>
|
||||
<div
|
||||
class="px-1.5 py-0.5 rounded-xs mt-1.5 bg-gray-200 w-fit {{ if not $model.result.User }}hidden{{ end }}"
|
||||
id="series-updated-user">
|
||||
<i class="ri-user-line mr-1"></i>
|
||||
<span id="series-updated-user-name">{{- if $model.result.User -}}{{ $model.result.User.Name }}{{- end -}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-normal mx-auto mt-4 !px-0">
|
||||
{{ template "_usermessage" $model }}
|
||||
<form
|
||||
class="w-full dbform"
|
||||
id="changeseriesform"
|
||||
method="POST"
|
||||
action="/reihe/{{ $series.MusenalmID }}/edit">
|
||||
<input type="hidden" name="csrf_token" value="{{ $model.csrf_token }}" />
|
||||
<input type="hidden" name="last_edited" value="{{ $series.Updated }}" />
|
||||
|
||||
<div class="flex gap-8">
|
||||
<div class="flex-1 flex flex-col gap-4">
|
||||
<div class="inputwrapper">
|
||||
<label for="title" class="inputlabel">Reihentitel</label>
|
||||
<textarea name="title" id="title" class="inputinput no-enter" autocomplete="off" rows="1">{{- $series.Title -}}</textarea>
|
||||
</div>
|
||||
<div class="inputwrapper">
|
||||
<label for="pseudonyms" class="inputlabel">Alternativtitel</label>
|
||||
<textarea name="pseudonyms" id="pseudonyms" class="inputinput" autocomplete="off" rows="1">{{- $series.Pseudonyms -}}</textarea>
|
||||
</div>
|
||||
<div class="inputwrapper">
|
||||
<label for="annotation" class="inputlabel">Annotation</label>
|
||||
<textarea name="annotation" id="annotation" class="inputinput" autocomplete="off" rows="2">{{- $series.Annotation -}}</textarea>
|
||||
</div>
|
||||
<div class="inputwrapper">
|
||||
<label for="references" class="inputlabel">Nachweise</label>
|
||||
<textarea name="references" id="references" class="inputinput no-enter" autocomplete="off" rows="1">{{- $series.References -}}</textarea>
|
||||
</div>
|
||||
<div class="inputwrapper">
|
||||
<label for="frequency" class="inputlabel">Erscheinungsfrequenz</label>
|
||||
<input name="frequency" id="frequency" class="inputinput" autocomplete="off" value="{{ $series.Frequency }}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="w-[28rem] shrink-0 flex flex-col gap-3">
|
||||
<div class="inputwrapper">
|
||||
<label for="status" class="inputlabel">Status</label>
|
||||
<select name="status" id="status" autocomplete="off" class="inputselect font-bold">
|
||||
<option value="Unknown" {{ if eq $series.EditState "Unknown" }}selected{{ end }}>Unbekannt</option>
|
||||
<option value="ToDo" {{ if eq $series.EditState "ToDo" }}selected{{ end }}>Zu erledigen</option>
|
||||
<option value="Review" {{ if eq $series.EditState "Review" }}selected{{ end }}>Überprüfen</option>
|
||||
<option value="Seen" {{ if eq $series.EditState "Seen" }}selected{{ end }}>Autopsiert</option>
|
||||
<option value="Edited" {{ if eq $series.EditState "Edited" }}selected{{ end }}>Vollständig Erfasst</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="inputwrapper">
|
||||
<label for="edit_comment" class="inputlabel">Bearbeitungsvermerk</label>
|
||||
<textarea name="edit_comment" id="edit_comment" class="inputinput" autocomplete="off" rows="1">{{- $series.Comment -}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="w-full flex items-end justify-between gap-4 mt-6 flex-wrap">
|
||||
<p id="series-save-feedback" class="text-sm text-gray-600" aria-live="polite"></p>
|
||||
<div class="flex items-center gap-3 self-end flex-wrap">
|
||||
<a href="/reihe/{{ $series.MusenalmID }}" class="resetbutton w-40 flex items-center gap-2 justify-center">
|
||||
<i class="ri-close-line"></i>
|
||||
<span>Abbrechen</span>
|
||||
</a>
|
||||
<a href="/reihe/{{ $series.MusenalmID }}/edit" class="resetbutton w-40 flex items-center gap-2 justify-center">
|
||||
<i class="ri-loop-left-line"></i>
|
||||
<span>Reset</span>
|
||||
</a>
|
||||
<button type="submit" class="submitbutton w-40 flex items-center gap-2 justify-center">
|
||||
<i class="ri-save-line"></i>
|
||||
<span>Speichern</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</edit-page>
|
||||
8
views/routes/reihe/edit/head.gohtml
Normal file
8
views/routes/reihe/edit/head.gohtml
Normal file
@@ -0,0 +1,8 @@
|
||||
{{ $model := . }}
|
||||
<title>
|
||||
{{- if $model.result -}}
|
||||
Bearbeiten: {{ $model.result.Series.Title }} - Musenalm
|
||||
{{- else -}}
|
||||
Reihe bearbeiten - Musenalm
|
||||
{{- end -}}
|
||||
</title>
|
||||
10
views/transform/edit-page.js
Normal file
10
views/transform/edit-page.js
Normal file
@@ -0,0 +1,10 @@
|
||||
export class EditPage extends HTMLElement {
|
||||
connectedCallback() {
|
||||
setTimeout(() => {
|
||||
const form = this.querySelector("form");
|
||||
if (form && typeof window.FormLoad === "function") {
|
||||
window.FormLoad(form);
|
||||
}
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@ import { ItemsEditor } from "./items-editor.js";
|
||||
import { SingleSelectRemote } from "./single-select-remote.js";
|
||||
import { AlmanachEditPage } from "./almanach-edit.js";
|
||||
import { RelationsEditor } from "./relations-editor.js";
|
||||
import { EditPage } from "./edit-page.js";
|
||||
|
||||
const FILTER_LIST_ELEMENT = "filter-list";
|
||||
const SCROLL_BUTTON_ELEMENT = "scroll-button";
|
||||
@@ -36,6 +37,7 @@ const DIV_MANAGER_ELEMENT = "div-manager";
|
||||
const ITEMS_EDITOR_ELEMENT = "items-editor";
|
||||
const ALMANACH_EDIT_PAGE_ELEMENT = "almanach-edit-page";
|
||||
const RELATIONS_EDITOR_ELEMENT = "relations-editor";
|
||||
const EDIT_PAGE_ELEMENT = "edit-page";
|
||||
|
||||
customElements.define(INT_LINK_ELEMENT, IntLink);
|
||||
customElements.define(ABBREV_TOOLTIPS_ELEMENT, AbbreviationTooltips);
|
||||
@@ -54,6 +56,7 @@ customElements.define(DIV_MANAGER_ELEMENT, DivManager);
|
||||
customElements.define(ITEMS_EDITOR_ELEMENT, ItemsEditor);
|
||||
customElements.define(ALMANACH_EDIT_PAGE_ELEMENT, AlmanachEditPage);
|
||||
customElements.define(RELATIONS_EDITOR_ELEMENT, RelationsEditor);
|
||||
customElements.define(EDIT_PAGE_ELEMENT, EditPage);
|
||||
|
||||
function PathPlusQuery() {
|
||||
const path = window.location.pathname;
|
||||
@@ -406,4 +409,21 @@ window.HookupRBChange = HookupRBChange;
|
||||
window.FormLoad = FormLoad;
|
||||
window.TextareaAutoResize = TextareaAutoResize;
|
||||
|
||||
export { FilterList, ScrollButton, AbbreviationTooltips, MultiSelectSimple, MultiSelectRole, ToolTip, PopupImage, TabList, FilterPill, ImageReel, IntLink, ItemsEditor, SingleSelectRemote, AlmanachEditPage, RelationsEditor };
|
||||
export {
|
||||
FilterList,
|
||||
ScrollButton,
|
||||
AbbreviationTooltips,
|
||||
MultiSelectSimple,
|
||||
MultiSelectRole,
|
||||
ToolTip,
|
||||
PopupImage,
|
||||
TabList,
|
||||
FilterPill,
|
||||
ImageReel,
|
||||
IntLink,
|
||||
ItemsEditor,
|
||||
SingleSelectRemote,
|
||||
AlmanachEditPage,
|
||||
RelationsEditor,
|
||||
EditPage,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user