1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

#13091 - add new mirror button (#13105)

* added button

* got URL params to carry through to service specific migrate pages

* do not display add mirror button if mirroring turned off

* added corrections by reviewers

* Add silverwind's suggestion

Co-authored-by: silverwind <me@silverwind.io>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
Divyam Bhasin
2020-10-23 19:01:58 -04:00
committed by GitHub
parent d2ad4dec63
commit 9b11c3e320
4 changed files with 10 additions and 2 deletions

View File

@@ -28,6 +28,9 @@ func Migrate(ctx *context.Context) {
ctx.Data["Services"] = append([]structs.GitServiceType{structs.PlainGitService}, structs.SupportedFullGitService...)
serviceType := ctx.QueryInt("service_type")
if serviceType == 0 {
ctx.Data["Org"] = ctx.Query("org")
ctx.Data["Mirror"] = ctx.Query("mirror")
ctx.HTML(200, tplMigrate)
return
}