aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-06-14 00:12:59 +0800
committerGitHub <noreply@github.com>2022-06-13 18:12:59 +0200
commitff82a1831521bb2a9d91884eb2bc426a6403b0ed (patch)
tree9d2ec888cd66a5ff4b988eb4cb5760b60c8996e3 /templates/repo
parent3c6c1507403b659a9ed790df19311a9f83175364 (diff)
downloadgitea-ff82a1831521bb2a9d91884eb2bc426a6403b0ed.tar.gz
gitea-ff82a1831521bb2a9d91884eb2bc426a6403b0ed.zip
Fix mirror template bug (#19959)
* Fix mirror template bug Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: delvh <dev.lh@web.de>
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/header.tmpl7
1 files changed, 4 insertions, 3 deletions
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl
index cfac37cd11..029e9a186f 100644
--- a/templates/repo/header.tmpl
+++ b/templates/repo/header.tmpl
@@ -37,9 +37,10 @@
{{end}}
</div>
</div>
- {{if .IsMirror}}
- {{$address := MirrorRemoteAddress $.Context . $.Mirror.GetRemoteName}}
- <div class="fork-flag">{{$.i18n.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener noreferrer" href="{{$address.Address}}">{{$address.Address}}</a></div>{{end}}
+ {{if $.IsPullMirror}}
+ {{$address := MirrorRemoteAddress $.Context . $.Mirror.GetRemoteName}}
+ <div class="fork-flag">{{$.i18n.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener noreferrer" href="{{$address.Address}}">{{$address.Address}}</a></div>
+ {{end}}
{{if .IsFork}}<div class="fork-flag">{{$.i18n.Tr "repo.forked_from"}} <a href="{{.BaseRepo.Link}}">{{.BaseRepo.FullName}}</a></div>{{end}}
{{if .IsGenerated}}<div class="fork-flag">{{$.i18n.Tr "repo.generated_from"}} <a href="{{.TemplateRepo.Link}}">{{.TemplateRepo.FullName}}</a></div>{{end}}
</div>