From 82d50af72179df95698ebb00b060eeac4ac131ce Mon Sep 17 00:00:00 2001 From: Xinyu Zhou Date: Fri, 25 Nov 2022 00:02:42 +0800 Subject: [PATCH] Fix button in branch list, avoid unexpected page jump before restore branch actually done (#21562) (#21927) Backport #21562 Signed-off-by: Xinyu Zhou Co-authored-by: Lunny Xiao Co-authored-by: Lauris BH --- templates/repo/branch/list.tmpl | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl index 4ae58ad3192..391ea43d383 100644 --- a/templates/repo/branch/list.tmpl +++ b/templates/repo/branch/list.tmpl @@ -22,18 +22,18 @@ {{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted)}} -
+
+ {{end}} {{if not $.DisableDownloadSourceArchives}} - + {{end}} @@ -108,26 +108,30 @@ {{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted)}} -
+
+ {{end}} {{if and (not .IsDeleted) (not $.DisableDownloadSourceArchives)}} - + {{end}} {{if and $.IsWriter (not $.IsMirror) (not $.Repository.IsArchived) (not .IsProtected)}} {{if .IsDeleted}} - {{svg "octicon-reply"}} + {{else}} - + {{end}} {{end}}