diff --git a/routers/org/home.go b/routers/org/home.go index 0a9f176bd..9ca025878 100644 --- a/routers/org/home.go +++ b/routers/org/home.go @@ -127,6 +127,8 @@ func Home(ctx *context.Context) { ctx.Data["Members"] = members ctx.Data["Teams"] = org.Teams + ctx.Data["DisabledMirrors"] = setting.Repository.DisableMirrors + pager := context.NewPagination(int(count), setting.UI.User.RepoPagingNum, page, 5) pager.SetDefaultParams(ctx) ctx.Data["Page"] = pager diff --git a/routers/repo/migrate.go b/routers/repo/migrate.go index 9b10970bf..d843a043a 100644 --- a/routers/repo/migrate.go +++ b/routers/repo/migrate.go @@ -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 } diff --git a/templates/org/home.tmpl b/templates/org/home.tmpl index 024be119b..fba7de3f1 100644 --- a/templates/org/home.tmpl +++ b/templates/org/home.tmpl @@ -28,6 +28,9 @@
{{if .CanCreateOrgRepo}}
+ {{if not .DisabledMirrors}} + {{.i18n.Tr "new_migrate"}} + {{end}} {{.i18n.Tr "new_repo"}}
diff --git a/templates/repo/migrate/migrate.tmpl b/templates/repo/migrate/migrate.tmpl index 1521620b0..a8b124452 100644 --- a/templates/repo/migrate/migrate.tmpl +++ b/templates/repo/migrate/migrate.tmpl @@ -5,11 +5,11 @@
{{range .Services}}
- + {{svg (Printf "gitea-%s" .Name) 184}}
- {{.Title}} + {{.Title}}
{{(Printf "repo.migrate.%s.description" .Name) | $.i18n.Tr }}