Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

707 B
Raw Blame
{{ define "campaign-attachments" -}}
{{- $root := .Root -}}
{{- $canManage := .CanManage -}}
{{- $canSend := .CanSend -}}
<div class="card page-content attachments">
	<ul class="unstyled gallery">
		<template x-for="(m, idx) in form.media" :key="m.id || m.filename">
			<li>
				{{- template "media-gallery-item" dict "Root" $root "Mode" "attach" }}
			</li>
		</template>
	</ul>
	<template x-if="form.media.length === 0">
		{{- template "empty-state" }}
	</template>

	<footer class="hstack justify-center">
		<button type="button" data-variant="primary" @click="onOpenMedia('attach')" :disabled="!canEdit">{{ Icon "plus" }} {{ $root.L.T "campaigns.addAttachments" }}</button>
	</footer>
</div>
{{- end }}