High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.
JavaScript campaigncampaign-managementemail-marketingemail-subscriptionlistmonkmailing-listnewsletternewsletter-managementnewsletter-softwareself-hostedsms-gatewaysmtptransactional-emails
Apply improvements across table views.
Kailash Nadhbcc065ed59ce
diff --git a/static/admin/assets/css/style.css b/static/admin/assets/css/style.cssindex 55a1cd55..9f96555e 100644--- a/static/admin/assets/css/style.css+++ b/static/admin/assets/css/style.css@@ -147,61 +147,64 @@ a:has(> .badge:only-child) {border-radius: var(--radius-full);}+/* All badges are outline. Colour only applies to the text and the border, never a fill,+ and is set with the --badge-color property below. */.badge {padding: calc(var(--space-1) * 0.75) var(--space-4);+ background: none;+ color: var(--badge-color, var(--muted-foreground));+ border: 1px solid var(--badge-color, var(--border));- &.outline {- color: var(--muted-foreground);- }-- &.enum {- min-width: 7rem;- }-- &.private,&.scheduled,&.status-paused,&.tx,&.api,&.double,&.unconfirmed {- background: light-dark(#fff1e0, #2e261a);- color: light-dark(#ed7b00, #d3a065);+ --badge-color: light-dark(#ed7b00, #d3a065);}- &.public,&.running,&.list,&.campaign,&.user,&.primary {- background: light-dark(#e6f7ff, #1e2733);- color: light-dark(#3b8cff, #8aa9cc);+ --badge-color: light-dark(#3b8cff, #8aa9cc);}/* Subscription/campaign statuses */&.status-confirmed,&.status-finished {- background: light-dark(#dcfce7, #1f2a22);- color: light-dark(#36995b, #7eab8b);+ --badge-color: light-dark(#36995b, #7eab8b);}&.status-unsubscribed,&.status-cancelled {- background: light-dark(#fff1f0, #2e2320);- color: light-dark(#ff5722, #cf9088);+ --badge-color: light-dark(#ff5722, #cf9088);}&.status-blocklisted {- background: light-dark(#fff1f0, #2e2320);- color: var(--danger);+ --badge-color: var(--danger);}&.disabled,&.status-draft,&.optin,&.single {- background: light-dark(#eee, #26262a);- color: light-dark(#7a7a7a, #9a9aa3);+ --badge-color: light-dark(#7a7a7a, #9a9aa3);+ }++ &[data-variant="success"] {+ --badge-color: var(--success);+ }+ &[data-variant="warning"] {+ --badge-color: var(--warning);+ }+ &[data-variant="danger"] {+ --badge-color: var(--danger);+ }++ a:hover > & {+ --badge-color: rgb(from var(--primary) r g b / .8);}}@@ -253,13 +256,19 @@ td .badge {td.stats {dl {display: flex;- flex-flow: row wrap;- align-items: baseline;- column-gap: var(--space-2);+ flex-flow: column;row-gap: var(--space-1);margin: 0;}+ /* Each dt+dd pair is wrapped in a div so that pairs never flow inline+ with each other when the cell is wide. */+ dl > div {+ display: flex;+ align-items: baseline;+ column-gap: var(--space-2);+ }+dt {flex-shrink: 0;min-width: 100px;@@ -268,7 +277,6 @@ td.stats {dd {flex: 1 1 auto;- min-width: max-content;margin: 0;}}diff --git a/static/admin/assets/static/icons.svg b/static/admin/assets/static/icons.svgindex 561c987b..3d2f750f 100644--- a/static/admin/assets/static/icons.svg+++ b/static/admin/assets/static/icons.svg@@ -87,6 +87,10 @@<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" /><circle cx="12" cy="12" r="3" /></symbol>+ <symbol id="icon-eye-off" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">+ <path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24" /><line x1="1" y1="1" x2="23" y2="23" />+ </symbol>+<symbol id="icon-file-text" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" /><polyline points="14 2 14 8 20 8" /><line x1="16" y1="13" x2="8" y2="13" /><line x1="16" y1="17" x2="8" y2="17" /><polyline points="10 9 9 9 8 9" /></symbol>diff --git a/static/admin/icons.txt b/static/admin/icons.txtindex 639d44e3..17a7e2da 100644--- a/static/admin/icons.txt+++ b/static/admin/icons.txt@@ -21,6 +21,7 @@ copydownload-cloudedit-2eye+eye-offfile-textgridhelp-circlediff --git a/static/admin/partials/subscriber-lists.html b/static/admin/partials/subscriber-lists.htmlindex 879d4be7..a16ce9f9 100644--- a/static/admin/partials/subscriber-lists.html+++ b/static/admin/partials/subscriber-lists.html@@ -1,6 +1,7 @@{{ define "subscriber-lists" -}}{{- $root := .Root -}}{{- $canSave := .CanSave -}}+{{- $statusIcons := dict "confirmed" "check-circle" "unsubscribed" "minus-circle" "unconfirmed" "help-circle" -}}<div class="card page-content has-table subscriptions"><div class="table-wrapper"><table>@@ -24,13 +25,13 @@</td><td>{{- $icon := "user-x" }}{{ if eq .Optin "double" }}{{ $icon = "user-check" }}{{ end }}- {{ Badge (list (Icon $icon) ($root.L.T (printf "lists.optins.%s" .Optin))) "enum" "secondary" }}+ {{ Badge (list (Icon $icon) ($root.L.T (printf "lists.optins.%s" .Optin))) "enum" }}</td><td>{{- if and (eq .Optin "single") (eq .SubscriptionStatus "unconfirmed") -}}<span class="text-light">–</span>{{- else -}}- {{ Badge ($root.L.T (printf "subscribers.status.%s" .SubscriptionStatus)) (printf "enum status-%s" .SubscriptionStatus) "secondary" }}+ {{ Badge (list (Icon (index $statusIcons .SubscriptionStatus)) ($root.L.T (printf "subscribers.status.%s" .SubscriptionStatus))) (printf "enum status-%s" .SubscriptionStatus) }}{{- end -}}</td><td>{{ NiceDate .SubscriptionCreatedAt }}</td>diff --git a/static/admin/views/bounces.html b/static/admin/views/bounces.htmlindex 8fce968e..d3ad9a5f 100644--- a/static/admin/views/bounces.html+++ b/static/admin/views/bounces.html@@ -70,7 +70,7 @@{{- with .ParsedCampaign }}<a href="{{ $base }}?campaign_id={{ .ID }}">{{ .Name }}</a>{{ else }}-{{ end }}</td><td><a href="{{ $base }}?source={{ .Source }}">{{ .Source }}</a></td>- <td><a href="{{ $base }}?type={{ .Type }}">{{ Badge ($.L.T (printf "bounces.%s" .Type)) "enum" "secondary" }}</a></td>+ <td><a href="{{ $base }}?type={{ .Type }}" title="{{ $.L.T "globals.buttons.view" }} {{ $.L.T (printf "bounces.%s" .Type) }}">{{ Badge ($.L.T (printf "bounces.%s" .Type)) "enum" }}</a></td><td class="date-stack">{{ NiceDate .CreatedAt }}</td><td class="actions align-right"><ot-dropdown>diff --git a/static/admin/views/campaigns.html b/static/admin/views/campaigns.htmlindex 9f0393b4..28506cb6 100644--- a/static/admin/views/campaigns.html+++ b/static/admin/views/campaigns.html@@ -5,6 +5,7 @@{{- $status := $d.Page.Param "status" -}}{{- $type := $d.Page.Param "type" -}}{{- $tags := $d.Page.Param "tag" -}}+{{- $statusIcons := dict "draft" "file-text" "scheduled" "clock" "running" "send" "paused" "pause" "cancelled" "x-circle" "finished" "check-circle" -}}<section class="campaigns" x-data="campaignsView"><header class="row page-header">@@ -12,10 +13,10 @@<h1 class="page-title">{{ .L.T "globals.terms.campaigns" }}<span>({{ $d.Page.Total }})</span>- {{- if $status }} {{ template "filter-badge" dict "Label" (.L.T (printf "campaigns.status.%s" $status)) "Class" (printf "enum status-%s" $status) "URL" ($d.Page.FilterURL $base "status") }}{{ end }}- {{- if $type }} {{ template "filter-badge" dict "Label" (.L.T "lists.optin") "Class" "enum optin" "URL" ($d.Page.FilterURL $base "type") }}{{ end }}- {{- if $tags }} {{ template "filter-badge" dict "Label" (printf "#%s" $tags) "Class" "outline tag" "URL" ($d.Page.FilterURL $base "tag") }}{{ end }}- {{- if gt $d.Page.Page 1 }} {{ template "filter-badge" dict "Label" (.L.Ts "globals.terms.page" "n" (printf "%d" $d.Page.Page)) "Class" "outline" "URL" ($d.Page.FilterURL $base) }}{{ end }}+ {{- if $status }} {{ template "filter-badge" dict "Label" (list (Icon (index $statusIcons $status)) (.L.T (printf "campaigns.status.%s" $status))) "Class" (printf "enum status-%s" $status) "URL" ($d.Page.FilterURL $base "status") }}{{ end }}+ {{- if $type }} {{ template "filter-badge" dict "Label" (list (Icon "user-check") (.L.T "lists.optin")) "Class" "enum optin" "URL" ($d.Page.FilterURL $base "type") }}{{ end }}+ {{- if $tags }} {{ template "filter-badge" dict "Label" (list (Icon "tag") $tags) "Class" "tag" "URL" ($d.Page.FilterURL $base "tag") }}{{ end }}+ {{- if gt $d.Page.Page 1 }} {{ template "filter-badge" dict "Label" (.L.Ts "globals.terms.page" "n" (printf "%d" $d.Page.Page)) "URL" ($d.Page.FilterURL $base) }}{{ end }}</h1></div><div class="col-6 hstack justify-end">@@ -60,10 +61,10 @@<thead><tr><th width="5%"><input type="checkbox" aria-label="{{ .L.T "globals.buttons.toggleSelect" }}"></th>- <th width="20%" class="cy-name">{{ $d.Page.SortLink $base "name" (.L.T "globals.fields.name") }}</th>- <th width="20%" class="cy-subject">{{ .L.T "campaigns.subject" }}</th>+ <th width="25%" class="cy-name">{{ $d.Page.SortLink $base "name" (.L.T "globals.fields.name") }}</th>+ <th width="15%" class="cy-type">{{ .L.T "globals.fields.type" }}</th><th width="15%" class="cy-lists">{{ .L.T "globals.terms.lists" }}</th>- <th width="20%" class="cy-timestamp">{{ $d.Page.SortLink $base "created_at" (.L.T "campaigns.timestamps") }}</th>+ <th width="26%" class="cy-timestamp">{{ $d.Page.SortLink $base "created_at" (.L.T "campaigns.timestamps") }}</th><th width="15%">{{ .L.T "campaigns.stats" }}</th><th width="5%" class="align-right"></th></tr>@@ -79,29 +80,37 @@<tr data-campaign-id="{{ .ID }}" {{ if eq .Status "running" }}class="running"{{ end }}><td><input name="id" type="checkbox" value="{{ .ID }}"></td><td class="name">- <a href="{{ $base }}/{{ .ID }}" class="unstyled">{{ .Name }}</a>- <div class="status">- <a href="{{ $base }}?status={{ .Status }}">- {{ Badge ($.L.T (printf "campaigns.status.%s" .Status)) (printf "enum status-%s" .Status) }}- {{- if eq .Status "running" }}<span class="spinner" data-spinner="small" aria-busy="true"></span>{{ end }}- </a>- {{- if or (eq .Status "scheduled") .SendAt.Valid }}- <div class="text-8 text-light mt-2">{{ Icon "clock" }} {{ NiceDate .SendAt }}</div>+ <div class="vstack gap-1">+ <div>+ <a href="{{ $base }}/{{ .ID }}" class="unstyled">{{ .Name }}</a>+ <div class="subject text-8 text-light">+ <a href="{{ $base }}/{{ .ID }}" class="unstyled">{{ .Subject }}</a>+ </div>+ </div>+ {{- if .Tags }}+ <div class="hstack gap-2 text-8">+ {{ range .Tags }}<a href="?{{ $d.Page.Encode "tag" }}&tag={{ . }}" class="tag">#{{ . }}</a>{{ end }}+ </div>{{- end }}</div>- {{- if eq .Type "optin" }}- <div class="hstack gap-1">- <a href="{{ $base }}?type=optin">{{ Badge ($.L.T "lists.optin") "enum optin" }}</a>- </div>- {{- end }}</td>- <td class="subject">- <a href="{{ $base }}/{{ .ID }}" class="unstyled">{{ .Subject }}</a>- {{- if .Tags }}- <div class="hstack gap-1 text-8">- {{ range .Tags }}<a href="?{{ $d.Page.Encode "tag" }}&tag={{ . }}" class="tag">#{{ . }}</a>{{ end }}+ <td class="type">+ <div class="vstack gap-1">+ <div>+ <a href="{{ $base }}?status={{ .Status }}" title="{{ $.L.T "globals.buttons.view" }} {{ $.L.T (printf "campaigns.status.%s" .Status) }}">+ {{ Badge (list (Icon (index $statusIcons .Status)) ($.L.T (printf "campaigns.status.%s" .Status))) (printf "enum status-%s" .Status) }}+ {{- if eq .Status "running" }}<span class="spinner" data-spinner="small" aria-busy="true"></span>{{ end }}+ </a>+ {{- if or (eq .Status "scheduled") .SendAt.Valid }}+ <div class="text-8 text-light">{{ Icon "clock" }} {{ NiceDate .SendAt }}</div>+ {{- end }}</div>- {{- end }}+ {{- if eq .Type "optin" }}+ <div>+ <a href="{{ $base }}?type=optin" title="{{ $.L.T "globals.buttons.view" }} {{ $.L.T "lists.optin" }}">{{ Badge (list (Icon "user-check") ($.L.T "lists.optin")) "enum" }}</a>+ </div>+ {{- end }}+ </div></td><td class="lists"><ul>@@ -112,24 +121,24 @@</td><td class="stats"><dl class="text-8">- <dt>{{ $.L.T "globals.fields.createdAt" }}</dt><dd>{{ NiceDate .CreatedAt }}</dd>+ <div><dt>{{ $.L.T "globals.fields.createdAt" }}</dt><dd>{{ NiceDate .CreatedAt }}</dd></div>{{- if .StartedAt.Valid }}- <dt>{{ $.L.T "campaigns.startedAt" }}</dt><dd>{{ NiceDate .StartedAt }}</dd>+ <div><dt>{{ $.L.T "campaigns.startedAt" }}</dt><dd>{{ NiceDate .StartedAt }}</dd></div>{{- end }}{{- if and $isDone .UpdatedAt.Valid }}- <dt>{{ $.L.T "campaigns.ended" }}</dt><dd>{{ NiceDate .UpdatedAt }}</dd>+ <div><dt>{{ $.L.T "campaigns.ended" }}</dt><dd>{{ NiceDate .UpdatedAt }}</dd></div>{{- end }}</dl></td><td class="stats"><dl class="text-8">- <dt>{{ $.L.T "campaigns.views" }}</dt><dd>{{ FormatNumber .Views }}</dd>- <dt>{{ $.L.T "campaigns.clicks" }}</dt><dd>{{ FormatNumber .Clicks }}</dd>- <dt>{{ $.L.T "campaigns.sent" }}</dt><dd><span data-stat="sent">{{ FormatNumber .Sent }}</span> / <span data-stat="to_send">{{ FormatNumber .ToSend }}</span></dd>- <dt>{{ $.L.T "globals.terms.bounces" }}</dt><dd><a href="{{ URI "/admin/subscribers/bounces" }}?campaign_id={{ .ID }}" class="unstyled">{{ FormatNumber .Bounces }}</a></dd>+ <div><dt>{{ $.L.T "campaigns.views" }}</dt><dd>{{ FormatNumber .Views }}</dd></div>+ <div><dt>{{ $.L.T "campaigns.clicks" }}</dt><dd>{{ FormatNumber .Clicks }}</dd></div>+ <div><dt>{{ $.L.T "campaigns.sent" }}</dt><dd><span data-stat="sent">{{ FormatNumber .Sent }}</span> / <span data-stat="to_send">{{ FormatNumber .ToSend }}</span></dd></div>+ <div><dt>{{ $.L.T "globals.terms.bounces" }}</dt><dd><a href="{{ URI "/admin/subscribers/bounces" }}?campaign_id={{ .ID }}" class="unstyled">{{ FormatNumber .Bounces }}</a></dd></div>{{- if eq .Status "running" }}- <dt class="send-rate">{{ Icon "activity" }}</dt><dd><span data-stat="rate">0</span> / {{ $.L.T "campaigns.rateMinuteShort" }}</dd>- <dt>{{ $.L.T "campaigns.progress" }}</dt><dd><progress data-stat="progress" value="{{ .Sent }}" max="{{ .ToSend }}"></progress></dd>+ <div><dt class="send-rate">{{ Icon "activity" }}</dt><dd><span data-stat="rate">0</span> / {{ $.L.T "campaigns.rateMinuteShort" }}</dd></div>+ <div><dt>{{ $.L.T "campaigns.progress" }}</dt><dd><progress data-stat="progress" value="{{ .Sent }}" max="{{ .ToSend }}"></progress></dd></div>{{- end }}</dl></td>diff --git a/static/admin/views/forms.html b/static/admin/views/forms.htmlindex fcf610be..1625343c 100644--- a/static/admin/views/forms.html+++ b/static/admin/views/forms.html@@ -54,7 +54,7 @@<p class="text-light">{{ .L.T "forms.formHTMLHelp" }}</p><div x-show="checked.length > 0" x-cloak>- <div class="align-right">+ <div class="align-right mb-2"><button type="button" class="small outline" @click="copyHTML" title="{{ .L.T "globals.messages.clickToCopy" }}">{{ Icon "copy" }} {{ .L.T "globals.buttons.copy" }}</button>diff --git a/static/admin/views/lists.html b/static/admin/views/lists.htmlindex 752e6967..38ce5762 100644--- a/static/admin/views/lists.html+++ b/static/admin/views/lists.html@@ -15,14 +15,17 @@<h1 class="page-title">{{ .L.T "globals.terms.lists" }}<span>({{ $d.Page.Total }})</span>- {{- if eq $status "archived" }} {{ template "filter-badge" dict "Label" (.L.T "lists.archived") "Class" "outline" "URL" ($d.Page.FilterURL $base "status") }}{{ end }}- {{- if $type }} {{ template "filter-badge" dict "Label" (.L.T (printf "lists.types.%s" $type)) "Class" (printf "enum %s" $type) "URL" ($d.Page.FilterURL $base "type") }}{{ end }}+ {{- if eq $status "archived" }} {{ template "filter-badge" dict "Label" (.L.T "lists.archived") "URL" ($d.Page.FilterURL $base "status") }}{{ end }}+ {{- if $type }}+ {{- $typeIcon := "eye-off" }}{{ if eq $type "public" }}{{ $typeIcon = "eye" }}{{ end }}+ {{ template "filter-badge" dict "Label" (list (Icon $typeIcon) (.L.T (printf "lists.types.%s" $type))) "Class" "enum" "URL" ($d.Page.FilterURL $base "type") }}+ {{- end }}{{- if $optin }}{{- $optinIcon := "user-x" }}{{ if eq $optin "double" }}{{ $optinIcon = "user-check" }}{{ end }}- {{ template "filter-badge" dict "Label" (list (Icon $optinIcon) (.L.T (printf "lists.optins.%s" $optin))) "Class" "enum" "Variant" "secondary" "URL" ($d.Page.FilterURL $base "optin") }}+ {{ template "filter-badge" dict "Label" (list (Icon $optinIcon) (.L.T (printf "lists.optins.%s" $optin))) "Class" "enum" "URL" ($d.Page.FilterURL $base "optin") }}{{- end }}- {{- if $tags }} {{ template "filter-badge" dict "Label" (printf "#%s" $tags) "Class" "outline tag" "URL" ($d.Page.FilterURL $base "tag") }}{{ end }}- {{- if gt $d.Page.Page 1 }} {{ template "filter-badge" dict "Label" (.L.Ts "globals.terms.page" "n" (printf "%d" $d.Page.Page)) "Class" "outline" "URL" ($d.Page.FilterURL $base) }}{{ end }}+ {{- if $tags }} {{ template "filter-badge" dict "Label" (printf "#%s" $tags) "Class" "tag" "URL" ($d.Page.FilterURL $base "tag") }}{{ end }}+ {{- if gt $d.Page.Page 1 }} {{ template "filter-badge" dict "Label" (.L.Ts "globals.terms.page" "n" (printf "%d" $d.Page.Page)) "URL" ($d.Page.FilterURL $base) }}{{ end }}</h1></div><div class="col-6 col-end align-right hstack justify-end">@@ -65,12 +68,12 @@<thead><tr><th width="5%"><input type="checkbox" aria-label="{{ .L.T "globals.buttons.toggleSelect" }}"></th>- <th width="20%">{{ $d.Page.SortLink (URI "/admin/lists") "name" (.L.T "globals.fields.name") }}</th>- <th>{{ $d.Page.SortLink (URI "/admin/lists") "type" (.L.T "globals.fields.type") }}</th>- <th class="subscribers">{{ $d.Page.SortLink (URI "/admin/lists") "subscriber_count" (.L.T "globals.terms.subscribers") }}</th>- <th></th>- <th>{{ $d.Page.SortLink (URI "/admin/lists") "created_at" (.L.T "globals.fields.createdAt") }}</th>- <th class="align-right"></th>+ <th width="27%">{{ $d.Page.SortLink (URI "/admin/lists") "name" (.L.T "globals.fields.name") }}</th>+ <th width="22%">{{ $d.Page.SortLink (URI "/admin/lists") "type" (.L.T "globals.fields.type") }}</th>+ <th width="10%" class="subscribers">{{ $d.Page.SortLink (URI "/admin/lists") "subscriber_count" (.L.T "globals.terms.subscribers") }}</th>+ <th width="18%"></th>+ <th width="12%">{{ $d.Page.SortLink (URI "/admin/lists") "created_at" (.L.T "globals.fields.createdAt") }}</th>+ <th width="5%" class="align-right"></th></tr></thead><tbody>@@ -85,9 +88,10 @@</td><td><div class="hstack">- <a href="{{ $base }}?type={{ .Type }}">{{ Badge ($.L.T (printf "lists.types.%s" .Type)) (printf "enum %s" .Type) }}</a>+ {{- $typeIcon := "eye-off" }}{{ if eq .Type "public" }}{{ $typeIcon = "eye" }}{{ end }}+ <a href="{{ $base }}?type={{ .Type }}" title="{{ $.L.T "globals.buttons.view" }} {{ $.L.T (printf "lists.types.%s" .Type) }}">{{ Badge (list (Icon $typeIcon) ($.L.T (printf "lists.types.%s" .Type))) "enum" }}</a>{{- $icon := "user-x" }}{{ if eq .Optin "double" }}{{ $icon = "user-check" }}{{ end }}- <a href="{{ $base }}?optin={{ .Optin }}">{{ Badge (list (Icon $icon) ($.L.T (printf "lists.optins.%s" .Optin))) "enum" "secondary" }}</a>+ <a href="{{ $base }}?optin={{ .Optin }}" title="{{ $.L.T "globals.buttons.view" }} {{ $.L.T (printf "lists.optins.%s" .Optin) }}">{{ Badge (list (Icon $icon) ($.L.T (printf "lists.optins.%s" .Optin))) "enum" }}</a></div></td><td class="subscribers">@@ -104,22 +108,22 @@{{- $unsubscribed := index $counts "unsubscribed" -}}{{- $blocklisted := index $counts "blocklisted" }}{{- if gt $subscribed 0 }}- <dt>{{ $.L.T "subscribers.status.subscribed" }}</dt><dd><a href="{{ URI "/admin/subscribers/lists" }}/{{ .ID }}?subscription_status=subscribed" class="unstyled">{{ FormatNumber $subscribed }}</a></dd>+ <div><dt>{{ $.L.T "subscribers.status.subscribed" }}</dt><dd><a href="{{ URI "/admin/subscribers/lists" }}/{{ .ID }}?subscription_status=subscribed" class="unstyled" title="{{ $.L.T "globals.buttons.view" }} {{ $.L.T "subscribers.status.subscribed" }}">{{ FormatNumber $subscribed }}</a></dd></div>{{- end }}{{- if gt $unsubscribed 0 }}- <dt>{{ $.L.T "subscribers.status.unsubscribed" }}</dt><dd><a href="{{ URI "/admin/subscribers/lists" }}/{{ .ID }}?subscription_status=unsubscribed" class="unstyled">{{ FormatNumber $unsubscribed }}</a></dd>+ <div><dt>{{ $.L.T "subscribers.status.unsubscribed" }}</dt><dd><a href="{{ URI "/admin/subscribers/lists" }}/{{ .ID }}?subscription_status=unsubscribed" class="unstyled" title="{{ $.L.T "globals.buttons.view" }} {{ $.L.T "subscribers.status.unsubscribed" }}">{{ FormatNumber $unsubscribed }}</a></dd></div>{{- end }}{{- if gt $blocklisted 0 }}- <dt>{{ $.L.T "subscribers.status.blocklisted" }}</dt><dd><a href="{{ URI "/admin/subscribers/lists" }}/{{ .ID }}?subscription_status=blocklisted" class="unstyled blocklisted">{{ FormatNumber $blocklisted }}</a></dd>+ <div><dt>{{ $.L.T "subscribers.status.blocklisted" }}</dt><dd><a href="{{ URI "/admin/subscribers/lists" }}/{{ .ID }}?subscription_status=blocklisted" class="unstyled blocklisted" title="{{ $.L.T "globals.buttons.view" }} {{ $.L.T "subscribers.status.blocklisted" }}">{{ FormatNumber $blocklisted }}</a></dd></div>{{- end }}{{- if eq .Optin "double" }}{{- $confirmed := index $counts "confirmed" -}}{{- $unconfirmed := index $counts "unconfirmed" }}{{- if gt $confirmed 0 }}- <dt>{{ $.L.T "subscribers.status.confirmed" }}</dt><dd><a href="{{ URI "/admin/subscribers/lists" }}/{{ .ID }}?subscription_status=confirmed" class="unstyled confirmed">{{ FormatNumber $confirmed }}</a></dd>+ <div><dt>{{ $.L.T "subscribers.status.confirmed" }}</dt><dd><a href="{{ URI "/admin/subscribers/lists" }}/{{ .ID }}?subscription_status=confirmed" class="unstyled confirmed" title="{{ $.L.T "globals.buttons.view" }} {{ $.L.T "subscribers.status.confirmed" }}">{{ FormatNumber $confirmed }}</a></dd></div>{{- end }}{{- if gt $unconfirmed 0 }}- <dt>{{ $.L.T "subscribers.status.unconfirmed" }}</dt><dd><a href="{{ URI "/admin/subscribers/lists" }}/{{ .ID }}?subscription_status=unconfirmed" class="unstyled unconfirmed">{{ FormatNumber $unconfirmed }}</a></dd>+ <div><dt>{{ $.L.T "subscribers.status.unconfirmed" }}</dt><dd><a href="{{ URI "/admin/subscribers/lists" }}/{{ .ID }}?subscription_status=unconfirmed" class="unstyled unconfirmed" title="{{ $.L.T "globals.buttons.view" }} {{ $.L.T "subscribers.status.unconfirmed" }}">{{ FormatNumber $unconfirmed }}</a></dd></div>{{- end }}{{- end }}</dl>diff --git a/static/admin/views/subscribers.html b/static/admin/views/subscribers.htmlindex e04e9470..0f0ff106 100644--- a/static/admin/views/subscribers.html+++ b/static/admin/views/subscribers.html@@ -23,11 +23,11 @@<h1 class="page-title">{{ .L.T "globals.terms.subscribers" }}<span>({{ $d.Page.Total }})</span>- {{- if $d.CurrentList }} {{ template "filter-badge" dict "Label" $d.CurrentList.Name "Class" "outline" "URL" (URI "/admin/subscribers") }}{{ end }}- {{- if eq $subStatus "none" }} {{ template "filter-badge" dict "Label" (.L.T "dashboard.orphanSubs") "Class" "outline" "URL" ($d.Page.FilterURL $base "subscription_status") }}+ {{- if $d.CurrentList }} {{ template "filter-badge" dict "Label" $d.CurrentList.Name "URL" (URI "/admin/subscribers") }}{{ end }}+ {{- if eq $subStatus "none" }} {{ template "filter-badge" dict "Label" (.L.T "dashboard.orphanSubs") "URL" ($d.Page.FilterURL $base "subscription_status") }}{{- else if $subStatus }} {{ template "filter-badge" dict "Label" (.L.T (printf "subscribers.status.%s" $subStatus)) "Class" (printf "status-%s" $subStatus) "URL" ($d.Page.FilterURL $base "subscription_status") }}{{ end }}{{- if $status }} {{ template "filter-badge" dict "Label" (.L.T (printf "subscribers.status.%s" $status)) "Class" (printf "status-%s" $status) "URL" ($d.Page.FilterURL $base "status") }}{{ end }}- {{- if gt $d.Page.Page 1 }} {{ template "filter-badge" dict "Label" (.L.Ts "globals.terms.page" "n" (printf "%d" $d.Page.Page)) "Class" "outline" "URL" ($d.Page.FilterURL $base) }}{{ end }}+ {{- if gt $d.Page.Page 1 }} {{ template "filter-badge" dict "Label" (.L.Ts "globals.terms.page" "n" (printf "%d" $d.Page.Page)) "URL" ($d.Page.FilterURL $base) }}{{ end }}</h1></div><div class="col-6 col-end hstack justify-end">diff --git a/static/admin/views/template.html b/static/admin/views/template.htmlindex 9f2505dc..f76a4b94 100644--- a/static/admin/views/template.html+++ b/static/admin/views/template.html@@ -20,7 +20,7 @@<h1 class="page-title">{{- if $isNew }}{{ .L.T "templates.newTemplate" }}{{ else }}{{ $t.Name }}{{ end -}}</h1>- {{- if and (not $isNew) $t.IsDefault }}{{ Badge (.L.T "templates.default") "enum" "secondary" }}{{ end }}+ {{- if and (not $isNew) $t.IsDefault }}{{ Badge (.L.T "templates.default") "enum" }}{{ end }}</div></div><div class="col-6 col-end hstack justify-end">diff --git a/static/admin/views/templates.html b/static/admin/views/templates.htmlindex 5de7dd19..36e7bdbf 100644--- a/static/admin/views/templates.html+++ b/static/admin/views/templates.html@@ -51,13 +51,13 @@<td><div class="hstack">{{- if eq .Type "tx" }}- <a href="{{ $base }}?type={{ .Type }}">{{ Badge ($.L.Tc "globals.terms.tx" 1) "enum tx" }}</a>+ <a href="{{ $base }}?type={{ .Type }}" title="{{ $.L.T "globals.buttons.view" }} {{ $.L.Tc "globals.terms.tx" 1 }}">{{ Badge ($.L.Tc "globals.terms.tx" 1) "enum tx" }}</a>{{- else }}- <a href="{{ $base }}?type={{ .Type }}">{{ Badge ($.L.Tc "globals.terms.campaign" 1) "enum campaign" }}</a>+ <a href="{{ $base }}?type={{ .Type }}" title="{{ $.L.T "globals.buttons.view" }} {{ $.L.Tc "globals.terms.campaign" 1 }}">{{ Badge ($.L.Tc "globals.terms.campaign" 1) "enum campaign" }}</a>{{- if eq .Type "campaign_visual" }}- <a href="{{ $base }}?type={{ .Type }}">{{ Badge ($.L.T "campaigns.contentType.visual") "enum" "secondary" }}</a>+ <a href="{{ $base }}?type={{ .Type }}" title="{{ $.L.T "globals.buttons.view" }} {{ $.L.T "campaigns.contentType.visual" }}">{{ Badge ($.L.T "campaigns.contentType.visual") "enum" }}</a>{{- else }}- <a href="{{ $base }}?type={{ .Type }}">{{ Badge "HTML" "enum" "secondary" }}</a>+ <a href="{{ $base }}?type={{ .Type }}" title="{{ $.L.T "globals.buttons.view" }} HTML">{{ Badge "HTML" "enum" }}</a>{{- end }}{{- end }}</div>diff --git a/static/admin/views/users.html b/static/admin/views/users.htmlindex cd2d5650..4ca96655 100644--- a/static/admin/views/users.html+++ b/static/admin/views/users.html@@ -12,17 +12,17 @@<span>({{ len $d.Users }})</span>{{- if $d.Type }}{{- if eq $d.Type "api" }}- {{ template "filter-badge" dict "Label" (list (Icon "code") (.L.T "users.type.api")) "Class" "outline tag" "URL" ($d.Page.FilterURL $base "type") }}+ {{ template "filter-badge" dict "Label" (list (Icon "code") (.L.T "users.type.api")) "Class" "tag" "URL" ($d.Page.FilterURL $base "type") }}{{- else }}- {{ template "filter-badge" dict "Label" $d.Type "Class" "outline" "URL" ($d.Page.FilterURL $base "type") }}+ {{ template "filter-badge" dict "Label" $d.Type "URL" ($d.Page.FilterURL $base "type") }}{{- end }}{{- end }}{{- if $d.Status }} {{ template "filter-badge" dict "Label" (.L.T (printf "users.status.%s" $d.Status)) "Class" "enum" "Variant" "danger" "URL" ($d.Page.FilterURL $base "status") }}{{ end }}{{- if $d.UserRoleID }}{{- $roleIcon := "user" }}{{ if eq $d.UserRoleID 1 }}{{ $roleIcon = "star" }}{{ end }}- {{ template "filter-badge" dict "Label" (list (Icon $roleIcon) $d.UserRoleName) "Variant" (ternary "" "secondary" (eq $d.UserRoleID 1)) "URL" ($d.Page.FilterURL $base "user_role_id") }}+ {{ template "filter-badge" dict "Label" (list (Icon $roleIcon) $d.UserRoleName) "URL" ($d.Page.FilterURL $base "user_role_id") }}{{- end }}- {{- if $d.ListRoleID }} {{ template "filter-badge" dict "Label" (list (Icon "list") $d.ListRoleName) "Class" "outline" "URL" ($d.Page.FilterURL $base "list_role_id") }}{{ end }}+ {{- if $d.ListRoleID }} {{ template "filter-badge" dict "Label" (list (Icon "list") $d.ListRoleName) "URL" ($d.Page.FilterURL $base "list_role_id") }}{{ end }}</h1></div></div>@@ -78,19 +78,19 @@{{- else }}<span class="{{ if eq .Status "disabled" }}text-danger{{ end }}">{{ .Username }}</span>{{- end }}- {{- if eq .Type "api" }}<a href="{{ $base }}?type=api">{{ Badge (list (Icon "code") ($.L.T "users.type.api")) "outline tag" }}</a>{{ end }}- {{- if eq .Status "disabled" }}<a href="{{ $base }}?status=disabled">{{ Badge ($.L.T "users.status.disabled") "enum" "danger" }}</a>{{ end }}+ {{- if eq .Type "api" }}<a href="{{ $base }}?type=api" title="{{ $.L.T "globals.buttons.view" }} {{ $.L.T "users.type.api" }}">{{ Badge (list (Icon "code") ($.L.T "users.type.api")) "tag" }}</a>{{ end }}+ {{- if eq .Status "disabled" }}<a href="{{ $base }}?status=disabled" title="{{ $.L.T "globals.buttons.view" }} {{ $.L.T "users.status.disabled" }}">{{ Badge ($.L.T "users.status.disabled") "enum" "danger" }}</a>{{ end }}{{- if .Name }}<div class="text-light text-8">{{ .Name }}</div>{{ end }}</td><td><div class="hstack gap-1">{{- if eq .UserRole.ID 1 }}- <a href="{{ $base }}?user_role_id={{ .UserRole.ID }}">{{ Badge (list (Icon "star") .UserRole.Name) }}</a>+ <a href="{{ $base }}?user_role_id={{ .UserRole.ID }}" title="{{ $.L.T "globals.buttons.view" }} {{ .UserRole.Name }}">{{ Badge (list (Icon "star") .UserRole.Name) }}</a>{{- else }}- <a href="{{ $base }}?user_role_id={{ .UserRole.ID }}">{{ Badge (list (Icon "user") .UserRole.Name) "" "secondary" }}</a>+ <a href="{{ $base }}?user_role_id={{ .UserRole.ID }}" title="{{ $.L.T "globals.buttons.view" }} {{ .UserRole.Name }}">{{ Badge (list (Icon "user") .UserRole.Name) }}</a>{{- end }}{{- with .ListRole }}- <a href="{{ $base }}?list_role_id={{ .ID }}">{{ Badge (list (Icon "list") .Name) "outline" }}</a>+ <a href="{{ $base }}?list_role_id={{ .ID }}" title="{{ $.L.T "globals.buttons.view" }} {{ .Name }}">{{ Badge (list (Icon "list") .Name) }}</a>{{- end }}</div></td>