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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
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 @@
...
@@ -2,21 +2,26 @@
-# only show edit link for text files
-# only show edit link for text files
-
if
@blob
.
text?
-
if
@blob
.
text?
-
if
allowed_tree_edit?
-
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
-
else
%span
.btn.btn-small.disabled
edit
%span
.btn.btn-small.disabled
Edit
=
link_to
"raw"
,
project_raw_path
(
@project
,
@id
),
class:
"btn btn-small"
,
target:
"_blank"
=
link_to
'Raw'
,
project_raw_path
(
@project
,
@id
),
class:
'btn btn-small'
,
target:
'_blank'
-# only show normal/blame view links for text files
-# only show normal/blame view links for text files
-
if
@blob
.
text?
-
if
@blob
.
text?
-
if
current_page?
project_blame_path
(
@project
,
@id
)
-
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
-
else
=
link_to
"blame"
,
project_blame_path
(
@project
,
@id
),
class:
"btn btn-small"
unless
@blob
.
empty?
=
link_to
'Blame'
,
project_blame_path
(
@project
,
@id
),
=
link_to
"history"
,
project_commits_path
(
@project
,
@id
),
class:
"btn btn-small"
class:
'btn btn-small'
unless
@blob
.
empty?
=
link_to
'History'
,
project_commits_path
(
@project
,
@id
),
class:
'btn btn-small'
-
if
@ref
!=
@commit
.
sha
-
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'
tree_join
(
@commit
.
sha
,
@path
)),
class:
'btn btn-small'
-
if
allowed_tree_edit?
-
if
allowed_tree_edit?
=
link_to
'#modal-remove-blob'
,
class:
"remove-blob btn btn-small btn-remove"
,
"data-toggle"
=>
"modal"
do
=
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 @@
...
@@ -30,7 +30,7 @@
=
link_to
@commit
.
short_id
,
project_commit_path
(
@project
,
@commit
)
=
link_to
@commit
.
short_id
,
project_commit_path
(
@project
,
@commit
)
–
–
=
truncate
(
@commit
.
title
,
length:
50
)
=
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?
-
if
@path
.
present?
%tr
.tree-item
%tr
.tree-item
...
...
features/project/source/browse_files.feature
View file @
350877d0
...
@@ -17,7 +17,7 @@ Feature: Project Browse files
...
@@ -17,7 +17,7 @@ Feature: Project Browse files
Scenario
:
I
browse raw file
Scenario
:
I
browse raw file
Given
I visit blob file from repo
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
Then
I should see raw file content
Scenario
:
I
can create file
Scenario
:
I
can create file
...
@@ -37,13 +37,13 @@ Feature: Project Browse files
...
@@ -37,13 +37,13 @@ Feature: Project Browse files
@javascript
@javascript
Scenario
:
I
can edit file
Scenario
:
I
can edit file
Given
I click on
".gitignore"
file in repo
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
Then
I can edit code
@javascript
@javascript
Scenario
:
I
can edit and commit file
Scenario
:
I
can edit and commit file
Given
I click on
".gitignore"
file in repo
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 edit code
And
I fill the commit message
And
I fill the commit message
And
I click on
"Commit changes"
And
I click on
"Commit changes"
...
@@ -53,7 +53,7 @@ Feature: Project Browse files
...
@@ -53,7 +53,7 @@ Feature: Project Browse files
@javascript
@javascript
Scenario
:
I
can see editing preview
Scenario
:
I
can see editing preview
Given
I click on
".gitignore"
file in repo
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 edit code
And
I click link
"Diff"
And
I click link
"Diff"
Then
I see diff
Then
I see diff
...
@@ -62,7 +62,7 @@ Feature: Project Browse files
...
@@ -62,7 +62,7 @@ Feature: Project Browse files
Scenario
:
I
can remove file and commit
Scenario
:
I
can remove file and commit
Given
I click on
".gitignore"
file in repo
Given
I click on
".gitignore"
file in repo
And
I see the
".gitignore"
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 fill the commit message
And
I click on
"Remove file"
And
I click on
"Remove file"
Then
I am redirected to the files URL
Then
I am redirected to the files URL
...
@@ -70,23 +70,23 @@ Feature: Project Browse files
...
@@ -70,23 +70,23 @@ Feature: Project Browse files
Scenario
:
I
can browse directory with Browse Dir
Scenario
:
I
can browse directory with Browse Dir
Given
I click on files directory
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
Then
I see Browse dir link
Scenario
:
I
can browse file with Browse File
Scenario
:
I
can browse file with Browse File
Given
I click on readme 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
Then
I see Browse file link
Scenario
:
I
can browse code with Browse Code
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
Then
I see Browse code link
# Permalink
# Permalink
Scenario
:
I
click on the permalink link from a branch ref
Scenario
:
I
click on the permalink link from a branch ref
Given
I click on
".gitignore"
file in repo
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
Then
I am redirected to the permalink URL
Scenario
:
I
don't see the permalink link from a SHA ref
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
...
@@ -6,5 +6,5 @@ Feature: Project Browse git repo
Scenario
:
I
blame file
Scenario
:
I
blame file
Given
I click on
".gitignore"
file in repo
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
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
...
@@ -36,16 +36,16 @@ class Spinach::Features::ProjectBrowseFiles < Spinach::FeatureSteps
page
.
should
have_content
new_gitignore_content
page
.
should
have_content
new_gitignore_content
end
end
step
'I click link "
r
aw"'
do
step
'I click link "
R
aw"'
do
click_link
"raw"
click_link
'Raw'
end
end
step
'I should see raw file content'
do
step
'I should see raw file content'
do
source
.
should
==
sample_blob
.
data
source
.
should
==
sample_blob
.
data
end
end
step
'I click button "
e
dit"'
do
step
'I click button "
E
dit"'
do
click_link
'
e
dit'
click_link
'
E
dit'
end
end
step
'I can edit code'
do
step
'I can edit code'
do
...
@@ -73,8 +73,8 @@ class Spinach::Features::ProjectBrowseFiles < Spinach::FeatureSteps
...
@@ -73,8 +73,8 @@ class Spinach::Features::ProjectBrowseFiles < Spinach::FeatureSteps
click_button
'Commit changes'
click_button
'Commit changes'
end
end
step
'I click on "
r
emove"'
do
step
'I click on "
R
emove"'
do
click_link
'
r
emove'
click_link
'
R
emove'
end
end
step
'I click on "Remove file"'
do
step
'I click on "Remove file"'
do
...
@@ -99,8 +99,8 @@ class Spinach::Features::ProjectBrowseFiles < Spinach::FeatureSteps
...
@@ -99,8 +99,8 @@ class Spinach::Features::ProjectBrowseFiles < Spinach::FeatureSteps
click_link
'files'
click_link
'files'
end
end
step
'I click on
h
istory link'
do
step
'I click on
H
istory link'
do
click_link
'
h
istory'
click_link
'
H
istory'
end
end
step
'I see Browse dir link'
do
step
'I see Browse dir link'
do
...
@@ -125,8 +125,8 @@ class Spinach::Features::ProjectBrowseFiles < Spinach::FeatureSteps
...
@@ -125,8 +125,8 @@ class Spinach::Features::ProjectBrowseFiles < Spinach::FeatureSteps
page
.
should_not
have_link
'Browse Dir »'
page
.
should_not
have_link
'Browse Dir »'
end
end
step
'I click on
p
ermalink'
do
step
'I click on
P
ermalink'
do
click_link
'
p
ermalink'
click_link
'
P
ermalink'
end
end
step
'I am redirected to the files URL'
do
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
...
@@ -7,8 +7,8 @@ class Spinach::Features::ProjectBrowseGitRepo < Spinach::FeatureSteps
click_link
".gitignore"
click_link
".gitignore"
end
end
step
'I click
b
lame button'
do
step
'I click
B
lame button'
do
click_link
"blame"
click_link
'Blame'
end
end
step
'I should see git file blame'
do
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