Commit 6416f8ea authored by Phil Hughes's avatar Phil Hughes Committed by Jacob Schatz

Updated based on Ruby feedback

parent 14b124fa
...@@ -66,10 +66,10 @@ module ProjectsHelper ...@@ -66,10 +66,10 @@ module ProjectsHelper
end end
project_link = link_to simple_sanitize(project.name), project_path(project), { class: "project-item-select-holder" } project_link = link_to simple_sanitize(project.name), project_path(project), { class: "project-item-select-holder" }
project_link += icon "chevron-down", class: "dropdown-toggle-caret js-projects-dropdown-toggle", data: { target: ".header-content", toggle: "dropdown" } if current_user project_link << icon("chevron-down", class: "dropdown-toggle-caret js-projects-dropdown-toggle", data: { target: ".js-dropdown-menu-projects", toggle: "dropdown" }) if current_user
full_title = namespace_link + ' / ' + project_link full_title = namespace_link + ' / ' + project_link
full_title += ' &middot; '.html_safe + link_to(simple_sanitize(name), url) if name full_title << ' &middot; '.html_safe + link_to(simple_sanitize(name), url) if name
full_title full_title
end end
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
= render "layouts/init_auto_complete" if current_user = render "layouts/init_auto_complete" if current_user
- content_for :header_content do - content_for :header_content do
.js-dropdown-menu-projects
.dropdown-menu.dropdown-select.dropdown-menu-projects .dropdown-menu.dropdown-select.dropdown-menu-projects
= dropdown_title("Go to a project") = dropdown_title("Go to a project")
= dropdown_filter("Search your projects") = dropdown_filter("Search your projects")
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
%a.project-item-select-holder{href: "/gitlab-org/gitlab-test"} %a.project-item-select-holder{href: "/gitlab-org/gitlab-test"}
GitLab Test GitLab Test
%i.fa.chevron-down.dropdown-toggle-caret.js-projects-dropdown-toggle{ "data-toggle" => "dropdown", "data-target" => ".header-content" } %i.fa.chevron-down.dropdown-toggle-caret.js-projects-dropdown-toggle{ "data-toggle" => "dropdown", "data-target" => ".header-content" }
.js-dropdown-menu-projects
.dropdown-menu.dropdown-select.dropdown-menu-projects .dropdown-menu.dropdown-select.dropdown-menu-projects
.dropdown-title .dropdown-title
%span Go to a project %span Go to a project
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment