mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	@@ -101,6 +101,12 @@ func ListPackages(ctx *context.Context) {
 | 
			
		||||
	ctx.Data["Total"] = total
 | 
			
		||||
	ctx.Data["RepositoryAccessMap"] = repositoryAccessMap
 | 
			
		||||
 | 
			
		||||
	err = shared_user.LoadHeaderCount(ctx)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		ctx.ServerError("LoadHeaderCount", err)
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// TODO: context/org -> HandleOrgAssignment() can not be used
 | 
			
		||||
	if ctx.ContextUser.IsOrganization() {
 | 
			
		||||
		org := org_model.OrgFromUser(ctx.ContextUser)
 | 
			
		||||
@@ -255,6 +261,12 @@ func ViewPackageVersion(ctx *context.Context) {
 | 
			
		||||
	}
 | 
			
		||||
	ctx.Data["HasRepositoryAccess"] = hasRepositoryAccess
 | 
			
		||||
 | 
			
		||||
	err = shared_user.LoadHeaderCount(ctx)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		ctx.ServerError("LoadHeaderCount", err)
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	ctx.HTML(http.StatusOK, tplPackagesView)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -346,6 +358,12 @@ func ListPackageVersions(ctx *context.Context) {
 | 
			
		||||
 | 
			
		||||
	ctx.Data["Total"] = total
 | 
			
		||||
 | 
			
		||||
	err = shared_user.LoadHeaderCount(ctx)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		ctx.ServerError("LoadHeaderCount", err)
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	pager := context.NewPagination(int(total), setting.UI.PackagesPagingNum, page, 5)
 | 
			
		||||
	for k, v := range pagerParams {
 | 
			
		||||
		pager.AddParamString(k, v)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user