summaryrefslogtreecommitdiffstats
path: root/templates/repo/header.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/repo/header.tmpl')
-rw-r--r--templates/repo/header.tmpl4
1 files changed, 3 insertions, 1 deletions
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl
index 2d963d67c8..cfac37cd11 100644
--- a/templates/repo/header.tmpl
+++ b/templates/repo/header.tmpl
@@ -37,7 +37,9 @@
{{end}}
</div>
</div>
- {{if .IsMirror}}<div class="fork-flag">{{$.i18n.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener noreferrer" href="{{if .SanitizedOriginalURL}}{{.SanitizedOriginalURL}}{{else}}{{(MirrorRemoteAddress $.Context $.Mirror).Address}}{{end}}">{{if .SanitizedOriginalURL}}{{.SanitizedOriginalURL}}{{else}}{{(MirrorRemoteAddress $.Context $.Mirror).Address}}{{end}}</a></div>{{end}}
+ {{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 .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>