diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-06 15:17:57 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-06 20:07:48 +0800 |
commit | 8ed0dbe4201a58b00d6f3743178f4cbe5328e2b0 (patch) | |
tree | a2f33fccac42b554b1176741d00c1d0cd2d0dceb /templates/_group_view.tmpl | |
parent | sql: Add purge and test scripts (diff) | |
download | forge-8ed0dbe4201a58b00d6f3743178f4cbe5328e2b0.tar.gz forge-8ed0dbe4201a58b00d6f3743178f4cbe5328e2b0.tar.zst forge-8ed0dbe4201a58b00d6f3743178f4cbe5328e2b0.zip |
*: Support subgroups via SQL recursion
Diffstat (limited to '')
-rw-r--r-- | templates/_group_view.tmpl | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/templates/_group_view.tmpl b/templates/_group_view.tmpl new file mode 100644 index 0000000..4783162 --- /dev/null +++ b/templates/_group_view.tmpl @@ -0,0 +1,48 @@ +{{/* + SPDX-License-Identifier: AGPL-3.0-only + SPDX-FileContributor: Runxi Yu <https://runxiyu.org> +*/}} +{{- define "group_view" -}} +{{ if .subgroups }} + <table class="wide"> + <thead> + <tr> + <th colspan="2" class="title-row">Subgroups</th> + </tr> + </thead> + <tbody> + {{- range .subgroups }} + <tr> + <td> + <a href="{{ .Name }}/">{{ .Name }}</a> + </td> + <td> + {{ .Description }} + </td> + </tr> + {{- end }} + </tbody> + </table> +{{ end }} +{{ if .repos }} +<table class="wide"> + <thead> + <tr> + <th colspan="2" class="title-row">Repos</th> + </tr> + </thead> + <tbody> + {{- range .repos }} + <tr> + <td> + <a href=":/repos/{{ .Name }}/">{{ .Name }}</a> + </td> + <td> + {{ .Description }} + </td> + </tr> + {{- end }} + </tbody> +</table> +{{ end }} +{{- end -}} |