Skip to content

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

Fix the 'Clear' filter button style on campaigns table in the lists overview page.

Kailash Nadh737e9f54a7b3
diff --git a/static/admin/partials/campaigns-table.html b/static/admin/partials/campaigns-table.html
index 29ca7a67..262e5d01 100644
--- a/static/admin/partials/campaigns-table.html
+++ b/static/admin/partials/campaigns-table.html
@@ -5,6 +5,11 @@
{{- $base := URI "/admin/campaigns" -}}
{{- $tableBase := .Base -}}
<div class="table-wrapper" x-data="table({ query: {{ ToJSON $d.Page.Query }}, filters: {{ ToJSON $d.Page.QueryParams }}, total: {{ $d.Page.Total }} })" :aria-busy="isLoading('campaigns')" @change="onChange($event)">
+ {{- if .ClearFilters }}
+ <div class="bulk-actions">
+ <a href="{{ $tableBase }}" class="button outline small">{{ $root.L.T "globals.buttons.clear" }}</a>
+ </div>
+ {{- end }}
{{- if and (not $readonly) ($d.Can "campaigns:manage" "campaigns:manage_all") }}
<template x-if="numSelected > 0">
<ot-dropdown class="bulk-actions" data-variant="primary">
diff --git a/static/admin/partials/list-info.html b/static/admin/partials/list-info.html
index b93b9fb5..0b4aa37c 100644
--- a/static/admin/partials/list-info.html
+++ b/static/admin/partials/list-info.html
@@ -83,10 +83,8 @@
</fieldset>
</form>
</header> -->
- {{ if or ($d.Page.Param "status") ($d.Page.Param "type") ($d.Page.Param "tag") $d.Page.Query }}
- <p><a href="{{ $base }}">{{ .L.T "globals.buttons.clear" }}</a></p>
- {{ end }}
- {{ template "campaigns-table" dict "Root" . "Base" $base "Readonly" true }}
+ {{- $clearFilters := or ($d.Page.Param "status") ($d.Page.Param "type") ($d.Page.Param "tag") $d.Page.Query -}}
+ {{ template "campaigns-table" dict "Root" . "Base" $base "Readonly" true "ClearFilters" $clearFilters }}
</article>
{{ template "campaign-preview" . }}
</section>