summaryrefslogtreecommitdiffstats
path: root/templates/repo/code/recently_pushed_new_branches.tmpl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2024-10-18 20:33:49 +0200
committerDaniel Baumann <daniel@debian.org>2024-10-18 20:33:49 +0200
commitdd136858f1ea40ad3c94191d647487fa4f31926c (patch)
tree58fec94a7b2a12510c9664b21793f1ed560c6518 /templates/repo/code/recently_pushed_new_branches.tmpl
parentInitial commit. (diff)
downloadforgejo-debian.tar.xz
forgejo-debian.zip
Adding upstream version 9.0.0.HEADupstream/9.0.0upstreamdebian
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to 'templates/repo/code/recently_pushed_new_branches.tmpl')
-rw-r--r--templates/repo/code/recently_pushed_new_branches.tmpl17
1 files changed, 17 insertions, 0 deletions
diff --git a/templates/repo/code/recently_pushed_new_branches.tmpl b/templates/repo/code/recently_pushed_new_branches.tmpl
new file mode 100644
index 0000000..d996acc
--- /dev/null
+++ b/templates/repo/code/recently_pushed_new_branches.tmpl
@@ -0,0 +1,17 @@
+{{range .RecentlyPushedNewBranches}}
+ <div class="ui positive message tw-flex tw-items-center tw-gap-2">
+ <div class="tw-flex-1 tw-break-anywhere">
+ {{$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 tw-m-0" href="{{$.Repository.ComposeBranchCompareURL $.Repository.BaseRepo $name}}">
+ {{ctx.Locale.Tr "repo.pulls.compare_changes"}}
+ </a>
+ </div>
+{{end}}