{{/* Attributes: * root * ContainerClasses * (TODO: search "branch_dropdown" in the template direcotry) */}} {{$defaultBranch := $.root.BranchName}} {{if and .root.IsViewTag (not .noTag)}} {{$defaultBranch = .root.TagName}} {{end}} {{if eq $defaultBranch ""}} {{$defaultBranch = $.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}}