mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2026-02-04 02:25:30 +00:00
+display bearbeitunsstatus +vermerk
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -36,6 +36,9 @@
|
||||
<div class="fieldlabel">Almanach-Nummer</div>
|
||||
<div class="fieldvalue">{{ $model.result.Entry.MusenalmID }}</div>
|
||||
</div>
|
||||
{{- if $model.request.user -}}
|
||||
{{ template "_status_display" (Arr $model.result.Entry "almanach") }}
|
||||
{{- end -}}
|
||||
{{- if $model.result.Entry.PreferredTitle -}}
|
||||
<div class="entryrow">
|
||||
<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 {
|
||||
@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 {
|
||||
@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