{{/* 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}}