summaryrefslogtreecommitdiffstats
path: root/templates/repo/code
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
parentInitial commit. (diff)
downloadforgejo-dd136858f1ea40ad3c94191d647487fa4f31926c.tar.xz
forgejo-dd136858f1ea40ad3c94191d647487fa4f31926c.zip
Adding upstream version 9.0.0.HEADupstream/9.0.0upstreamdebian
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to '')
-rw-r--r--templates/repo/code/recently_pushed_new_branches.tmpl17
-rw-r--r--templates/repo/code_frequency.tmpl9
2 files changed, 26 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}}
diff --git a/templates/repo/code_frequency.tmpl b/templates/repo/code_frequency.tmpl
new file mode 100644
index 0000000..50ec1be
--- /dev/null
+++ b/templates/repo/code_frequency.tmpl
@@ -0,0 +1,9 @@
+{{if .Permission.CanRead $.UnitTypeCode}}
+ <div id="repo-code-frequency-chart"
+ data-locale-loading-title="{{ctx.Locale.Tr "graphs.component_loading" (ctx.Locale.Tr "graphs.code_frequency.what")}}"
+ data-locale-loading-title-failed="{{ctx.Locale.Tr "graphs.component_loading_failed" (ctx.Locale.Tr "graphs.code_frequency.what")}}"
+ data-locale-loading-info="{{ctx.Locale.Tr "graphs.component_loading_info"}}"
+ data-locale-component-failed-to-load="{{ctx.Locale.Tr "graphs.component_failed_to_load"}}"
+ >
+ </div>
+{{end}}