summaryrefslogtreecommitdiff
path: root/app/views/projects/merge_requests
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-06-07 12:21:30 +0100
committerPhil Hughes <me@iamphill.com>2016-06-16 08:42:35 +0100
commitda592a737c8dad6772a3340dbc5194eb5b3b4687 (patch)
treee64f6457cdac4801b9cd5ba41c73b6479150b302 /app/views/projects/merge_requests
parente507a84c3398e9869484dcc2c90d6c0dbdc5bbe2 (diff)
downloadgitlab-ce-da592a737c8dad6772a3340dbc5194eb5b3b4687.tar.gz
Added source branch text to dropdown toggle
Previously, the dropdown toggle would default to "Select source branch", this changes that so that it defaults to the branch name and if that doesn't exist, it defaults to "Select source branch"
Diffstat (limited to 'app/views/projects/merge_requests')
-rw-r--r--app/views/projects/merge_requests/_new_compare.html.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/projects/merge_requests/_new_compare.html.haml b/app/views/projects/merge_requests/_new_compare.html.haml
index b08524574e4..de39964fca8 100644
--- a/app/views/projects/merge_requests/_new_compare.html.haml
+++ b/app/views/projects/merge_requests/_new_compare.html.haml
@@ -21,7 +21,7 @@
selected: f.object.source_project_id
.merge-request-select.dropdown
= f.hidden_field :source_branch
- = dropdown_toggle "Select source branch", { toggle: "dropdown", field_name: "#{f.object_name}[source_branch]" }, { toggle_class: "js-compare-dropdown js-source-branch" }
+ = dropdown_toggle f.object.source_branch || "Select source branch", { toggle: "dropdown", field_name: "#{f.object_name}[source_branch]" }, { toggle_class: "js-compare-dropdown js-source-branch" }
.dropdown-menu.dropdown-menu-selectable.dropdown-source-branch
= dropdown_title("Select source branch")
= dropdown_filter("Search branches")