From 431b26f6d7d5b2d4700b4a65f1a81094c36a9fae Mon Sep 17 00:00:00 2001 From: Antoine GIRARD Date: Fri, 28 Apr 2017 02:44:58 +0200 Subject: [PATCH] Handle display of GPG key without end date (#1628) --- options/locale/locale_en-US.ini | 1 + templates/user/settings/keys_gpg.tmpl | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 160f8e7ab10..f1f6925bb58 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -377,6 +377,7 @@ ssh_key_deletion_success = SSH key has been deleted successfully! gpg_key_deletion_success = GPG key has been deleted successfully! add_on = Added on valid_until = Valid until +never = never last_used = Last used on no_activity = No recent activity key_state_desc = This key is used in last 7 days diff --git a/templates/user/settings/keys_gpg.tmpl b/templates/user/settings/keys_gpg.tmpl index b0c3e1bda71..a20bc8e140e 100644 --- a/templates/user/settings/keys_gpg.tmpl +++ b/templates/user/settings/keys_gpg.tmpl @@ -16,7 +16,7 @@ {{$.i18n.Tr "settings.delete_key"}} - +
{{range .Emails}}{{.Email}} {{end}}
@@ -26,7 +26,7 @@
{{$.i18n.Tr "settings.add_on"}} {{DateFmtShort .Added}} - - {{$.i18n.Tr "settings.valid_until"}} {{DateFmtShort .Expired}} + {{$.i18n.Tr "settings.valid_until"}} {{if not .Expired.IsZero }}{{DateFmtShort .Expired}}{{else}}{{$.i18n.Tr "settings.never"}}{{end}}