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
Jérome Perrin
gitlab-ce
Commits
350877d0
Commit
350877d0
authored
Oct 01, 2014
by
Robert Schilling
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7904 from cirosantilli/titleize-actions
Titleize blob action buttons. [failure unrelated]
parents
0f9e6e51
0d4ae0e3
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
31 deletions
+36
-31
app/views/projects/blob/_actions.html.haml
app/views/projects/blob/_actions.html.haml
+13
-8
app/views/projects/tree/_tree.html.haml
app/views/projects/tree/_tree.html.haml
+1
-1
features/project/source/browse_files.feature
features/project/source/browse_files.feature
+9
-9
features/project/source/git_blame.feature
features/project/source/git_blame.feature
+1
-1
features/steps/project/browse_files.rb
features/steps/project/browse_files.rb
+10
-10
features/steps/project/browse_git_repo.rb
features/steps/project/browse_git_repo.rb
+2
-2
No files found.
app/views/projects/blob/_actions.html.haml
View file @
350877d0
...
...
@@ -2,21 +2,26 @@
-# only show edit link for text files
-
if
@blob
.
text?
-
if
allowed_tree_edit?
=
link_to
"edit"
,
project_edit_tree_path
(
@project
,
@id
),
class:
"btn btn-small"
=
link_to
'Edit'
,
project_edit_tree_path
(
@project
,
@id
),
class:
'btn btn-small'
-
else
%span
.btn.btn-small.disabled
edit
=
link_to
"raw"
,
project_raw_path
(
@project
,
@id
),
class:
"btn btn-small"
,
target:
"_blank"
%span
.btn.btn-small.disabled
Edit
=
link_to
'Raw'
,
project_raw_path
(
@project
,
@id
),
class:
'btn btn-small'
,
target:
'_blank'
-# only show normal/blame view links for text files
-
if
@blob
.
text?
-
if
current_page?
project_blame_path
(
@project
,
@id
)
=
link_to
"normal view"
,
project_blob_path
(
@project
,
@id
),
class:
"btn btn-small"
=
link_to
'Normal View'
,
project_blob_path
(
@project
,
@id
),
class:
'btn btn-small'
-
else
=
link_to
"blame"
,
project_blame_path
(
@project
,
@id
),
class:
"btn btn-small"
unless
@blob
.
empty?
=
link_to
"history"
,
project_commits_path
(
@project
,
@id
),
class:
"btn btn-small"
=
link_to
'Blame'
,
project_blame_path
(
@project
,
@id
),
class:
'btn btn-small'
unless
@blob
.
empty?
=
link_to
'History'
,
project_commits_path
(
@project
,
@id
),
class:
'btn btn-small'
-
if
@ref
!=
@commit
.
sha
=
link_to
'
p
ermalink'
,
project_blob_path
(
@project
,
=
link_to
'
P
ermalink'
,
project_blob_path
(
@project
,
tree_join
(
@commit
.
sha
,
@path
)),
class:
'btn btn-small'
-
if
allowed_tree_edit?
=
link_to
'#modal-remove-blob'
,
class:
"remove-blob btn btn-small btn-remove"
,
"data-toggle"
=>
"modal"
do
r
emove
R
emove
app/views/projects/tree/_tree.html.haml
View file @
350877d0
...
...
@@ -30,7 +30,7 @@
=
link_to
@commit
.
short_id
,
project_commit_path
(
@project
,
@commit
)
–
=
truncate
(
@commit
.
title
,
length:
50
)
=
link_to
"history"
,
project_commits_path
(
@project
,
@id
),
class:
"pull-right"
=
link_to
'History'
,
project_commits_path
(
@project
,
@id
),
class:
'pull-right'
-
if
@path
.
present?
%tr
.tree-item
...
...
features/project/source/browse_files.feature
View file @
350877d0
...
...
@@ -17,7 +17,7 @@ Feature: Project Browse files
Scenario
:
I
browse raw file
Given
I visit blob file from repo
And
I click link
"
r
aw"
And
I click link
"
R
aw"
Then
I should see raw file content
Scenario
:
I
can create file
...
...
@@ -37,13 +37,13 @@ Feature: Project Browse files
@javascript
Scenario
:
I
can edit file
Given
I click on
".gitignore"
file in repo
And
I click button
"
e
dit"
And
I click button
"
E
dit"
Then
I can edit code
@javascript
Scenario
:
I
can edit and commit file
Given
I click on
".gitignore"
file in repo
And
I click button
"
e
dit"
And
I click button
"
E
dit"
And
I edit code
And
I fill the commit message
And
I click on
"Commit changes"
...
...
@@ -53,7 +53,7 @@ Feature: Project Browse files
@javascript
Scenario
:
I
can see editing preview
Given
I click on
".gitignore"
file in repo
And
I click button
"
e
dit"
And
I click button
"
E
dit"
And
I edit code
And
I click link
"Diff"
Then
I see diff
...
...
@@ -62,7 +62,7 @@ Feature: Project Browse files
Scenario
:
I
can remove file and commit
Given
I click on
".gitignore"
file in repo
And
I see the
".gitignore"
And
I click on
"
r
emove"
And
I click on
"
R
emove"
And
I fill the commit message
And
I click on
"Remove file"
Then
I am redirected to the files URL
...
...
@@ -70,23 +70,23 @@ Feature: Project Browse files
Scenario
:
I
can browse directory with Browse Dir
Given
I click on files directory
And
I click on
h
istory link
And
I click on
H
istory link
Then
I see Browse dir link
Scenario
:
I
can browse file with Browse File
Given
I click on readme file
And
I click on
h
istory link
And
I click on
H
istory link
Then
I see Browse file link
Scenario
:
I
can browse code with Browse Code
Given
I click on
h
istory link
Given
I click on
H
istory link
Then
I see Browse code link
# Permalink
Scenario
:
I
click on the permalink link from a branch ref
Given
I click on
".gitignore"
file in repo
And
I click on
p
ermalink
And
I click on
P
ermalink
Then
I am redirected to the permalink URL
Scenario
:
I
don't see the permalink link from a SHA ref
...
...
features/project/source/git_blame.feature
View file @
350877d0
...
...
@@ -6,5 +6,5 @@ Feature: Project Browse git repo
Scenario
:
I
blame file
Given
I click on
".gitignore"
file in repo
And
I click
b
lame button
And
I click
B
lame button
Then
I should see git file blame
features/steps/project/browse_files.rb
View file @
350877d0
...
...
@@ -36,16 +36,16 @@ class Spinach::Features::ProjectBrowseFiles < Spinach::FeatureSteps
page
.
should
have_content
new_gitignore_content
end
step
'I click link "
r
aw"'
do
click_link
"raw"
step
'I click link "
R
aw"'
do
click_link
'Raw'
end
step
'I should see raw file content'
do
source
.
should
==
sample_blob
.
data
end
step
'I click button "
e
dit"'
do
click_link
'
e
dit'
step
'I click button "
E
dit"'
do
click_link
'
E
dit'
end
step
'I can edit code'
do
...
...
@@ -73,8 +73,8 @@ class Spinach::Features::ProjectBrowseFiles < Spinach::FeatureSteps
click_button
'Commit changes'
end
step
'I click on "
r
emove"'
do
click_link
'
r
emove'
step
'I click on "
R
emove"'
do
click_link
'
R
emove'
end
step
'I click on "Remove file"'
do
...
...
@@ -99,8 +99,8 @@ class Spinach::Features::ProjectBrowseFiles < Spinach::FeatureSteps
click_link
'files'
end
step
'I click on
h
istory link'
do
click_link
'
h
istory'
step
'I click on
H
istory link'
do
click_link
'
H
istory'
end
step
'I see Browse dir link'
do
...
...
@@ -125,8 +125,8 @@ class Spinach::Features::ProjectBrowseFiles < Spinach::FeatureSteps
page
.
should_not
have_link
'Browse Dir »'
end
step
'I click on
p
ermalink'
do
click_link
'
p
ermalink'
step
'I click on
P
ermalink'
do
click_link
'
P
ermalink'
end
step
'I am redirected to the files URL'
do
...
...
features/steps/project/browse_git_repo.rb
View file @
350877d0
...
...
@@ -7,8 +7,8 @@ class Spinach::Features::ProjectBrowseGitRepo < Spinach::FeatureSteps
click_link
".gitignore"
end
step
'I click
b
lame button'
do
click_link
"blame"
step
'I click
B
lame button'
do
click_link
'Blame'
end
step
'I should see git file blame'
do
...
...
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