From dd136858f1ea40ad3c94191d647487fa4f31926c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 18 Oct 2024 20:33:49 +0200 Subject: Adding upstream version 9.0.0. Signed-off-by: Daniel Baumann --- templates/repo/branch_dropdown.tmpl | 89 +++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 templates/repo/branch_dropdown.tmpl (limited to 'templates/repo/branch_dropdown.tmpl') diff --git a/templates/repo/branch_dropdown.tmpl b/templates/repo/branch_dropdown.tmpl new file mode 100644 index 0000000..f2bda8e --- /dev/null +++ b/templates/repo/branch_dropdown.tmpl @@ -0,0 +1,89 @@ +{{/* Attributes: +* root +* ContainerClasses +* (TODO: search "branch_dropdown" in the template directory) +*/}} +{{$defaultSelectedRefName := $.root.BranchName}} +{{if and .root.IsViewTag (not .noTag)}} + {{$defaultSelectedRefName = .root.TagName}} +{{end}} +{{if eq $defaultSelectedRefName ""}} + {{$defaultSelectedRefName = $.root.Repository.DefaultBranch}} +{{end}} + +{{$type := ""}} +{{if and .root.IsViewTag (not .noTag)}} + {{$type = "tag"}} +{{else if .root.IsViewBranch}} + {{$type = "branch"}} +{{else}} + {{$type = "tree"}} +{{end}} + +{{$showBranchesInDropdown := not .root.HideBranchesInDropdown}} + + + +
+ {{/* show dummy elements before Vue componment is mounted, this code must match the code in BranchTagSelector.vue */}} + +
-- cgit v1.2.3