1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-04 14:46:57 -05:00

Handle display of GPG key without end date (#1628)

This commit is contained in:
Antoine GIRARD 2017-04-28 02:44:58 +02:00 committed by Lunny Xiao
parent 6853bf323a
commit 431b26f6d7
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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>