Commit 57d71520 authored by Douwe Maan's avatar Douwe Maan

Make tooltip less confusing

parent 7aeb7077
...@@ -21,7 +21,7 @@ class Projects::ApplicationController < ApplicationController ...@@ -21,7 +21,7 @@ class Projects::ApplicationController < ApplicationController
unless @repository.branch_names.include?(@ref) unless @repository.branch_names.include?(@ref)
redirect_to( redirect_to(
namespace_project_tree_path(@project.namespace, @project, @ref), namespace_project_tree_path(@project.namespace, @project, @ref),
notice: "This action is not allowed unless you are on top of a branch" notice: "This action is not allowed unless you are on a branch"
) )
end end
end end
......
...@@ -53,7 +53,7 @@ module Files ...@@ -53,7 +53,7 @@ module Files
unless project.empty_repo? unless project.empty_repo?
unless repository.branch_names.include?(@current_branch) unless repository.branch_names.include?(@current_branch)
raise_error("You can only create or edit files when you are on top of a branch") raise_error("You can only create or edit files when you are on a branch")
end end
if @current_branch != @target_branch if @current_branch != @target_branch
......
...@@ -21,6 +21,6 @@ ...@@ -21,6 +21,6 @@
%button.btn.btn-remove{ 'data-target' => '#modal-remove-blob', 'data-toggle' => 'modal' } Delete %button.btn.btn-remove{ 'data-target' => '#modal-remove-blob', 'data-toggle' => 'modal' } Delete
- elsif !on_top_of_branch? - elsif !on_top_of_branch?
.btn-group{ role: "group" } .btn-group{ role: "group" }
%button.btn.btn-default.disabled.has_tooltip{title: "You can only edit files when you are on top of a branch.", data: {container: 'body'}} Edit %button.btn.btn-default.disabled.has_tooltip{title: "You can only edit files when you are on a branch.", data: {container: 'body'}} Edit
%button.btn.btn-default.disabled.has_tooltip{title: "You can only replace files when you are on top of a branch.", data: {container: 'body'}} Replace %button.btn.btn-default.disabled.has_tooltip{title: "You can only replace files when you are on a branch.", data: {container: 'body'}} Replace
%button.btn.btn-remove.disabled.has_tooltip{title: "You can only delete files when you are on top of a branch.", data: {container: 'body'}} Delete %button.btn.btn-remove.disabled.has_tooltip{title: "You can only delete files when you are on a branch.", data: {container: 'body'}} Delete
...@@ -32,5 +32,5 @@ ...@@ -32,5 +32,5 @@
New directory New directory
- elsif !on_top_of_branch? - elsif !on_top_of_branch?
%li %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') = icon('plus')
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