From c6290b680d694e2e207abdfdf161fefbbbcb2f19 Mon Sep 17 00:00:00 2001 From: Xinyu Zhou Date: Thu, 24 Nov 2022 20:29:43 +0800 Subject: [PATCH] Fix button in branch list, avoid unexpected page jump before restore branch actually done (#21562) 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 09799fbece577..3702410df504d 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}}