aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Sharshakov <d3dx12.xx@gmail.com>2024-01-15 17:37:14 +0300
committerGitHub <noreply@github.com>2024-01-15 14:37:14 +0000
commit2d343f8987025015f5b61e328cc9e45082e6d3f2 (patch)
tree3efffb06ab27c49d9c671c86dee425041946eae9
parent3793ec4d141c718462a273c02d147645c56c341a (diff)
downloadgitea-2d343f8987025015f5b61e328cc9e45082e6d3f2.tar.gz
gitea-2d343f8987025015f5b61e328cc9e45082e6d3f2.zip
Display latest sync time for pull mirrors on the repo page (#28712)
Fixes #25168 --------- Co-authored-by: delvh <dev.lh@web.de>
-rw-r--r--templates/repo/header.tmpl7
1 files changed, 7 insertions, 0 deletions
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl
index 9630cd3a6f..c362059ef3 100644
--- a/templates/repo/header.tmpl
+++ b/templates/repo/header.tmpl
@@ -28,6 +28,13 @@
<div class="repo-icon" data-tooltip-content="{{ctx.Locale.Tr "repo.desc.template"}}">{{svg "octicon-repo-template" 18}}</div>
{{end}}
</div>
+ {{if $.PullMirror}}
+ <div class="fork-flag">
+ {{ctx.Locale.Tr "repo.mirror_from"}}
+ <a target="_blank" rel="noopener noreferrer" href="{{$.PullMirror.RemoteAddress}}">{{$.PullMirror.RemoteAddress}}</a>
+ {{if $.PullMirror.UpdatedUnix}}{{ctx.Locale.Tr "repo.mirror_sync"}} {{TimeSinceUnix $.PullMirror.UpdatedUnix ctx.Locale}}{{end}}
+ </div>
+ {{end}}
</div>
{{if not (or .IsBeingCreated .IsBroken)}}
<div class="repo-buttons">