diff options
author | Jacob Schatz <jschatz1@gmail.com> | 2016-02-06 01:12:03 +0300 |
---|---|---|
committer | Jacob Schatz <jschatz1@gmail.com> | 2016-02-06 01:12:03 +0300 |
commit | e63941ab34d7ee714d20d1f7e0b8bb57876153de (patch) | |
tree | fb27be1c67f2aaf30e1611c1239006faf3ed0bc5 /app | |
parent | 70b7eacfb257f2f7473136789adf8c8a1fa872fb (diff) | |
parent | b724f0871ac3d3af5e19bdd45553e50a92d4a4f0 (diff) |
Merge branch 'project-title-dropdown-toggle-button' into 'master'
Changed the project switcher dropdown toggle
Moved the positioning of the dropdown to be more aligned with the title
Closes #13219 and #13214
cc. @jschatz1 @dzaporozhets
See merge request !2733
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/stylesheets/framework/header.scss | 9 | ||||
-rw-r--r-- | app/helpers/projects_helper.rb | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/app/assets/stylesheets/framework/header.scss b/app/assets/stylesheets/framework/header.scss index 7871a33b6c5..a81e258573d 100644 --- a/app/assets/stylesheets/framework/header.scss +++ b/app/assets/stylesheets/framework/header.scss @@ -91,8 +91,17 @@ header { .dropdown-toggle-caret { position: relative; top: -2px; + width: 12px; + line-height: 12px; margin-left: 5px; font-size: 10px; + text-align: center; + cursor: pointer; + } + + .project-item-select { + right: auto; + left: 0; } } diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 2e9741a8622..dd49283089d 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -59,9 +59,8 @@ module ProjectsHelper link_to(simple_sanitize(owner.name), user_path(owner)) end - project_link = link_to project_path(project), { class: "project-item-select-holder #{"js-projects-dropdown-toggle" if current_user}" } do + project_link = link_to project_path(project), { class: "project-item-select-holder" } do link_output = simple_sanitize(project.name) - link_output += content_tag :span, nil, { class: "fa fa-chevron-down dropdown-toggle-caret" } if current_user if current_user link_output += project_select_tag :project_path, @@ -71,6 +70,7 @@ module ProjectsHelper link_output end + project_link += icon "chevron-down", class: "dropdown-toggle-caret js-projects-dropdown-toggle" if current_user full_title = namespace_link + ' / ' + project_link full_title += ' · '.html_safe + link_to(simple_sanitize(name), url) if name |