diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2017-12-11 12:37:04 +0800 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2017-12-11 06:37:04 +0200 |
commit | f2e20c81b66e6a937ecdb686f8d1011371433365 (patch) | |
tree | 490e5af82aefdd25de5d90225b083ecb3ed11e5f /templates/repo/activity.tmpl | |
parent | c082c3bce35d6d5d829a1e516b9bbf45b6d49bdc (diff) | |
download | gitea-f2e20c81b66e6a937ecdb686f8d1011371433365.tar.gz gitea-f2e20c81b66e6a937ecdb686f8d1011371433365.zip |
Refactor struct's time to remove unnecessary memory usage (#3142)
* refactor struct's time to remove unnecessary memory usage
* use AsTimePtr simple code
* fix tests
* fix time compare
* fix template on gpg
* use AddDuration instead of Add
Diffstat (limited to 'templates/repo/activity.tmpl')
-rw-r--r-- | templates/repo/activity.tmpl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/templates/repo/activity.tmpl b/templates/repo/activity.tmpl index eb761ff492..cd528582fb 100644 --- a/templates/repo/activity.tmpl +++ b/templates/repo/activity.tmpl @@ -86,7 +86,7 @@ {{if not .IsTag}} <a class="title has-emoji" href="{{$.Repository.HTMLURL}}/src/{{.TagName}}">{{.Title}}</a> {{end}} - {{TimeSince .Created $.Lang}} + {{TimeSinceUnix .CreatedUnix $.Lang}} </p> {{end}} </div> @@ -102,7 +102,7 @@ <p class="desc"> <div class="ui purple label">{{$.i18n.Tr "repo.activity.merged_prs_label"}}</div> #{{.Index}} <a class="title has-emoji" href="{{$.Repository.HTMLURL}}/pulls/{{.Index}}">{{.Issue.Title}}</a> - {{TimeSince .Merged $.Lang}} + {{TimeSinceUnix .MergedUnix $.Lang}} </p> {{end}} </div> @@ -118,7 +118,7 @@ <p class="desc"> <div class="ui green label">{{$.i18n.Tr "repo.activity.opened_prs_label"}}</div> #{{.Index}} <a class="title has-emoji" href="{{$.Repository.HTMLURL}}/pulls/{{.Index}}">{{.Issue.Title}}</a> - {{TimeSince .Issue.Created $.Lang}} + {{TimeSinceUnix .Issue.CreatedUnix $.Lang}} </p> {{end}} </div> @@ -134,7 +134,7 @@ <p class="desc"> <div class="ui red label">{{$.i18n.Tr "repo.activity.closed_issue_label"}}</div> #{{.Index}} <a class="title has-emoji" href="{{$.Repository.HTMLURL}}/issues/{{.Index}}">{{.Title}}</a> - {{TimeSince .Updated $.Lang}} + {{TimeSinceUnix .UpdatedUnix $.Lang}} </p> {{end}} </div> @@ -150,7 +150,7 @@ <p class="desc"> <div class="ui green label">{{$.i18n.Tr "repo.activity.new_issue_label"}}</div> #{{.Index}} <a class="title has-emoji" href="{{$.Repository.HTMLURL}}/issues/{{.Index}}">{{.Title}}</a> - {{TimeSince .Created $.Lang}} + {{TimeSinceUnix .CreatedUnix $.Lang}} </p> {{end}} </div> @@ -174,7 +174,7 @@ {{else}} <a class="title has-emoji" href="{{$.Repository.HTMLURL}}/issues/{{.Index}}">{{.Title}}</a> {{end}} - {{TimeSince .Updated $.Lang}} + {{TimeSinceUnix .UpdatedUnix $.Lang}} </p> {{end}} </div> |