mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-26 20:27:03 +01:00
70f3c32b91
Follow #29165 * some of them are incorrect, which would lead to double escaping (eg: `(print (Escape $.RepoLink)`) * other of them are not necessary, because `Tr` handles strings&HTML automatically Suggest to review by "unified view": https://github.com/go-gitea/gitea/pull/29394/files?diff=unified&w=0 (cherry picked from commit d2f6588b66549b33adf8bac7044d03c89d668470) Conflicts: templates/code/searchcombo.tmpl templates/mail/auth/register_notify.tmpl templates/mail/issue/default.tmpl templates/repo/code/recently_pushed_new_branches.tmpl templates/repo/search.tmpl templates/repo/settings/protected_branch.tmpl templates/user/auth/activate.tmpl templates/user/auth/forgot_passwd.tmpl templates/user/dashboard/feeds.tmpl context
17 lines
719 B
Go HTML Template
17 lines
719 B
Go HTML Template
{{range .RecentlyPushedNewBranches}}
|
|
<div class="ui positive message gt-df gt-ac">
|
|
<div class="gt-f1">
|
|
{{$timeSince := TimeSince .CommitTime.AsTime ctx.Locale}}
|
|
{{$repo := .GetRepo $.Context}}
|
|
{{$name := .Name}}
|
|
{{if ne $repo.ID $.Repository.ID}}
|
|
{{$name = (print $repo.FullName ":" .Name)}}
|
|
{{end}}
|
|
{{$branchLink := (print ($repo.Link) "/src/branch/" (PathEscapeSegments .Name))}}
|
|
{{ctx.Locale.Tr "repo.pulls.recently_pushed_new_branches" $name $timeSince $branchLink}}
|
|
</div>
|
|
<a role="button" class="ui compact positive button gt-m-0" href="{{$.Repository.ComposeBranchCompareURL $.Repository.BaseRepo $name}}">
|
|
{{ctx.Locale.Tr "repo.pulls.compare_changes"}}
|
|
</a>
|
|
</div>
|
|
{{end}}
|