mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2026-02-04 10:35:30 +00:00
+display bearbeitunsstatus +vermerk
This commit is contained in:
@@ -3,11 +3,9 @@ TODO danach:
|
|||||||
- Titelauflage von/ hat TA
|
- Titelauflage von/ hat TA
|
||||||
- Zeilenumbrüche in Reihen-Annotationen (EVTL. fix in TinyMCE)
|
- Zeilenumbrüche in Reihen-Annotationen (EVTL. fix in TinyMCE)
|
||||||
- Status: Auopsiert, Erfasst etc.
|
- Status: Auopsiert, Erfasst etc.
|
||||||
- SO Display von Status u. Bearbeitungsvermerk in Almanach-Ansicht für eingeloggte Nutzer
|
|
||||||
- SO Hilfe-Texte für Felder
|
- SO Hilfe-Texte für Felder
|
||||||
- MO Lösch-Links in Liste, Übersicht u.s.w. (? CSRF-Token fehlt)
|
- MO Lösch-Links in Liste, Übersicht u.s.w. (? CSRF-Token fehlt)
|
||||||
|
|
||||||
|
|
||||||
Features:
|
Features:
|
||||||
- NÄCHSTE WOCHE Datenbank-Hygiene
|
- NÄCHSTE WOCHE Datenbank-Hygiene
|
||||||
- DI Extra-DB für FTS5: ist eigentlich nichtTeil der Haupt-DB, sondern nur Suchindex
|
- DI Extra-DB für FTS5: ist eigentlich nichtTeil der Haupt-DB, sondern nur Suchindex
|
||||||
@@ -18,67 +16,5 @@ BUGS:
|
|||||||
- MO: doppelte Einträge Reihen-Liste
|
- MO: doppelte Einträge Reihen-Liste
|
||||||
- S. Abendstunden
|
- S. Abendstunden
|
||||||
- Löschen v. Personen syncronisiert nicht den Suchindex
|
- Löschen v. Personen syncronisiert nicht den Suchindex
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Scrap that. I'd like more general tables: files, images, data, HTML
|
|
||||||
|
|
||||||
Data has two main and two metadata fields:
|
|
||||||
Key (string, indexed)
|
|
||||||
Value (JSON)
|
|
||||||
Updated (date)
|
|
||||||
Created (date)
|
|
||||||
|
|
||||||
Images has five main fields:
|
|
||||||
Key (string, indexed)
|
|
||||||
Title (string, indexed)
|
|
||||||
Description (string)
|
|
||||||
Preview (file)
|
|
||||||
Image (image, file)
|
|
||||||
Updated (date)
|
|
||||||
Created (date)
|
|
||||||
|
|
||||||
Files has three main fields:
|
|
||||||
Key (string, indexed)
|
|
||||||
Description (string)
|
|
||||||
File (file)
|
|
||||||
Updated (date)
|
|
||||||
Created (date)
|
|
||||||
|
|
||||||
HTML has two main fields:
|
|
||||||
Key (string, indexed)
|
|
||||||
HTML (editor)
|
|
||||||
Updated (date)
|
|
||||||
Created (date)
|
|
||||||
|
|
||||||
I'd like to have a table for each of these.
|
|
||||||
|
|
||||||
The following changes will be made to the db + migrations:
|
|
||||||
- Index images become a part of the more generic images table (their index starts with index-) so we can find them quickly
|
- Index images become a part of the more generic images table (their index starts with index-) so we can find them quickly
|
||||||
- Abkürzungen will be stored as an object in the data table
|
|
||||||
- All the text for the websites will be mmoved to the HTML table with the keys being the names.
|
- All the text for the websites will be mmoved to the HTML table with the keys being the names.
|
||||||
|
|
||||||
Help about the fields will also be stored in the data table as a JSON object:
|
|
||||||
[
|
|
||||||
tablename: {
|
|
||||||
description: string,
|
|
||||||
private_description: string,
|
|
||||||
private: boolean,
|
|
||||||
fieldname: {
|
|
||||||
type: string,
|
|
||||||
firendly_name: string,
|
|
||||||
description: string,
|
|
||||||
private_description: string,
|
|
||||||
required: boolean,
|
|
||||||
private: boolean,
|
|
||||||
default: string,
|
|
||||||
options: array
|
|
||||||
}
|
|
||||||
},
|
|
||||||
tablename: {
|
|
||||||
... ]
|
|
||||||
|
|
||||||
1. Create the migrations for these three newtables in tables.go migration -- I will reapply all the migrations later
|
|
||||||
2. Move the existing abkürzungen to the data table
|
|
||||||
3. Move the existing index images to the images table
|
|
||||||
4. Move the existing websites to the HTML table (istead of each website having its own table)
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -36,6 +36,9 @@
|
|||||||
<div class="fieldlabel">Almanach-Nummer</div>
|
<div class="fieldlabel">Almanach-Nummer</div>
|
||||||
<div class="fieldvalue">{{ $model.result.Entry.MusenalmID }}</div>
|
<div class="fieldvalue">{{ $model.result.Entry.MusenalmID }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{- if $model.request.user -}}
|
||||||
|
{{ template "_status_display" (Arr $model.result.Entry "almanach") }}
|
||||||
|
{{- end -}}
|
||||||
{{- if $model.result.Entry.PreferredTitle -}}
|
{{- if $model.result.Entry.PreferredTitle -}}
|
||||||
<div class="entryrow">
|
<div class="entryrow">
|
||||||
<div class="fieldlabel">Kurztitel</div>
|
<div class="fieldlabel">Kurztitel</div>
|
||||||
|
|||||||
47
views/routes/components/_status_display.gohtml
Normal file
47
views/routes/components/_status_display.gohtml
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
{{- $entity := index . 0 -}}
|
||||||
|
{{- $context := "" -}}
|
||||||
|
{{- if gt (len .) 1 -}}
|
||||||
|
{{- $context = index . 1 -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- $isAlmanach := eq $context "almanach" -}}
|
||||||
|
|
||||||
|
<div class="flex flex-col mb-3">
|
||||||
|
<!-- Status Badge -->
|
||||||
|
<div class="entryrow">
|
||||||
|
<div class="fieldlabel">
|
||||||
|
Status
|
||||||
|
</div>
|
||||||
|
<div class="fieldvalue">
|
||||||
|
<div class="status-badge" data-status="{{ $entity.EditState }}">
|
||||||
|
<i class="status-icon {{- if eq $entity.EditState "Edited" }} ri-checkbox-circle-line{{- else if eq $entity.EditState "Seen" }} ri-information-line{{- else if eq $entity.EditState "Review" }} ri-search-line{{- else if eq $entity.EditState "ToDo" }} ri-list-check{{- else }} ri-forbid-2-line{{- end }}"></i>
|
||||||
|
<span class="status-label">
|
||||||
|
{{- if eq $entity.EditState "Unknown" -}}
|
||||||
|
{{ if $isAlmanach }}Gesucht{{ else }}Unbekannt{{ end }}
|
||||||
|
{{- else if eq $entity.EditState "ToDo" -}}
|
||||||
|
Zu erledigen
|
||||||
|
{{- else if eq $entity.EditState "Review" -}}
|
||||||
|
Überprüfen
|
||||||
|
{{- else if eq $entity.EditState "Seen" -}}
|
||||||
|
{{ if $isAlmanach }}Autopsiert{{ else }}Gesichtet{{ end }}
|
||||||
|
{{- else if eq $entity.EditState "Edited" -}}
|
||||||
|
{{ if $isAlmanach }}Vollständig Erfasst{{ else }}Erfasst{{ end }}
|
||||||
|
{{- else -}}
|
||||||
|
{{ $entity.EditState }}
|
||||||
|
{{- end -}}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Bearbeitungsvermerk (only if has content) -->
|
||||||
|
{{- if $entity.Comment -}}
|
||||||
|
<div class="entryrow">
|
||||||
|
<div class="fieldlabel">
|
||||||
|
Bearbeitungsvermerk
|
||||||
|
</div>
|
||||||
|
<div class="fieldvalue comment-content">
|
||||||
|
{{ $entity.Comment }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{- end -}}
|
||||||
|
</div>
|
||||||
@@ -82,6 +82,41 @@
|
|||||||
.status-select[data-status="Unknown"] + .status-icon {
|
.status-select[data-status="Unknown"] + .status-icon {
|
||||||
@apply text-gray-900;
|
@apply text-gray-900;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Status badge display (read-only view) */
|
||||||
|
.status-badge {
|
||||||
|
@apply inline-flex items-center gap-2 px-2 py-0.5 rounded-md font-sans font-semibold text-sm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-badge[data-status="Edited"] {
|
||||||
|
@apply bg-green-100 text-green-900;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-badge[data-status="Seen"] {
|
||||||
|
@apply bg-blue-100 text-blue-900;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-badge[data-status="Review"] {
|
||||||
|
@apply bg-orange-100 text-orange-900;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-badge[data-status="ToDo"] {
|
||||||
|
@apply bg-red-100 text-red-900;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-badge[data-status="Unknown"] {
|
||||||
|
@apply bg-gray-300 text-gray-900;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-badge .status-icon {
|
||||||
|
@apply text-base;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Comment content styling in view mode */
|
||||||
|
.comment-content {
|
||||||
|
@apply italic;
|
||||||
|
}
|
||||||
|
|
||||||
.dbform .submitbutton {
|
.dbform .submitbutton {
|
||||||
@apply w-full inline-flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-slate-700 hover:bg-slate-800 cursor-pointer focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500 active:bg-slate-900 transition-all duration-75;
|
@apply w-full inline-flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-slate-700 hover:bg-slate-800 cursor-pointer focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500 active:bg-slate-900 transition-all duration-75;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user