diff options
Diffstat (limited to 'forged/templates/_group_view.tmpl')
-rw-r--r-- | forged/templates/_group_view.tmpl | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/forged/templates/_group_view.tmpl b/forged/templates/_group_view.tmpl new file mode 100644 index 0000000..92b6639 --- /dev/null +++ b/forged/templates/_group_view.tmpl @@ -0,0 +1,56 @@ +{{/* + SPDX-License-Identifier: AGPL-3.0-only + SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu <https://runxiyu.org> +*/}} +{{- define "group_view" -}} +{{- if .subgroups -}} + <table class="wide"> + <thead> + <tr> + <th colspan="2" class="title-row">Subgroups</th> + </tr> + <tr> + <th scope="col">Name</th> + <th scope="col">Description</th> + </tr> + </thead> + <tbody> + {{- range .subgroups -}} + <tr> + <td> + <a href="{{- .Name | path_escape -}}/">{{- .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> + <th scope="col">Name</th> + <th scope="col">Description</th> + </tr> + </tr> + </thead> + <tbody> + {{- range .repos -}} + <tr> + <td> + <a href="-/repos/{{- .Name | path_escape -}}/">{{- .Name -}}</a> + </td> + <td> + {{- .Description -}} + </td> + </tr> + {{- end -}} + </tbody> +</table> +{{- end -}} +{{- end -}} |