diff options
author | Shinya Maeda <shinya@gitlab.com> | 2017-11-06 23:43:10 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2017-11-06 23:43:10 +0900 |
commit | b4d167a8f78509e241639e560ee1fed545d2dbc1 (patch) | |
tree | ad31164a4fe19d7c3dbc7d9e9f1d3ee6e3e65637 /app/views/shared/_ref_switcher.html.haml | |
parent | c5377b97968ba9edefe7766dac77cc9fbbaa4e2c (diff) | |
parent | d4ceec9d47a7da5fa17cb6e161ac491e13fcb8bd (diff) | |
download | gitlab-ce-b4d167a8f78509e241639e560ee1fed545d2dbc1.tar.gz |
Merge branch 'master' into feature/sm/3691-expose-per-project-pipeline-idfeature/sm/3691-expose-per-project-pipeline-id
Diffstat (limited to 'app/views/shared/_ref_switcher.html.haml')
-rw-r--r-- | app/views/shared/_ref_switcher.html.haml | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/app/views/shared/_ref_switcher.html.haml b/app/views/shared/_ref_switcher.html.haml index 7ad743b3b81..6d7c9633913 100644 --- a/app/views/shared/_ref_switcher.html.haml +++ b/app/views/shared/_ref_switcher.html.haml @@ -1,3 +1,4 @@ +- show_new_branch_form = show_new_repo? && show_create && can?(current_user, :push_code, @project) - dropdown_toggle_text = @ref || @project.default_branch = form_tag switch_project_refs_path(@project), method: :get, class: "project-refs-form" do = hidden_field_tag :destination, destination @@ -7,8 +8,20 @@ = hidden_field_tag key, value, id: nil .dropdown = dropdown_toggle dropdown_toggle_text, { toggle: "dropdown", selected: dropdown_toggle_text, ref: @ref, refs_url: refs_project_path(@project), field_name: 'ref', submit_form_on_click: true, visit: true }, { toggle_class: "js-project-refs-dropdown" } - .dropdown-menu.dropdown-menu-selectable.git-revision-dropdown{ class: ("dropdown-menu-align-right" if local_assigns[:align_right]) } - = dropdown_title _("Switch branch/tag") - = dropdown_filter _("Search branches and tags") - = dropdown_content - = dropdown_loading + .dropdown-menu.dropdown-menu-selectable.git-revision-dropdown.dropdown-menu-paging{ class: ("dropdown-menu-align-right" if local_assigns[:align_right]) } + .dropdown-page-one + = dropdown_title _("Switch branch/tag") + = dropdown_filter _("Search branches and tags") + = dropdown_content + = dropdown_loading + - if show_new_branch_form + = dropdown_footer do + %ul.dropdown-footer-list + %li + %a.dropdown-toggle-page{ href: "#" } + Create new branch + - if show_new_branch_form + .dropdown-page-two + = dropdown_title("Create new branch", options: { back: true }) + = dropdown_content do + .js-new-branch-dropdown |