diff --git a/appview/pages/templates/repo/index.html b/appview/pages/templates/repo/index.html index b418a4f..8f4f047 100644 --- a/appview/pages/templates/repo/index.html +++ b/appview/pages/templates/repo/index.html @@ -32,7 +32,7 @@ {{ end }} {{ define "branchSelector" }} -
+
- + {{ if .ForkInfo.IsFork }} + {{ $disabled := "" }} + {{ $title := "" }} + {{ if eq .ForkInfo.Status 0 }} + {{ $disabled = "disabled" }} + {{ $title = "This branch is not behind the upstream" }} + {{ else if eq .ForkInfo.Status 2 }} + {{ $disabled = "disabled" }} + {{ $title = "This branch has conflicts that must be resolved" }} + {{ else if eq .ForkInfo.Status 3 }} + {{ $disabled = "disabled" }} + {{ $title = "This branch does not exist on the upstream" }} + {{ end }} + + + {{ end }}
{{ end }}