summaryrefslogtreecommitdiffstats
path: root/templates/user
diff options
context:
space:
mode:
authorAntoine GIRARD <sapk@users.noreply.github.com>2017-04-28 02:44:58 +0200
committerLunny Xiao <xiaolunwen@gmail.com>2017-04-28 08:44:58 +0800
commit431b26f6d7d5b2d4700b4a65f1a81094c36a9fae (patch)
treee3d78f5e65da0531d506934892b94dd12f54f41f /templates/user
parent6853bf323aeb32c87e52dc0fdcf41396b7b8d98d (diff)
downloadgitea-431b26f6d7d5b2d4700b4a65f1a81094c36a9fae.tar.gz
gitea-431b26f6d7d5b2d4700b4a65f1a81094c36a9fae.zip
Handle display of GPG key without end date (#1628)
Diffstat (limited to 'templates/user')
-rw-r--r--templates/user/settings/keys_gpg.tmpl4
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/user/settings/keys_gpg.tmpl b/templates/user/settings/keys_gpg.tmpl
index b0c3e1bda7..a20bc8e140 100644
--- a/templates/user/settings/keys_gpg.tmpl
+++ b/templates/user/settings/keys_gpg.tmpl
@@ -16,7 +16,7 @@
{{$.i18n.Tr "settings.delete_key"}}
</button>
</div>
- <i class="mega-octicon octicon-key {{if .Expired.After $.PageStartTime}}green{{end}}"></i>
+ <i class="mega-octicon octicon-key {{if or .Expired.IsZero (.Expired.After $.PageStartTime)}}green{{end}}"></i>
<div class="content">
{{range .Emails}}<strong>{{.Email}} </strong>{{end}}
<div class="print meta">
@@ -26,7 +26,7 @@
<div class="activity meta">
<i>{{$.i18n.Tr "settings.add_on"}} <span>{{DateFmtShort .Added}}</span></i>
-
- <i>{{$.i18n.Tr "settings.valid_until"}} <span>{{DateFmtShort .Expired}}</span></i>
+ <i>{{$.i18n.Tr "settings.valid_until"}} <span>{{if not .Expired.IsZero }}{{DateFmtShort .Expired}}{{else}}{{$.i18n.Tr "settings.never"}}{{end}}</span></i>
</div>
</div>
</div>