diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-10-01 21:40:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-01 21:40:17 +0800 |
commit | 7ff783b7320bdeda89ed6a021c304e64f9d9170e (patch) | |
tree | aba54e41a83ec4064f0d5d09024e94c4ce4030d1 /templates | |
parent | 177aedfca9bf4a15dd154a1f1ac136e9ba3e0f24 (diff) | |
download | gitea-7ff783b7320bdeda89ed6a021c304e64f9d9170e.tar.gz gitea-7ff783b7320bdeda89ed6a021c304e64f9d9170e.zip |
Move mirror to a standalone package from models (#7486)
* move mirror to a standalone package
* fix mirror address in template
* fix tests
* fix lint
* fix comment
* fix tests
* fix tests
* fix vendor
* fix fmt
* fix lint
* remove wrong file submitted
* fix conflict
* remove unrelated changes
* fix go mod
* fix tests
* clean go mod
* make vendor work
* make vendor work
* fix tests
* remove duplicated test
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/header.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/settings/options.tmpl | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index e657042b62..fc7f1b660c 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -13,7 +13,7 @@ <a href="{{$.RepoLink}}">{{.Name}}</a> {{if and .RelAvatarLink .IsPrivate}}<i class="mega-octicon octicon-lock"></i>{{end}} {{if .IsArchived}}<i class="archive icon archived-icon"></i>{{end}} - {{if .IsMirror}}<div class="fork-flag">{{$.i18n.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener noreferrer" href="{{$.Mirror.Address}}">{{$.Mirror.Address}}</a></div>{{end}} + {{if .IsMirror}}<div class="fork-flag">{{$.i18n.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener noreferrer" href="{{MirrorAddress $.Mirror}}">{{MirrorAddress $.Mirror}}</a></div>{{end}} {{if .IsFork}}<div class="fork-flag">{{$.i18n.Tr "repo.forked_from"}} <a href="{{.BaseRepo.Link}}">{{SubStr .BaseRepo.RelLink 1 -1}}</a></div>{{end}} </div> <div class="repo-buttons"> diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index 87e23b6937..4f7d32479e 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -80,7 +80,7 @@ </div> <div class="field {{if .Err_MirrorAddress}}error{{end}}"> <label for="mirror_address">{{.i18n.Tr "repo.mirror_address"}}</label> - <input id="mirror_address" name="mirror_address" value="{{.Mirror.AddressNoCredentials}}" required> + <input id="mirror_address" name="mirror_address" value="{{MirrorFullAddress .Mirror}}" required> <p class="help">{{.i18n.Tr "repo.mirror_address_desc"}}</p> </div> <div class="ui accordion optional field"> |