{{ define "repo/fragments/artifactList" }} {{ $root := index . 0 }} {{ $tag := index . 1 }} {{ $isPushAllowed := $root.RepoInfo.Roles.IsPushAllowed }} {{ $artifacts := index $root.ArtifactMap $tag.Tag.Hash }}

artifacts

{{ range $artifact := $artifacts }} {{ $args := dict "LoggedInUser" $root.LoggedInUser "RepoInfo" $root.RepoInfo "Artifact" $artifact }} {{ template "repo/fragments/artifact" $args }} {{ end }}
{{ i "archive" "w-4 h-4" }} Source code (.tar.gz)
{{ if $isPushAllowed }} {{ template "uploadArtifact" (list $root $tag) }} {{ end }}
{{ end }} {{ define "uploadArtifact" }} {{ $root := index . 0 }} {{ $tag := index . 1 }} {{ $unique := $tag.Tag.Target.String }}
{{ end }}