Files
gitea/templates/repo/home.tmpl
Naxdy 32152a0ac0 Also display "recently pushed branch" alert on PR view (#35001)
This commit adds the "You recently pushed to branch X" alert also to PR
overview, as opposed to only the repository's home page.

GitHub also shows this alert on the PR list, as well as the home page.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2025-07-10 17:17:56 +00:00

33 lines
1.1 KiB
Handlebars

{{template "base/head" .}}
{{$showSidebar := and (not .TreeNames) (not .HideRepoInfo) (not .IsBlame)}}
<div role="main" aria-label="{{.Title}}" class="page-content repository file list {{if .IsBlame}}blame{{end}}">
{{template "repo/header" .}}
<div class="ui container {{if or .TreeNames .IsBlame}}fluid padded{{end}}">
{{template "base/alert" .}}
{{if .Repository.IsArchived}}
<div class="ui warning message tw-text-center">
{{if .Repository.ArchivedUnix.IsZero}}
{{ctx.Locale.Tr "repo.archive.title"}}
{{else}}
{{ctx.Locale.Tr "repo.archive.title_date" (DateUtils.AbsoluteLong .Repository.ArchivedUnix)}}
{{end}}
</div>
{{end}}
{{template "repo/code/recently_pushed_new_branches" dict "RecentBranchesPromptData" .RecentBranchesPromptData}}
<div class="{{Iif $showSidebar "repo-grid-filelist-sidebar" "repo-grid-filelist-only"}}">
<div class="repo-home-filelist">
{{template "repo/view_content" .}}
</div>
{{if $showSidebar}}
{{template "repo/home_sidebar_top" .}}
{{template "repo/home_sidebar_bottom" .}}
{{end}}
</div>
</div>
</div>
{{template "base/footer" .}}