summaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
authorGusted <williamzijl7@hotmail.com>2022-01-25 05:48:56 +0000
committerGitHub <noreply@github.com>2022-01-25 05:48:56 +0000
commit0b83cc21be4b53de401e9c3ffca74ae3f003e55e (patch)
tree1695ceb71bb24e256c2a8993e419f96ad5ebf677 /templates/repo
parentb68e605d56ef472de597e9a7c6df406ce97028c0 (diff)
downloadgitea-0b83cc21be4b53de401e9c3ffca74ae3f003e55e.tar.gz
gitea-0b83cc21be4b53de401e9c3ffca74ae3f003e55e.zip
Fix commit's time (#18375) (#18392)
- Backport of #18375
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/commits_list.tmpl6
-rw-r--r--templates/repo/view_list.tmpl2
2 files changed, 6 insertions, 2 deletions
diff --git a/templates/repo/commits_list.tmpl b/templates/repo/commits_list.tmpl
index d43170e525..85bfe9ab4f 100644
--- a/templates/repo/commits_list.tmpl
+++ b/templates/repo/commits_list.tmpl
@@ -75,7 +75,11 @@
<pre class="commit-body" style="display: none;">{{RenderCommitBody .Message $commitRepoLink $.Repository.ComposeMetas}}</pre>
{{end}}
</td>
- <td class="text right aligned">{{TimeSince .Author.When $.Lang}}</td>
+ {{if .Committer}}
+ <td class="text right aligned">{{TimeSince .Committer.When $.Lang}}</td>
+ {{else}}
+ <td class="text right aligned">{{TimeSince .Author.When $.Lang}}</td>
+ {{end}}
</tr>
{{end}}
</tbody>
diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl
index d490220694..7c76d87875 100644
--- a/templates/repo/view_list.tmpl
+++ b/templates/repo/view_list.tmpl
@@ -34,7 +34,7 @@
</span>
{{end}}
</th>
- <th class="text grey right age">{{if .LatestCommit}}{{if .LatestCommit.Author}}{{TimeSince .LatestCommit.Author.When $.Lang}}{{end}}{{end}}</th>
+ <th class="text grey right age">{{if .LatestCommit}}{{if .LatestCommit.Committer}}{{TimeSince .LatestCommit.Committer.When $.Lang}}{{end}}{{end}}</th>
</tr>
</thead>
<tbody>