mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2026-02-04 10:35:30 +00:00
449 lines
25 KiB
Plaintext
449 lines
25 KiB
Plaintext
{{- $content := index . "content" -}}
|
|
{{- $entry := index . "entry" -}}
|
|
{{- $musenalmTypes := index . "musenalm_types" -}}
|
|
{{- $paginationValues := index . "pagination_values" -}}
|
|
{{- $agents := index . "agents" -}}
|
|
{{- $contentAgents := index . "content_agents" -}}
|
|
{{- $contentAgentsRender := index . "content_agents_render" -}}
|
|
{{- $contentAgentsNew := index . "content_agents_new" -}}
|
|
{{- $agentRelations := index . "agent_relations" -}}
|
|
{{- $overrideID := index . "content_id" -}}
|
|
{{- $contentID := $content.Id -}}
|
|
{{- if and $overrideID (ne $overrideID "") -}}
|
|
{{- $contentID = $overrideID -}}
|
|
{{- end -}}
|
|
{{- $prefix := printf "content_%s_" $contentID -}}
|
|
{{- $baseID := printf "content-%s" $contentID -}}
|
|
{{- $annotationID := printf "%sannotation" $prefix -}}
|
|
{{- $annotationToolbar := printf "%sannotation-toolbar" $prefix -}}
|
|
{{- $agentsPrefix := printf "content_%s_agents" $contentID -}}
|
|
{{- $agentsAddToggleID := printf "content-%s-agents-add-toggle" $contentID -}}
|
|
{{- $agentsSectionID := printf "content-%s-agents-section" $contentID -}}
|
|
|
|
<div class="border border-slate-200 bg-white rounded-xs" data-role="content-card" data-content-id="{{ $contentID }}" data-content-order="{{ $content.Numbering }}">
|
|
<input type="hidden" name="{{ $prefix }}numbering" class="content-numbering" value="{{- $content.Numbering -}}" />
|
|
<input type="hidden" name="{{ $prefix }}entries" value="{{ $entry.Id }}" />
|
|
<div class="border border-slate-200 border-b-0 bg-stone-100 rounded-xs rounded-b-none">
|
|
<div class="flex flex-wrap items-center justify-between gap-4 border-b border-slate-200 bg-stone-200 px-3 py-2">
|
|
<div class="flex items-center gap-3">
|
|
<multi-select-simple
|
|
id="{{ $baseID }}-musenalm-type"
|
|
name="{{ $prefix }}musenalm_type[]"
|
|
show-create-button="false"
|
|
placeholder="Musenalm-Typen suchen..."
|
|
data-empty-text="Keine Typen verknüpft"
|
|
value='[{{- range $i, $t := $content.MusenalmType -}}{{- if $i }},{{ end -}}"{{ $t }}"{{- end -}}]'
|
|
data-initial-options='[{{- range $i, $t := $musenalmTypes -}}{{- if $i }},{{ end -}}{{ printf "{\"id\":%q,\"name\":%q}" $t $t }}{{- end -}}]'
|
|
data-initial-values='[{{- range $i, $t := $content.MusenalmType -}}{{- if $i }},{{ end -}}{{ printf "%q" $t }}{{- end -}}]'>
|
|
</multi-select-simple>
|
|
</div>
|
|
<div class="flex items-center gap-2">
|
|
<select name="{{ $prefix }}edit_state" id="{{ $baseID }}-edit-state" class="inputselect font-bold status-select px-2 py-1 shadow-sm rounded-sm" data-status="{{ $content.EditState }}">
|
|
<option value="Unknown" {{ if eq $content.EditState "Unknown" }}selected{{ end }}>Unbekannt</option>
|
|
<option value="ToDo" {{ if eq $content.EditState "ToDo" }}selected{{ end }}>Zu erledigen</option>
|
|
<option value="Review" {{ if eq $content.EditState "Review" }}selected{{ end }}>Überprüfen</option>
|
|
<option value="Edited" {{ if eq $content.EditState "Edited" }}selected{{ end }}>Erfasst</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="px-3 py-2">
|
|
<div class="grid grid-cols-[8rem_1fr_1fr] gap-x-3 gap-y-2 items-baseline">
|
|
<label for="{{ $baseID }}-extent" class="text-sm font-bold text-gray-700">Seite & Paginierung</label>
|
|
<textarea name="{{ $prefix }}extent" id="{{ $baseID }}-extent" class="inputinput no-enter whitespace-normal border border-slate-300 rounded-xs px-2 py-1 bg-white focus:outline-none focus:ring-2 focus:ring-slate-400/30" autocomplete="off" rows="1">{{- $content.Extent -}}</textarea>
|
|
<select name="{{ $prefix }}musenalm_pagination" id="{{ $baseID }}-pagination" class="inputselect border border-slate-300 rounded-xs px-2 py-1 bg-white focus:outline-none focus:ring-2 focus:ring-slate-400/30">
|
|
{{- range $_, $p := $paginationValues -}}
|
|
<option value="{{- $p -}}" {{ if eq $content.MusenalmPagination $p }}selected{{ end }}>{{- $p -}}</option>
|
|
{{- end -}}
|
|
</select>
|
|
</div>
|
|
|
|
<div id="{{ $baseID }}-edit-fields" class="mt-3 flex flex-col gap-3"></div>
|
|
<div-manager dm-target="{{ $baseID }}-edit-fields" class="flex items-center justify-end mt-1">
|
|
<button class="dm-menu-button text-right cursor-pointer whitespace-nowrap"><i class="ri-add-line"></i>
|
|
Felder hinzufügen</button>
|
|
|
|
<div class="grid grid-cols-[8rem_1fr_1.5rem] gap-x-3 gap-y-2 items-baseline {{ if eq (len $content.Language) 0 }}hidden{{ end }}">
|
|
<label for="{{ $baseID }}-language" class="text-sm font-bold text-gray-700">Sprache</label>
|
|
<multi-select-simple
|
|
id="{{ $baseID }}-language"
|
|
name="{{ $prefix }}language[]"
|
|
show-create-button="false"
|
|
placeholder="Sprachen suchen..."
|
|
data-empty-text="Keine Sprachen verknüpft"
|
|
value='[{{- range $i, $lang := $content.Language -}}{{- if $i }},{{ end -}}"{{ $lang }}"{{- end -}}]'
|
|
data-initial-values='[{{- range $i, $lang := $content.Language -}}{{- if $i }},{{ end -}}{{ printf "%q" $lang }}{{- end -}}]'>
|
|
</multi-select-simple>
|
|
<button class="dm-close-button text-gray-500">
|
|
<i class="ri-close-line"></i>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="grid grid-cols-[8rem_1fr_1.5rem] gap-x-3 gap-y-2 items-baseline {{ if eq $content.TitleStmt "" }}hidden{{ end }}">
|
|
<label for="{{ $baseID }}-title" class="text-sm font-bold text-gray-700">Titel</label>
|
|
<textarea name="{{ $prefix }}title_statement" id="{{ $baseID }}-title" class="inputinput no-enter whitespace-normal border border-slate-300 rounded-xs px-2 py-1 bg-white focus:outline-none focus:ring-2 focus:ring-slate-400/30" autocomplete="off" rows="1">{{- $content.TitleStmt -}}</textarea>
|
|
<button class="dm-close-button text-gray-500">
|
|
<i class="ri-close-line"></i>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="grid grid-cols-[8rem_1fr_1.5rem] gap-x-3 gap-y-2 items-baseline {{ if eq $content.SubtitleStmt "" }}hidden{{ end }}">
|
|
<label for="{{ $baseID }}-subtitle" class="text-sm font-bold text-gray-700">Untertitel</label>
|
|
<textarea name="{{ $prefix }}subtitle_statement" id="{{ $baseID }}-subtitle" class="inputinput no-enter whitespace-normal border border-slate-300 rounded-xs px-2 py-1 bg-white focus:outline-none focus:ring-2 focus:ring-slate-400/30" autocomplete="off" rows="1">{{- $content.SubtitleStmt -}}</textarea>
|
|
<button class="dm-close-button text-gray-500">
|
|
<i class="ri-close-line"></i>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="grid grid-cols-[8rem_1fr_1.5rem] gap-x-3 gap-y-2 items-baseline {{ if eq $content.IncipitStmt "" }}hidden{{ end }}">
|
|
<label for="{{ $baseID }}-incipit" class="text-sm font-bold text-gray-700">Incipit</label>
|
|
<textarea name="{{ $prefix }}incipit_statement" id="{{ $baseID }}-incipit" class="inputinput no-enter whitespace-normal border border-slate-300 rounded-xs px-2 py-1 bg-white focus:outline-none focus:ring-2 focus:ring-slate-400/30" autocomplete="off" rows="1">{{- $content.IncipitStmt -}}</textarea>
|
|
<button class="dm-close-button text-gray-500">
|
|
<i class="ri-close-line"></i>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="grid grid-cols-[8rem_1fr_1.5rem] gap-x-3 gap-y-2 items-baseline {{ if eq $content.ResponsibilityStmt "" }}hidden{{ end }}">
|
|
<label for="{{ $baseID }}-responsibility" class="text-sm font-bold text-gray-700">Autorangabe</label>
|
|
<textarea name="{{ $prefix }}responsibility_statement" id="{{ $baseID }}-responsibility" class="inputinput no-enter whitespace-normal border border-slate-300 rounded-xs px-2 py-1 bg-white focus:outline-none focus:ring-2 focus:ring-slate-400/30" autocomplete="off" rows="1">{{- $content.ResponsibilityStmt -}}</textarea>
|
|
<button class="dm-close-button text-gray-500">
|
|
<i class="ri-close-line"></i>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="grid grid-cols-[8rem_1fr_1.5rem] gap-x-3 gap-y-2 items-baseline {{ if eq $content.ParallelTitle "" }}hidden{{ end }}">
|
|
<label for="{{ $baseID }}-parallel-title" class="text-sm font-bold text-gray-700">Paralleltitel</label>
|
|
<textarea name="{{ $prefix }}parallel_title" id="{{ $baseID }}-parallel-title" class="inputinput no-enter whitespace-normal border border-slate-300 rounded-xs px-2 py-1 bg-white focus:outline-none focus:ring-2 focus:ring-slate-400/30" autocomplete="off" rows="1">{{- $content.ParallelTitle -}}</textarea>
|
|
<button class="dm-close-button text-gray-500">
|
|
<i class="ri-close-line"></i>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="grid grid-cols-[8rem_1fr_1.5rem] gap-x-3 gap-y-2 items-baseline {{ if eq $content.VariantTitle "" }}hidden{{ end }}">
|
|
<label for="{{ $baseID }}-variant-title" class="text-sm font-bold text-gray-700">Titelvarianten</label>
|
|
<textarea name="{{ $prefix }}variant_title" id="{{ $baseID }}-variant-title" class="inputinput no-enter whitespace-normal border border-slate-300 rounded-xs px-2 py-1 bg-white focus:outline-none focus:ring-2 focus:ring-slate-400/30" autocomplete="off" rows="1">{{- $content.VariantTitle -}}</textarea>
|
|
<button class="dm-close-button text-gray-500">
|
|
<i class="ri-close-line"></i>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="grid grid-cols-[8rem_1fr_1.5rem] gap-x-3 gap-y-2 items-baseline {{ if eq $content.PlaceStmt "" }}hidden{{ end }}">
|
|
<label for="{{ $baseID }}-place" class="text-sm font-bold text-gray-700">Ortsangabe</label>
|
|
<textarea name="{{ $prefix }}place_statement" id="{{ $baseID }}-place" class="inputinput no-enter whitespace-normal border border-slate-300 rounded-xs px-2 py-1 bg-white focus:outline-none focus:ring-2 focus:ring-slate-400/30" autocomplete="off" rows="1">{{- $content.PlaceStmt -}}</textarea>
|
|
<button class="dm-close-button text-gray-500">
|
|
<i class="ri-close-line"></i>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="grid grid-cols-[8rem_1fr_1.5rem] gap-x-3 gap-y-2 items-baseline {{ if eq $content.Annotation "" }}hidden{{ end }}">
|
|
<label for="{{ $annotationID }}" class="text-sm font-bold text-gray-700">Anmerkung</label>
|
|
<div class="border border-slate-300 rounded-xs bg-white px-2 py-1 focus-within:ring-2 focus-within:ring-slate-400/30">
|
|
<trix-toolbar id="{{ $annotationToolbar }}">
|
|
<div class="trix-toolbar-container">
|
|
<span class="trix-toolbar-group">
|
|
<button type="button" class="trix-toolbar-button" data-trix-attribute="bold" data-trix-key="b" title="Fett">
|
|
<i class="ri-bold"></i>
|
|
</button>
|
|
<button type="button" class="trix-toolbar-button" data-trix-attribute="italic" data-trix-key="i" title="Kursiv">
|
|
<i class="ri-italic"></i>
|
|
</button>
|
|
<button type="button" class="trix-toolbar-button" data-trix-attribute="strike" title="Gestrichen">
|
|
<i class="ri-strikethrough"></i>
|
|
</button>
|
|
<button type="button" class="trix-toolbar-button" data-trix-attribute="href" data-trix-action="link" data-trix-key="k" title="Link">
|
|
<i class="ri-links-line"></i>
|
|
</button>
|
|
</span>
|
|
<span class="trix-toolbar-group">
|
|
<button type="button" class="trix-toolbar-button" data-trix-attribute="heading1" title="Überschrift">
|
|
<i class="ri-h-1"></i>
|
|
</button>
|
|
<button type="button" class="trix-toolbar-button" data-trix-attribute="quote" title="Zitat">
|
|
<i class="ri-double-quotes-l"></i>
|
|
</button>
|
|
<button type="button" class="trix-toolbar-button" data-trix-attribute="bullet" title="Liste">
|
|
<i class="ri-list-unordered"></i>
|
|
</button>
|
|
<button type="button" class="trix-toolbar-button" data-trix-attribute="number" title="Aufzählung">
|
|
<i class="ri-list-ordered"></i>
|
|
</button>
|
|
<button type="button" class="trix-toolbar-button" data-trix-action="decreaseNestingLevel" title="Einzug verkleinern">
|
|
<i class="ri-indent-decrease"></i>
|
|
</button>
|
|
<button type="button" class="trix-toolbar-button" data-trix-action="increaseNestingLevel" title="Einzug vergrößern">
|
|
<i class="ri-indent-increase"></i>
|
|
</button>
|
|
</span>
|
|
<span class="trix-toolbar-group">
|
|
<button type="button" class="trix-toolbar-button" data-trix-action="undo" data-trix-key="z" title="Rückgängig">
|
|
<i class="ri-arrow-go-back-line"></i>
|
|
</button>
|
|
<button type="button" class="trix-toolbar-button" data-trix-action="redo" data-trix-key="shift+z" title="Wiederholen">
|
|
<i class="ri-arrow-go-forward-line"></i>
|
|
</button>
|
|
</span>
|
|
</div>
|
|
<div class="trix-dialogs" data-trix-dialogs>
|
|
<div class="trix-dialog trix-dialog--link" data-trix-dialog="href" data-trix-dialog-attribute="href">
|
|
<div class="trix-dialog__link-fields flex flex-row">
|
|
<input type="url" name="href" class="trix-input trix-input--dialog" placeholder="URL eingeben…" aria-label="URL" required data-trix-input>
|
|
<div class="trix-button-group flex-row">
|
|
<input type="button" class="trix-button trix-button--dialog" value="Link" data-trix-method="setAttribute">
|
|
<input type="button" class="trix-button trix-button--dialog" value="Unlink" data-trix-method="removeAttribute">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</trix-toolbar>
|
|
<textarea hidden id="{{ $annotationID }}" name="{{ $annotationID }}" autocomplete="off">{{- $content.Annotation -}}</textarea>
|
|
<trix-editor input="{{ $annotationID }}" toolbar="{{ $annotationToolbar }}" class="min-h-[6rem]"></trix-editor>
|
|
</div>
|
|
<button class="dm-close-button text-gray-500">
|
|
<i class="ri-close-line"></i>
|
|
</button>
|
|
</div>
|
|
</div-manager>
|
|
</div>
|
|
</div>
|
|
<div class="mt-0">
|
|
<relations-editor data-prefix="{{ $agentsPrefix }}" data-link-base="/person/" data-new-label="(Neu)" data-add-toggle-id="{{ $agentsAddToggleID }}">
|
|
<div class="inputwrapper !border-none">
|
|
<div class="grid grid-cols-[8rem_1fr] gap-x-3 gap-y-2 items-start px-3 py-2">
|
|
<div class="flex flex-col gap-1 text-sm text-gray-700 font-bold">
|
|
<div class="flex items-center gap-1">
|
|
<span>Personen & Körperschaften</span>
|
|
<tool-tip position="top" class="!inline">
|
|
<div class="data-tip">{{ helpOr "contents" "agents" "Beteiligte Personen oder Körperschaften." }}</div>
|
|
<i class="ri-question-line"></i>
|
|
</tool-tip>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div id="{{ $agentsSectionID }}" class="rel-section-container px-0 mt-0">
|
|
{{- if and $contentAgentsRender (gt (len $contentAgentsRender) 0) -}}
|
|
{{- range $i, $r := $contentAgentsRender -}}
|
|
{{- $a := index $agents $r.Agent -}}
|
|
<div data-rel-row class="contents-agent-row rel-row">
|
|
<div class="rel-grid">
|
|
<div data-rel-strike class="relation-strike rel-name-col">
|
|
{{- if $a -}}
|
|
<a data-rel-link href="/person/{{ $a.Id }}" class="rel-link" target="_blank" rel="noreferrer">
|
|
<span data-rel-name>{{- $a.Name -}}</span>
|
|
</a>
|
|
{{- if $a.BiographicalData -}}
|
|
<div data-rel-detail-container class="rel-detail"><span data-rel-detail>{{- $a.BiographicalData -}}</span></div>
|
|
{{- end -}}
|
|
{{- else -}}
|
|
<div class="text-base text-gray-800">Unbekannte Person</div>
|
|
{{- end -}}
|
|
</div>
|
|
<div data-rel-strike class="relation-strike">
|
|
<select name="{{ $agentsPrefix }}_type[{{ $r.Id }}]" id="{{ $agentsPrefix }}_type_{{ $r.Id }}" autocomplete="off" class="inputselect font-bold w-full">
|
|
{{- range $t := $agentRelations -}}
|
|
<option value="{{- $t -}}" {{ if eq $r.Type $t }}selected{{ end }}>{{- $t -}}</option>
|
|
{{- end -}}
|
|
</select>
|
|
</div>
|
|
<div data-rel-strike class="relation-strike rel-uncertain-container">
|
|
<input
|
|
type="checkbox"
|
|
name="{{ $agentsPrefix }}_uncertain[{{ $r.Id }}]"
|
|
id="{{ $agentsPrefix }}_uncertain_{{ $r.Id }}"
|
|
{{ if $r.Uncertain }}checked{{ end }} />
|
|
<label for="{{ $agentsPrefix }}_uncertain_{{ $r.Id }}" class="rel-uncertain-label">Unsicher</label>
|
|
</div>
|
|
<div class="rel-button-container">
|
|
<button
|
|
type="button"
|
|
class="text-sm"
|
|
data-delete-toggle="{{ $agentsPrefix }}_delete_{{ $r.Id }}">
|
|
<i class="ri-delete-bin-line mr-1"></i>
|
|
<span class="no-underline" data-delete-label data-delete-default="Entfernen" data-delete-active="Wird entfernt" data-delete-hover="Rückgängig">Entfernen</span>
|
|
</button>
|
|
<input type="checkbox" class="hidden" name="{{ $agentsPrefix }}_delete[{{ $r.Id }}]" id="{{ $agentsPrefix }}_delete_{{ $r.Id }}" />
|
|
</div>
|
|
</div>
|
|
<input type="hidden" name="{{ $agentsPrefix }}_id[{{ $r.Id }}]" value="{{ $r.Id }}" />
|
|
<input type="hidden" name="{{ $agentsPrefix }}_agent[{{ $r.Id }}]" value="{{ $r.Agent }}" />
|
|
</div>
|
|
{{- end -}}
|
|
{{- else if $contentAgents -}}
|
|
{{- range $i, $r := $contentAgents -}}
|
|
{{- $a := index $agents $r.Agent -}}
|
|
<div data-rel-row class="contents-agent-row rel-row">
|
|
<div class="rel-grid">
|
|
<div data-rel-strike class="relation-strike rel-name-col">
|
|
{{- if $a -}}
|
|
<a data-rel-link href="/person/{{ $a.Id }}" class="rel-link" target="_blank" rel="noreferrer">
|
|
<span data-rel-name>{{- $a.Name -}}</span>
|
|
</a>
|
|
{{- if $a.BiographicalData -}}
|
|
<div data-rel-detail-container class="rel-detail"><span data-rel-detail>{{- $a.BiographicalData -}}</span></div>
|
|
{{- end -}}
|
|
{{- else -}}
|
|
<div class="text-base text-gray-800">Unbekannte Person</div>
|
|
{{- end -}}
|
|
</div>
|
|
<div data-rel-strike class="relation-strike">
|
|
<select name="{{ $agentsPrefix }}_type[{{ $r.Id }}]" id="{{ $agentsPrefix }}_type_{{ $r.Id }}" autocomplete="off" class="inputselect font-bold w-full">
|
|
{{- range $t := $agentRelations -}}
|
|
<option value="{{- $t -}}" {{ if eq $r.Type $t }}selected{{ end }}>{{- $t -}}</option>
|
|
{{- end -}}
|
|
</select>
|
|
</div>
|
|
<div data-rel-strike class="relation-strike rel-uncertain-container">
|
|
<input
|
|
type="checkbox"
|
|
name="{{ $agentsPrefix }}_uncertain[{{ $r.Id }}]"
|
|
id="{{ $agentsPrefix }}_uncertain_{{ $r.Id }}"
|
|
{{ if $r.Uncertain }}checked{{ end }} />
|
|
<label for="{{ $agentsPrefix }}_uncertain_{{ $r.Id }}" class="rel-uncertain-label">Unsicher</label>
|
|
</div>
|
|
<div class="rel-button-container">
|
|
<button
|
|
type="button"
|
|
class="text-sm"
|
|
data-delete-toggle="{{ $agentsPrefix }}_delete_{{ $r.Id }}">
|
|
<i class="ri-delete-bin-line mr-1"></i>
|
|
<span class="no-underline" data-delete-label data-delete-default="Entfernen" data-delete-active="Wird entfernt" data-delete-hover="Rückgängig">Entfernen</span>
|
|
</button>
|
|
<input type="checkbox" class="hidden" name="{{ $agentsPrefix }}_delete[{{ $r.Id }}]" id="{{ $agentsPrefix }}_delete_{{ $r.Id }}" />
|
|
</div>
|
|
</div>
|
|
<input type="hidden" name="{{ $agentsPrefix }}_id[{{ $r.Id }}]" value="{{ $r.Id }}" />
|
|
<input type="hidden" name="{{ $agentsPrefix }}_agent[{{ $r.Id }}]" value="{{ $r.Agent }}" />
|
|
</div>
|
|
{{- end -}}
|
|
{{- else -}}
|
|
<div class="rel-empty-text">Keine Personen verknüpft.</div>
|
|
{{- end -}}
|
|
</div>
|
|
|
|
<div data-role="relation-add-row" class="flex flex-col gap-2 mt-2 px-0">
|
|
{{- if and $contentAgentsNew (gt (len $contentAgentsNew) 0) -}}
|
|
{{- range $i, $r := $contentAgentsNew -}}
|
|
{{- $a := index $agents $r.Agent -}}
|
|
<div data-rel-row class="rel-row">
|
|
<div class="rel-grid">
|
|
<div data-rel-strike class="relation-strike rel-name-col">
|
|
<div class="text-base text-gray-800 truncate">
|
|
<a data-rel-link class="no-underline hover:text-slate-900" href="/person/{{ $r.Agent }}" target="_blank" rel="noreferrer">
|
|
<span data-rel-name>{{- if $a -}}{{ $a.Name }}{{- end -}}</span>
|
|
</a>
|
|
<em data-rel-new class="rel-new-badge">(Neu)</em>
|
|
</div>
|
|
{{- if $a -}}
|
|
{{- if $a.BiographicalData -}}
|
|
<div data-rel-detail-container class="rel-detail"><span data-rel-detail>{{- $a.BiographicalData -}}</span></div>
|
|
{{- end -}}
|
|
{{- end -}}
|
|
</div>
|
|
<div data-rel-strike class="relation-strike">
|
|
<select name="{{ $agentsPrefix }}_new_type" class="inputselect font-bold w-full">
|
|
{{- range $t := $agentRelations -}}
|
|
<option value="{{- $t -}}" {{ if eq $r.Type $t }}selected{{ end }}>{{- $t -}}</option>
|
|
{{- end -}}
|
|
</select>
|
|
</div>
|
|
<div data-rel-strike class="relation-strike rel-uncertain-container">
|
|
<input data-rel-input="uncertain" type="checkbox" name="{{ $agentsPrefix }}_new_uncertain" value="{{ $r.Agent }}" {{ if $r.Uncertain }}checked{{ end }} />
|
|
<label data-rel-uncertain-label class="rel-uncertain-label">Unsicher</label>
|
|
</div>
|
|
<div class="rel-button-container">
|
|
<button type="button" class="text-sm text-red-700 hover:text-red-900" data-role="relation-new-delete">
|
|
<i class="ri-delete-bin-line mr-1"></i> Entfernen
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<input type="hidden" data-rel-input="id" name="{{ $agentsPrefix }}_new_id" value="{{ $r.Agent }}" />
|
|
</div>
|
|
{{- end -}}
|
|
{{- end -}}
|
|
</div>
|
|
|
|
<div data-role="relation-add-panel" class="mt-2 px-0 hidden">
|
|
<div class="rel-row">
|
|
<div class="rel-grid">
|
|
<div class="min-w-0">
|
|
<label for="{{ $agentsAddToggleID }}-select" class="sr-only">Akteur suchen</label>
|
|
<single-select-remote
|
|
id="{{ $agentsAddToggleID }}-select"
|
|
data-role="relation-add-select"
|
|
name="{{ $agentsPrefix }}_new_id"
|
|
placeholder="Akteur suchen..."
|
|
data-endpoint="/api/agents/search"
|
|
data-result-key="agents"
|
|
data-minchars="1"
|
|
data-limit="15">
|
|
</single-select-remote>
|
|
</div>
|
|
<div>
|
|
<label for="{{ $agentsPrefix }}_new_type" class="sr-only">Beziehung</label>
|
|
<select data-role="relation-type-select" name="{{ $agentsPrefix }}_new_type" id="{{ $agentsPrefix }}_new_type" autocomplete="off" class="inputselect font-bold w-full">
|
|
{{- range $t := $agentRelations -}}
|
|
<option value="{{- $t -}}">{{- $t -}}</option>
|
|
{{- end -}}
|
|
</select>
|
|
</div>
|
|
<div class="rel-uncertain-container">
|
|
<input data-role="relation-uncertain" type="checkbox" name="{{ $agentsPrefix }}_new_uncertain" id="{{ $agentsPrefix }}_new_uncertain" />
|
|
<label for="{{ $agentsPrefix }}_new_uncertain" class="rel-uncertain-label">Unsicher</label>
|
|
</div>
|
|
<div class="rel-button-container">
|
|
<div class="flex items-center gap-3 text-lg">
|
|
<button type="button" data-role="relation-add-apply" class="text-gray-700 hover:text-gray-900" aria-label="Person hinzufügen">
|
|
<i class="ri-check-line"></i>
|
|
</button>
|
|
<button type="button" data-role="relation-add-close" class="text-gray-700 hover:text-gray-900" aria-label="Ausblenden">
|
|
<i class="ri-close-line"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div data-role="relation-add-error" class="text-xs text-red-700 mt-2 hidden" data-error-empty="Bitte Akteur auswählen.">Bitte Akteur auswählen.</div>
|
|
</div>
|
|
</div>
|
|
|
|
<template data-role="relation-new-template">
|
|
<div data-rel-row class="rel-row">
|
|
<div class="rel-grid">
|
|
<div data-rel-strike class="relation-strike rel-name-col">
|
|
<div class="text-base text-gray-800 truncate">
|
|
<a data-rel-link class="no-underline hover:text-slate-900">
|
|
<span data-rel-name></span>
|
|
</a>
|
|
<em data-rel-new class="rel-new-badge"></em>
|
|
</div>
|
|
<div data-rel-detail-container class="rel-detail"><span data-rel-detail></span></div>
|
|
</div>
|
|
<div data-rel-strike class="relation-strike">
|
|
<select data-rel-input="type" class="inputselect font-bold w-full"></select>
|
|
</div>
|
|
<div data-rel-strike class="relation-strike rel-uncertain-container">
|
|
<input data-rel-input="uncertain" type="checkbox" />
|
|
<label data-rel-uncertain-label class="rel-uncertain-label">Unsicher</label>
|
|
</div>
|
|
<div class="rel-button-container">
|
|
<button type="button" class="text-sm text-red-700 hover:text-red-900" data-role="relation-new-delete">
|
|
<i class="ri-delete-bin-line mr-1"></i> Entfernen
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<input type="hidden" data-rel-input="id" />
|
|
</div>
|
|
</template>
|
|
|
|
<div class="mt-2 pb-2 flex justify-end gap-4">
|
|
<a href="/personen/new/" class="text-gray-700 hover:text-slate-950 no-underline" target="_blank" rel="noreferrer">
|
|
<i class="ri-add-line"></i> Neue Person
|
|
</a>
|
|
<button type="button" id="{{ $agentsAddToggleID }}" class="text-gray-700 hover:text-slate-950 no-underline text-left">
|
|
<i class="ri-link"></i> Person verlinken
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</relations-editor>
|
|
</div>
|
|
</div>
|