From 82ddd738b672afd4ed28f12fb58f512fa117d2be Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Tue, 8 Dec 2015 17:10:07 +0100 Subject: Show tooltip when trying to edit file when not on branch --- app/views/projects/tree/_tree_header.html.haml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/views/projects/tree') diff --git a/app/views/projects/tree/_tree_header.html.haml b/app/views/projects/tree/_tree_header.html.haml index 1115ca6b4ca..4767f824ac1 100644 --- a/app/views/projects/tree/_tree_header.html.haml +++ b/app/views/projects/tree/_tree_header.html.haml @@ -30,3 +30,7 @@ = link_to '#modal-create-new-dir', { 'data-target' => '#modal-create-new-dir', 'data-toggle' => 'modal'} do = icon('folder fw') New directory + - elsif !on_top_of_branch? + %li + %span.btn.add-to-tree.disabled.has_tooltip{href: '#', title: "You can only add files when you are on top of a branch.", data: {container: 'body'}} + = icon('plus') -- cgit v1.2.1 From 57d71520bdc2ba79ba8182802cd944d4fb42a192 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Tue, 8 Dec 2015 22:30:40 +0100 Subject: Make tooltip less confusing --- app/views/projects/tree/_tree_header.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/projects/tree') diff --git a/app/views/projects/tree/_tree_header.html.haml b/app/views/projects/tree/_tree_header.html.haml index 4767f824ac1..2baa5ecd974 100644 --- a/app/views/projects/tree/_tree_header.html.haml +++ b/app/views/projects/tree/_tree_header.html.haml @@ -32,5 +32,5 @@ New directory - elsif !on_top_of_branch? %li - %span.btn.add-to-tree.disabled.has_tooltip{href: '#', title: "You can only add files when you are on top of a branch.", data: {container: 'body'}} + %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') -- cgit v1.2.1