diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2017-12-06 22:20:32 +0000 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2017-12-06 22:20:32 +0000 |
commit | e7d23a28d960ca0cff20e9790bfe612f4521d2bd (patch) | |
tree | 725e015ada7912badb94727507488ec5ce565102 /app/views/projects/tree | |
parent | 7619bdd6594e12a51594fa2f3fd47291579db5da (diff) | |
download | gitlab-ce-e7d23a28d960ca0cff20e9790bfe612f4521d2bd.tar.gz |
Add chevron to create dropdown on repository page
Diffstat (limited to 'app/views/projects/tree')
-rw-r--r-- | app/views/projects/tree/_old_tree_header.html.haml | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/app/views/projects/tree/_old_tree_header.html.haml b/app/views/projects/tree/_old_tree_header.html.haml index 3a43dde8052..7f636b7e0e8 100644 --- a/app/views/projects/tree/_old_tree_header.html.haml +++ b/app/views/projects/tree/_old_tree_header.html.haml @@ -1,3 +1,8 @@ +- if on_top_of_branch? + - addtotree_toggle_attributes = { href: '#', 'data-toggle': 'dropdown', 'data-target': '.add-to-tree-dropdown' } +- else + - addtotree_toggle_attributes = { title: _("You can only add files when you are on a branch"), data: { container: 'body' }, class: 'disabled has-tooltip' } + %ul.breadcrumb.repo-breadcrumb %li = link_to project_tree_path(@project, @ref) do @@ -8,13 +13,10 @@ - if current_user %li - - if !on_top_of_branch? - %span.btn.add-to-tree.disabled.has-tooltip{ title: _("You can only add files when you are on a branch"), data: { container: 'body' } } - = icon('plus') - - else - %span.dropdown - %a.dropdown-toggle.btn.add-to-tree{ href: '#', "data-toggle" => "dropdown", "data-target" => ".add-to-tree-dropdown" } - = icon('plus') + %a.btn.add-to-tree{ addtotree_toggle_attributes } + = sprite_icon('plus', size: 16, css_class: 'pull-left') + = sprite_icon('arrow-down', size: 16, css_class: 'pull-left') + - if on_top_of_branch? .add-to-tree-dropdown %ul.dropdown-menu - if can_edit_tree? |