Fix the missing repo count in new team page and edit team page (#27743)
Follow #26942 Before:   After:  
This commit is contained in:
		
					parent
					
						
							
								572f0963ed
							
						
					
				
			
			
				commit
				
					
						e544a277fe
					
				
			
		
					 1 changed files with 8 additions and 0 deletions
				
			
		| 
						 | 
					@ -276,6 +276,10 @@ func NewTeam(ctx *context.Context) {
 | 
				
			||||||
	ctx.Data["PageIsOrgTeamsNew"] = true
 | 
						ctx.Data["PageIsOrgTeamsNew"] = true
 | 
				
			||||||
	ctx.Data["Team"] = &org_model.Team{}
 | 
						ctx.Data["Team"] = &org_model.Team{}
 | 
				
			||||||
	ctx.Data["Units"] = unit_model.Units
 | 
						ctx.Data["Units"] = unit_model.Units
 | 
				
			||||||
 | 
						if err := shared_user.LoadHeaderCount(ctx); err != nil {
 | 
				
			||||||
 | 
							ctx.ServerError("LoadHeaderCount", err)
 | 
				
			||||||
 | 
							return
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	ctx.HTML(http.StatusOK, tplTeamNew)
 | 
						ctx.HTML(http.StatusOK, tplTeamNew)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -463,6 +467,10 @@ func EditTeam(ctx *context.Context) {
 | 
				
			||||||
		ctx.ServerError("LoadUnits", err)
 | 
							ctx.ServerError("LoadUnits", err)
 | 
				
			||||||
		return
 | 
							return
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						if err := shared_user.LoadHeaderCount(ctx); err != nil {
 | 
				
			||||||
 | 
							ctx.ServerError("LoadHeaderCount", err)
 | 
				
			||||||
 | 
							return
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	ctx.Data["Team"] = ctx.Org.Team
 | 
						ctx.Data["Team"] = ctx.Org.Team
 | 
				
			||||||
	ctx.Data["Units"] = unit_model.Units
 | 
						ctx.Data["Units"] = unit_model.Units
 | 
				
			||||||
	ctx.HTML(http.StatusOK, tplTeamNew)
 | 
						ctx.HTML(http.StatusOK, tplTeamNew)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue