Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
57d71520
Commit
57d71520
authored
Dec 08, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make tooltip less confusing
parent
7aeb7077
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
app/controllers/projects/application_controller.rb
app/controllers/projects/application_controller.rb
+1
-1
app/services/files/base_service.rb
app/services/files/base_service.rb
+1
-1
app/views/projects/blob/_actions.html.haml
app/views/projects/blob/_actions.html.haml
+3
-3
app/views/projects/tree/_tree_header.html.haml
app/views/projects/tree/_tree_header.html.haml
+1
-1
No files found.
app/controllers/projects/application_controller.rb
View file @
57d71520
...
...
@@ -21,7 +21,7 @@ class Projects::ApplicationController < ApplicationController
unless
@repository
.
branch_names
.
include?
(
@ref
)
redirect_to
(
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
...
...
app/services/files/base_service.rb
View file @
57d71520
...
...
@@ -53,7 +53,7 @@ module Files
unless
project
.
empty_repo?
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
if
@current_branch
!=
@target_branch
...
...
app/views/projects/blob/_actions.html.haml
View file @
57d71520
...
...
@@ -21,6 +21,6 @@
%button
.btn.btn-remove
{
'data-target'
=>
'#modal-remove-blob'
,
'data-toggle'
=>
'modal'
}
Delete
-
elsif
!
on_top_of_branch?
.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 replace files when you are on
top of
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-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 a branch."
,
data:
{
container:
'body'
}}
Replace
%button
.btn.btn-remove.disabled.has_tooltip
{
title:
"You can only delete files when you are on a branch."
,
data:
{
container:
'body'
}}
Delete
app/views/projects/tree/_tree_header.html.haml
View file @
57d71520
...
...
@@ -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'
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment