aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authora1012112796 <1012112796@qq.com>2025-05-20 23:14:18 +0800
committerGitHub <noreply@github.com>2025-05-20 11:14:18 -0400
commit28dec9a27d4c00716d6b8394e9a70b92072b891b (patch)
treea386032c20fdb7842b760d74151c614dc87aa41b
parent0534eddd16a604fabfec464e36458e540244382d (diff)
downloadgitea-28dec9a27d4c00716d6b8394e9a70b92072b891b.tar.gz
gitea-28dec9a27d4c00716d6b8394e9a70b92072b891b.zip
ui: add a default tab on repo header when migrating (#34503)
Signed-off-by: a1012112796 <1012112796@qq.com>
-rw-r--r--options/locale/locale_en-US.ini1
-rw-r--r--templates/repo/header.tmpl10
2 files changed, 10 insertions, 1 deletions
diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini
index b6411f7777..4384ebc3d7 100644
--- a/options/locale/locale_en-US.ini
+++ b/options/locale/locale_en-US.ini
@@ -1228,6 +1228,7 @@ migrate.migrating_issues = Migrating Issues
migrate.migrating_pulls = Migrating Pull Requests
migrate.cancel_migrating_title = Cancel Migration
migrate.cancel_migrating_confirm = Do you want to cancel this migration?
+migrating_status = Migrating status
mirror_from = mirror of
forked_from = forked from
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl
index 929f41b93f..2fbb6ba428 100644
--- a/templates/repo/header.tmpl
+++ b/templates/repo/header.tmpl
@@ -226,11 +226,19 @@
</a>
{{end}}
</div>
- {{else if .Permission.IsAdmin}}
+ {{else}}
<div class="overflow-menu-items">
+ {{if(and .Repository.IsBeingCreated (.Permission.CanRead ctx.Consts.RepoUnitTypeCode))}}
+ <a class="{{if not .PageIsRepoSettings}}active {{end}}item" href="{{.RepoLink}}">
+ {{svg "octicon-clock"}} {{ctx.Locale.Tr "repo.migrating_status"}}
+ </a>
+ {{end}}
+
+ {{if .Permission.IsAdmin}}
<a class="{{if .PageIsRepoSettings}}active {{end}} item" href="{{.RepoLink}}/settings">
{{svg "octicon-tools"}} {{ctx.Locale.Tr "repo.settings"}}
</a>
+ {{end}}
</div>
{{end}}
</overflow-menu>