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"
This commit is contained in:
Phil Hughes 2016-06-07 12:21:30 +01:00
parent e507a84c33
commit da592a737c
2 changed files with 13 additions and 1 deletions

View file

@ -119,6 +119,18 @@ v 8.8.5
- Forbid scripting for wiki files
- Only show notes through JSON on confidential issues that the user has access to
v 8.8.5 (unreleased)
- Adds selected branch name to the dropdown toggle
v 8.8.4 (unreleased)
- Ensure branch cleanup regardless of whether the GitHub import process succeeds
- Fix todos page throwing errors when you have a project pending deletion
- Reduce number of SQL queries when rendering user references
- Import GitHub repositories respecting the API rate limit
- Fix importer for GitHub comments on diff
- Disable Webhooks before proceeding with the GitHub import
- Fix incremental trace upload API when using multi-byte UTF-8 chars in trace
v 8.8.4
- Fix LDAP-based login for users with 2FA enabled. !4493
- Added descriptions to notification settings dropdown

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