Merge branch 'merge-request-default-source-branch-text' into 'master'

Added source branch text to dropdown toggle

## What does this MR do?

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"

## Screenshots (if relevant)

![Screen_Shot_2016-06-07_at_12.20.10](/uploads/40d31e21297a99300050cf9f23bd7371/Screen_Shot_2016-06-07_at_12.20.10.png)

See merge request !4504
This commit is contained in:
Jacob Schatz 2016-06-16 19:29:28 +00:00
commit e0f46ef1a5
2 changed files with 2 additions and 1 deletions

View File

@ -42,6 +42,7 @@ v 8.9.0 (unreleased)
- Use gitlab-shell v3.0.0
- Fixed alignment of download dropdown in merge requests
- Upgrade to jQuery 2
- Adds selected branch name to the dropdown toggle
- Use Knapsack to evenly distribute tests across multiple nodes
- Add `sha` parameter to MR merge API, to ensure only reviewed changes are merged
- Don't allow MRs to be merged when commits were added since the last review / page load

View File

@ -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")