Add public archive on/off toggle to settings.

This commit is contained in:
Kailash Nadh 2022-11-10 22:24:15 +05:30
parent f958f3d24b
commit 818f2c9d8e
31 changed files with 79 additions and 11 deletions

View file

@ -172,7 +172,10 @@ func initHTTPHandlers(e *echo.Echo, app *App) {
// Public API endpoints.
e.GET("/api/public/lists", handleGetPublicLists)
e.POST("/api/public/subscription", handlePublicSubscription)
if app.constants.EnablePublicArchive {
e.GET("/api/public/archive", handleGetCampaignArchives)
}
// /public/static/* file server is registered in initHTTPServer().
// Public subscriber facing views.
@ -195,9 +198,11 @@ func initHTTPHandlers(e *echo.Echo, app *App) {
e.GET("/campaign/:campUUID/:subUUID/px.png", noIndex(validateUUID(handleRegisterCampaignView,
"campUUID", "subUUID")))
if app.constants.EnablePublicArchive {
e.GET("/archive", handleCampaignArchivesPage)
e.GET("/archive.xml", handleGetCampaignArchivesFeed)
e.GET("/archive/:uuid", handleCampaignArchivePage)
}
e.GET("/public/custom.css", serveCustomApperance("public.custom_css"))
e.GET("/public/custom.js", serveCustomApperance("public.custom_js"))

View file

@ -56,6 +56,7 @@ type constants struct {
FromEmail string `koanf:"from_email"`
NotifyEmails []string `koanf:"notify_emails"`
EnablePublicSubPage bool `koanf:"enable_public_subscription_page"`
EnablePublicArchive bool `koanf:"enable_public_archive"`
SendOptinConfirmation bool `koanf:"send_optin_confirmation"`
Lang string `koanf:"lang"`
DBBatchSize int `koanf:"batch_size"`
@ -699,6 +700,7 @@ func initHTTPServer(app *App) *echo.Echo {
LogoURL: app.constants.LogoURL,
FaviconURL: app.constants.FaviconURL,
EnablePublicSubPage: app.constants.EnablePublicSubPage,
EnablePublicArchive: app.constants.EnablePublicArchive,
}
// Initialize the static file server.

View file

@ -31,6 +31,7 @@ type tplRenderer struct {
LogoURL string
FaviconURL string
EnablePublicSubPage bool
EnablePublicArchive bool
}
// tplData is the data container that is injected
@ -41,6 +42,7 @@ type tplData struct {
LogoURL string
FaviconURL string
EnablePublicSubPage bool
EnablePublicArchive bool
Data interface{}
L *i18n.I18n
}
@ -92,6 +94,7 @@ func (t *tplRenderer) Render(w io.Writer, name string, data interface{}, c echo.
LogoURL: t.LogoURL,
FaviconURL: t.FaviconURL,
EnablePublicSubPage: t.EnablePublicSubPage,
EnablePublicArchive: t.EnablePublicArchive,
Data: data,
L: c.Get("app").(*App).i18n,
})

View file

@ -44,14 +44,21 @@
<hr />
<div class="columns">
<div class="column is-6">
<div class="column is-4">
<b-field :label="$t('settings.general.enablePublicSubPage')"
:message="$t('settings.general.enablePublicSubPageHelp')">
<b-switch v-model="data['app.enable_public_subscription_page']"
name="app.enable_public_subscription_page" />
</b-field>
</div>
<div class="column is-6">
<div class="column is-4">
<b-field :label="$t('settings.general.enablePublicArchive')"
:message="$t('settings.general.enablePublicArchiveHelp')">
<b-switch v-model="data['app.enable_public_archive']"
name="app.enable_public_archive" />
</b-field>
</div>
<div class="column is-4">
<b-field :label="$t('settings.general.sendOptinConfirm')"
:message="$t('settings.general.sendOptinConfirmHelp')">
<b-switch v-model="data['app.send_optin_confirmation']"

View file

@ -369,6 +369,8 @@
"settings.general.adminNotifEmailsHelp": "Llista d'adreces de correu electrònic separades per comes a les quals s'han d'enviar notificacions d'administrador, com ara actualitzacions d'importació, finalització de campanya, errors, etc.",
"settings.general.checkUpdates": "Busca actualitzacions",
"settings.general.checkUpdatesHelp": "Comprova periòdicament si hi ha noves versions d'aplicacions i notifica-ho.",
"settings.general.enablePublicArchive": "Enable public mailing list archive page",
"settings.general.enablePublicArchiveHelp": "Publish campaigns on which archiving is enabled on the public website.",
"settings.general.enablePublicSubPage": "Activa la pàgina de subscripció pública",
"settings.general.enablePublicSubPageHelp": "Mostra una pàgina de subscripció pública amb totes les llistes públiques perquè la gent es subscrigui.",
"settings.general.faviconURL": "Favicon URL",

View file

@ -370,6 +370,8 @@
"settings.general.adminNotifEmailsHelp": "Seznam e-mailových adres oddělených čárkami, na které by se měla odeslat oznámení administrátora, jako jsou aktualizace importu, dokončení kampaní, selhání atd.",
"settings.general.checkUpdates": "Kontrola aktualizací",
"settings.general.checkUpdatesHelp": "Pravidelně kontrolovat nová vydání aplikace a upozornit.",
"settings.general.enablePublicArchive": "Enable public mailing list archive page",
"settings.general.enablePublicArchiveHelp": "Publish campaigns on which archiving is enabled on the public website.",
"settings.general.enablePublicSubPage": "Povolit veřejnou stránku odběru",
"settings.general.enablePublicSubPageHelp": "Zobrazit veřejnou stránku odběru se všemi veřejnými seznamy pro lidi k odběru.",
"settings.general.faviconURL": "Adresa URL ikony favicon",

View file

@ -370,6 +370,8 @@
"settings.general.adminNotifEmailsHelp": "Kommagetrennte Liste von E-Mail Adressen, welche Admin Benachrichtigungen erhalten sollen. Dies können Importupdates, Fertigstellung von Kampagnen, Fehler usw. sein",
"settings.general.checkUpdates": "Suche nach Aktualisierungen",
"settings.general.checkUpdatesHelp": "Prüfe regelmäßig nach Aktualisierungen und benachrichtige mich.",
"settings.general.enablePublicArchive": "Enable public mailing list archive page",
"settings.general.enablePublicArchiveHelp": "Publish campaigns on which archiving is enabled on the public website.",
"settings.general.enablePublicSubPage": "Aktiviere eine öffentliche Abonnement Seite",
"settings.general.enablePublicSubPageHelp": "Zeige eine öffentliche Abonnement Seite mit allen öffentlichen Listen, die Personen abonnieren können.",
"settings.general.faviconURL": "Favicon URL",

View file

@ -369,6 +369,8 @@
"settings.general.adminNotifEmailsHelp": "Comma separated list of e-mail addresses to which admin notifications such as import updates, campaign completion, failure etc. should be sent.",
"settings.general.checkUpdates": "Check for updates",
"settings.general.checkUpdatesHelp": "Periodically check for new app releases and notify.",
"settings.general.enablePublicArchive": "Enable public mailing list archive",
"settings.general.enablePublicArchiveHelp": "Publish campaigns on which archiving is enabled on the public website.",
"settings.general.enablePublicSubPage": "Enable public subscription page",
"settings.general.enablePublicSubPageHelp": "Show a public subscription page with all the public lists for people to subscribe.",
"settings.general.faviconURL": "Favicon URL",

View file

@ -370,6 +370,8 @@
"settings.general.adminNotifEmailsHelp": "Lista de correos electrónicos separados por comas, a donde las notificaciones como actualizaciones de importación, campañas completadas, fallas, etc. deben ser enviadas.",
"settings.general.checkUpdates": "Revisa las actualizaciones",
"settings.general.checkUpdatesHelp": "Periódicamente buscar nuevas actualizaciones y notificarme.",
"settings.general.enablePublicArchive": "Enable public mailing list archive page",
"settings.general.enablePublicArchiveHelp": "Publish campaigns on which archiving is enabled on the public website.",
"settings.general.enablePublicSubPage": "Habilitar pagina publica de subscripción",
"settings.general.enablePublicSubPageHelp": "Muestra una página con todas las listas públicas para subscribirse.",
"settings.general.faviconURL": "URL del Favicon",

View file

@ -370,6 +370,8 @@
"settings.general.adminNotifEmailsHelp": "Comma separated list of e-mail addresses to which admin notifications such as import updates, campaign completion, failure etc. should be sent.",
"settings.general.checkUpdates": "Check for updates",
"settings.general.checkUpdatesHelp": "Periodically check for new app releases and notify.",
"settings.general.enablePublicArchive": "Enable public mailing list archive page",
"settings.general.enablePublicArchiveHelp": "Publish campaigns on which archiving is enabled on the public website.",
"settings.general.enablePublicSubPage": "Enable public subscription page",
"settings.general.enablePublicSubPageHelp": "Show a public subscription page with all the public lists for people to subscribe.",
"settings.general.faviconURL": "Favicon URL",

View file

@ -370,6 +370,8 @@
"settings.general.adminNotifEmailsHelp": "Liste d'adresses e-mail (séparées par des virgules) auxquelles les notifications d'admin telles que les mises à jour d'importation, fins de campagnes, échecs, etc. seront envoyées.",
"settings.general.checkUpdates": "Vérifier les mises à jour",
"settings.general.checkUpdatesHelp": "Vérifier régulièrement si de nouvelles applications sont disponibles et notifier-les.",
"settings.general.enablePublicArchive": "Enable public mailing list archive page",
"settings.general.enablePublicArchiveHelp": "Publish campaigns on which archiving is enabled on the public website.",
"settings.general.enablePublicSubPage": "Activer la page d'abonnement publique",
"settings.general.enablePublicSubPageHelp": "Afficher une page d'abonnement publique avec toutes les listes publiques auxquelles les personnes peuvent s'abonner.",
"settings.general.faviconURL": "URL du favicon",

View file

@ -370,6 +370,8 @@
"settings.general.adminNotifEmailsHelp": "Azon e-mail címek vesszővel elválasztott listája, amelyekre az adminisztrátori értesítéseket kell küldeni, például az importálási frissítésekről, a kampány befejezéséről, a sikertelenségről stb.",
"settings.general.checkUpdates": "Frissítések keresése ",
"settings.general.checkUpdatesHelp": "Rendszeresen ellenőrizze az új alkalmazáskiadásokat, és értesítéseket.",
"settings.general.enablePublicArchive": "Enable public mailing list archive page",
"settings.general.enablePublicArchiveHelp": "Publish campaigns on which archiving is enabled on the public website.",
"settings.general.enablePublicSubPage": "Nyilvános feliratkozási oldal engedélyezése ",
"settings.general.enablePublicSubPageHelp": "Nyilvános feliratkozási oldal megjelenítése az összes nyilvános listával a feliratkozáshoz.",
"settings.general.faviconURL": "Favicon URL",

View file

@ -370,6 +370,8 @@
"settings.general.adminNotifEmailsHelp": "Lista indirizzi mail separati da virgole ai quali saranno inviate notifiche di amministrazione come gli aggiornamenti di importazione, la fine della campagna, eventuali problemi ecc.",
"settings.general.checkUpdates": "Controlla le attualizazioni.",
"settings.general.checkUpdatesHelp": "Rutinariamente controllare se ci sono nuove versioni dell'app e notificami.",
"settings.general.enablePublicArchive": "Enable public mailing list archive page",
"settings.general.enablePublicArchiveHelp": "Publish campaigns on which archiving is enabled on the public website.",
"settings.general.enablePublicSubPage": "Attiva la pagina di iscrizione pubblica",
"settings.general.enablePublicSubPageHelp": "Visualizza una pagina di iscrizione pubblica con tutte le liste pubbliche a cui è possibile iscriversi.",
"settings.general.faviconURL": "URL della favicon",

View file

@ -370,6 +370,8 @@
"settings.general.adminNotifEmailsHelp": "インポートの更新、キャンペーンの完了、失敗など管理者通知を送信するメールアドレスのカンマ区切りリスト",
"settings.general.checkUpdates": "アップデートの確認",
"settings.general.checkUpdatesHelp": "定期的に新しいアプリのリリースを確認し、通知する。",
"settings.general.enablePublicArchive": "Enable public mailing list archive page",
"settings.general.enablePublicArchiveHelp": "Publish campaigns on which archiving is enabled on the public website.",
"settings.general.enablePublicSubPage": "公開サブスクリプションページを有効にする。",
"settings.general.enablePublicSubPageHelp": "全ての公開リストを含む公開サブスクリプションページを表示し人々が加入できるようにする。",
"settings.general.faviconURL": "ファビコンURL",

View file

@ -370,6 +370,8 @@
"settings.general.adminNotifEmailsHelp": "ഇംപോർട്ട് ചെയ്തതിലുള്ള വിവരങ്ങൾ, ക്യാമ്പേയ്ൻ പൂർത്തീകരണം, പ്രശ്നങ്ങൾ എന്നിങ്ങനെയുള്ള പ്രധാനപ്പെട്ട കാര്യനിര്‍വ്വാഹകർക്കുള്ള അറിയിപ്പിനായുള്ള കോമാ ഉപയോഗിച്ച് വേർതിരിച്ച ഇ-മെയിൽ വിലാസങ്ങൾ.",
"settings.general.checkUpdates": "Check for updates",
"settings.general.checkUpdatesHelp": "Periodically check for new app releases and notify.",
"settings.general.enablePublicArchive": "Enable public mailing list archive page",
"settings.general.enablePublicArchiveHelp": "Publish campaigns on which archiving is enabled on the public website.",
"settings.general.enablePublicSubPage": "Enable public subscription page",
"settings.general.enablePublicSubPageHelp": "Show a public subscription page with all the public lists for people to subscribe.",
"settings.general.faviconURL": "ഫാവ് ഐക്കൺ യൂ. ആർ. എൽ",

View file

@ -370,6 +370,8 @@
"settings.general.adminNotifEmailsHelp": "Kommagescheiden lijst van e-mailadressen waar admin notificaties zoals importeerupdates, campagne voltooiing, fouten enz. naar moeten worden verzonden.",
"settings.general.checkUpdates": "Controleer op updates",
"settings.general.checkUpdatesHelp": "Controleer regelmatig voor nieuwe app releases en verwittig.",
"settings.general.enablePublicArchive": "Enable public mailing list archive page",
"settings.general.enablePublicArchiveHelp": "Publish campaigns on which archiving is enabled on the public website.",
"settings.general.enablePublicSubPage": "Publieke inschrijvingspagina inschakelen.",
"settings.general.enablePublicSubPageHelp": "Laat een publieke inschrijvingspagina zien met alle publieke lijsten waarmee mensen zich kunnen inschrijven.",
"settings.general.faviconURL": "Favicon URL",

View file

@ -370,6 +370,8 @@
"settings.general.adminNotifEmailsHelp": "Lista maili oddzielona przecinkami do adminów, którym przesyłać informacje o importach, zakończonych kampaniach, błędach itd. ",
"settings.general.checkUpdates": "Sprawdź czy są aktualizacje",
"settings.general.checkUpdatesHelp": "Regularnie sprawdzaj czy są aktualizacje i powiadamiaj o tym.",
"settings.general.enablePublicArchive": "Enable public mailing list archive page",
"settings.general.enablePublicArchiveHelp": "Publish campaigns on which archiving is enabled on the public website.",
"settings.general.enablePublicSubPage": "Włącz publiczną stronę subskrypcji",
"settings.general.enablePublicSubPageHelp": "Pokaż publiczną stronę do zapisu na subskrypcje publicznych list.",
"settings.general.faviconURL": "URL Favicony",

View file

@ -370,6 +370,8 @@
"settings.general.adminNotifEmailsHelp": "Lista de e-mails separados por vírgula para os quais as notificações de administração, como atualizações de importação, conclusão da campanha, falha, etc. devem ser enviadas.",
"settings.general.checkUpdates": "Verificar atualizações",
"settings.general.checkUpdatesHelp": "Checar periodicamente por notificações e atualizações do app.",
"settings.general.enablePublicArchive": "Enable public mailing list archive page",
"settings.general.enablePublicArchiveHelp": "Publish campaigns on which archiving is enabled on the public website.",
"settings.general.enablePublicSubPage": "Habilitar a página pública de inscrição",
"settings.general.enablePublicSubPageHelp": "Habilitar a página pública de inscrição com todas as listas públicas para as pessoas se inscreverem.",
"settings.general.faviconURL": "URL do Favicon",

View file

@ -370,6 +370,8 @@
"settings.general.adminNotifEmailsHelp": "Lista separada por vírgulas dos endereços de email para os quais devem ser enviadas notificações de administração como updates importantes, conclusão de campanhas, falhas, etc.",
"settings.general.checkUpdates": "Check for updates",
"settings.general.checkUpdatesHelp": "Periodically check for new app releases and notify.",
"settings.general.enablePublicArchive": "Enable public mailing list archive page",
"settings.general.enablePublicArchiveHelp": "Publish campaigns on which archiving is enabled on the public website.",
"settings.general.enablePublicSubPage": "Ativar página de subscrição pública",
"settings.general.enablePublicSubPageHelp": "Mostrar uma página de subscrição pública com todas as listas públicas para as pessoas se subscreverem.",
"settings.general.faviconURL": "URL do Favicon",

View file

@ -370,6 +370,8 @@
"settings.general.adminNotifEmailsHelp": "Lista separată prin virgulă a adreselor de e-mail către care ar trebui trimise notificări de administrator, cum ar fi actualizări de import, finalizarea campaniei, eșec etc.",
"settings.general.checkUpdates": "Verifică actualizări",
"settings.general.checkUpdatesHelp": "Verifică periodic lansările de aplicații noi și notifică.",
"settings.general.enablePublicArchive": "Enable public mailing list archive page",
"settings.general.enablePublicArchiveHelp": "Publish campaigns on which archiving is enabled on the public website.",
"settings.general.enablePublicSubPage": "Activează pagina de abonament public",
"settings.general.enablePublicSubPageHelp": "Afișează o pagină de abonament publică cu toate listele publice pentru ca oamenii să se aboneze.",
"settings.general.faviconURL": "URL favicon",

View file

@ -370,6 +370,8 @@
"settings.general.adminNotifEmailsHelp": "Список адресов электронной почты, разделенных запятыми, на которые следует отправлять уведомления администратора, такие как обновления импорта, завершение кампании, сбой и т.д. ",
"settings.general.checkUpdates": "Проверьте наличие обновлений",
"settings.general.checkUpdatesHelp": "Периодически проверяйте новые выпуски приложений и уведомляйте об этом.",
"settings.general.enablePublicArchive": "Enable public mailing list archive page",
"settings.general.enablePublicArchiveHelp": "Publish campaigns on which archiving is enabled on the public website.",
"settings.general.enablePublicSubPage": "Включить публичную страницу подписки",
"settings.general.enablePublicSubPageHelp": "Показать страницу общедоступной подписки со всеми общедоступными списками, на которые можно подписаться.",
"settings.general.faviconURL": "URL-адрес фавикона",

View file

@ -370,6 +370,8 @@
"settings.general.adminNotifEmailsHelp": "İçe aktarma güncellemeleri, kampanya tamamlama, başarısızlık gibi yönetici bildirimlerinin gönderilmesi gereken e-posta adreslerinin virgülle ayrılmış listesi.",
"settings.general.checkUpdates": "Check for updates",
"settings.general.checkUpdatesHelp": "Periodically check for new app releases and notify.",
"settings.general.enablePublicArchive": "Enable public mailing list archive page",
"settings.general.enablePublicArchiveHelp": "Publish campaigns on which archiving is enabled on the public website.",
"settings.general.enablePublicSubPage": "Erişime açık üyelik sayfasını etkinleştir",
"settings.general.enablePublicSubPageHelp": "Kişilerin abone olması için tüm genel listeleri içeren genel bir abonelik sayfası gösterin.",
"settings.general.faviconURL": "Favicon URL",

View file

@ -370,6 +370,8 @@
"settings.general.adminNotifEmailsHelp": "Danh sách địa chỉ e-mail được phân tách bằng dấu phẩy mà các thông báo của quản trị viên như cập nhật nhập, hoàn thành chiến dịch, thất bại, v.v. sẽ được gửi đến.",
"settings.general.checkUpdates": "Kiểm tra cập nhật",
"settings.general.checkUpdatesHelp": "Kiểm tra định kỳ các bản phát hành ứng dụng mới và thông báo.",
"settings.general.enablePublicArchive": "Enable public mailing list archive page",
"settings.general.enablePublicArchiveHelp": "Publish campaigns on which archiving is enabled on the public website.",
"settings.general.enablePublicSubPage": "Bật trang đăng ký công khai",
"settings.general.enablePublicSubPageHelp": "Hiển thị trang đăng ký công khai với tất cả danh sách công khai để mọi người đăng ký.",
"settings.general.faviconURL": "Favicon URL",

View file

@ -370,6 +370,8 @@
"settings.general.adminNotifEmailsHelp": "应向其发送管理通知(例如导入更新、活动完成、失败等)的电子邮件地址的逗号分隔列表。",
"settings.general.checkUpdates": "检查更新",
"settings.general.checkUpdatesHelp": "定期检查新的应用程序版本并通知。",
"settings.general.enablePublicArchive": "Enable public mailing list archive page",
"settings.general.enablePublicArchiveHelp": "Publish campaigns on which archiving is enabled on the public website.",
"settings.general.enablePublicSubPage": "启用公共订阅页面",
"settings.general.enablePublicSubPageHelp": "显示一个公共订阅页面,其中包含供人们订阅的所有公共列表。",
"settings.general.faviconURL": "网站图标网址",

View file

@ -370,6 +370,8 @@
"settings.general.adminNotifEmailsHelp": "應向其發送管理通知(例如導入更新、活動完成、失敗等)的電子郵件地址的逗號分隔列表。",
"settings.general.checkUpdates": "檢查更新",
"settings.general.checkUpdatesHelp": "定期檢查新的應用程序版本並通知。",
"settings.general.enablePublicArchive": "Enable public mailing list archive page",
"settings.general.enablePublicArchiveHelp": "Publish campaigns on which archiving is enabled on the public website.",
"settings.general.enablePublicSubPage": "啟用公共訂閱頁面",
"settings.general.enablePublicSubPageHelp": "顯示一個公共訂閱頁面,其中包含供人們訂閱的所有公共列表。",
"settings.general.faviconURL": "網站圖標網址",

View file

@ -30,6 +30,7 @@ func V2_3_0(db *sqlx.DB, fs stuffbin.FileSystem, ko *koanf.Koanf) error {
if _, err := db.Exec(`
INSERT INTO settings (key, value) VALUES
('app.site_name', '"Mailing list"'),
('app.enable_public_archive', 'true'),
('privacy.allow_preferences', 'false')
ON CONFLICT DO NOTHING;
`); err != nil {

View file

@ -9,6 +9,7 @@ type Settings struct {
AppFromEmail string `json:"app.from_email"`
AppNotifyEmails []string `json:"app.notify_emails"`
EnablePublicSubPage bool `json:"app.enable_public_subscription_page"`
EnablePublicArchive bool `json:"app.enable_public_archive"`
SendOptinConfirmation bool `json:"app.send_optin_confirmation"`
CheckUpdates bool `json:"app.check_updates"`
AppLang string `json:"app.lang"`

View file

@ -194,6 +194,7 @@ INSERT INTO settings (key, value) VALUES
('app.message_sliding_window', 'false'),
('app.message_sliding_window_duration', '"1h"'),
('app.message_sliding_window_rate', '10000'),
('app.enable_public_archive', 'true'),
('app.enable_public_subscription_page', 'true'),
('app.send_optin_confirmation', 'true'),
('app.check_updates', 'true'),

View file

@ -8,7 +8,7 @@
{{ if .EnablePublicSubPage }}
<a href="{{ .RootURL }}/subscription/form">{{ L.T "public.sub" }}</a>
{{ end }}
{{ if .EnablePublicSubPage }}
{{ if .EnablePublicArchive }}
<a href="{{ .RootURL }}/archive">{{ L.T "public.archiveTitle" }}</a>
{{ end }}
</div>

View file

@ -7,7 +7,10 @@
<meta name="description" content="{{ .Data.Description }}" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<link rel="alternate" type="application/rss+xml" title="{{ L.T "public.archiveTitle" }} - {{ .SiteName }}" href="{{ .RootURL }}/archive.xml" />
{{ if .EnablePublicArchive }}
<link rel="alternate" type="application/rss+xml" title="{{ L.T "public.archiveTitle" }} - {{ .SiteName }}"
href="{{ .RootURL }}/archive.xml" />
{{ end }}
<link href="/public/static/style.css" rel="stylesheet" type="text/css" />
<link href="/public/custom.css" rel="stylesheet" type="text/css">

View file

@ -30,9 +30,12 @@
</ul>
<p>
<button type="submit" class="button">{{ L.T "public.sub" }}</button>
{{ if .EnablePublicArchive }}
<p class="right">
<a href="{{ .RootURL }}/archive">{{ L.T "public.archiveTitle" }}</a>
</p>
{{ end }}
</p>
</div>
</form>