mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Fix disable download button (#20701)
This commit is contained in:
		@@ -224,7 +224,7 @@ func (ctx *Context) HTML(status int, name base.TplName) {
 | 
			
		||||
	ctx.Data["TemplateLoadTimes"] = func() string {
 | 
			
		||||
		return strconv.FormatInt(time.Since(tmplStartTime).Nanoseconds()/1e6, 10) + "ms"
 | 
			
		||||
	}
 | 
			
		||||
	if err := ctx.Render.HTML(ctx.Resp, status, string(name), ctx.Data); err != nil {
 | 
			
		||||
	if err := ctx.Render.HTML(ctx.Resp, status, string(name), templates.BaseVars().Merge(ctx.Data)); err != nil {
 | 
			
		||||
		if status == http.StatusInternalServerError && name == base.TplName("status/500") {
 | 
			
		||||
			ctx.PlainText(http.StatusInternalServerError, "Unable to find status/500 template")
 | 
			
		||||
			return
 | 
			
		||||
 
 | 
			
		||||
@@ -112,7 +112,7 @@
 | 
			
		||||
												{{svg "octicon-git-branch"}}
 | 
			
		||||
											</div>
 | 
			
		||||
										{{end}}
 | 
			
		||||
										{{if (not .IsDeleted)}}
 | 
			
		||||
										{{if and (not .IsDeleted) (not $.DisableDownloadSourceArchives)}}
 | 
			
		||||
											<div class="ui basic jump dropdown icon button tooltip" data-content="{{$.locale.Tr "repo.branch.download" (.Name)}}" data-position="top right">
 | 
			
		||||
												{{svg "octicon-download"}}
 | 
			
		||||
												<div class="menu">
 | 
			
		||||
 
 | 
			
		||||
@@ -120,7 +120,7 @@
 | 
			
		||||
					<div class="ui action tiny input" id="clone-panel">
 | 
			
		||||
					{{template "repo/clone_buttons" .}}
 | 
			
		||||
					{{template "repo/clone_script" .}}
 | 
			
		||||
					{{if not .DisableDownloadSourceArchives}}
 | 
			
		||||
					{{if not $.DisableDownloadSourceArchives}}
 | 
			
		||||
						<button id="download-btn" class="ui basic small compact jump dropdown icon button tooltip" data-content="{{.locale.Tr "repo.download_archive"}}" data-position="top right">
 | 
			
		||||
							{{svg "octicon-download"}}
 | 
			
		||||
							<div class="menu">
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user