Make tooltip less confusing
This commit is contained in:
parent
7aeb7077cb
commit
57d71520bd
4 changed files with 6 additions and 6 deletions
|
@ -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
|
||||||
|
|
||||||
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 @@
|
||||||
%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 @@
|
||||||
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')
|
||||||
|
|
Loading…
Reference in a new issue