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
81336bd2
Commit
81336bd2
authored
Aug 08, 2014
by
Ciro Santilli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add permalink to fixed SHA URL on blob view.
parent
174c00cf
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
0 deletions
+35
-0
CHANGELOG
CHANGELOG
+1
-0
app/views/projects/blob/_actions.html.haml
app/views/projects/blob/_actions.html.haml
+3
-0
features/project/source/browse_files.feature
features/project/source/browse_files.feature
+12
-0
features/steps/project/browse_files.rb
features/steps/project/browse_files.rb
+13
-0
features/steps/shared/paths.rb
features/steps/shared/paths.rb
+6
-0
No files found.
CHANGELOG
View file @
81336bd2
...
@@ -10,6 +10,7 @@ v 7.3.0
...
@@ -10,6 +10,7 @@ v 7.3.0
- Support Unix domain sockets for Redis
- Support Unix domain sockets for Redis
- Store session Redis keys in 'session:gitlab:' namespace
- Store session Redis keys in 'session:gitlab:' namespace
- Deprecate LDAP account takeover based on partial LDAP email / GitLab username match
- Deprecate LDAP account takeover based on partial LDAP email / GitLab username match
- Add blob permalink link (Ciro Santilli)
v 7.2.0
v 7.2.0
- Explore page
- Explore page
...
...
app/views/projects/blob/_actions.html.haml
View file @
81336bd2
...
@@ -13,6 +13,9 @@
...
@@ -13,6 +13,9 @@
-
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
),
class:
"btn btn-small"
unless
@blob
.
empty?
=
link_to
"history"
,
project_commits_path
(
@project
,
@id
),
class:
"btn btn-small"
=
link_to
"history"
,
project_commits_path
(
@project
,
@id
),
class:
"btn btn-small"
-
if
@ref
!=
@commit
.
sha
=
link_to
'permalink'
,
project_blob_path
(
@project
,
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
...
...
features/project/source/browse_files.feature
View file @
81336bd2
...
@@ -51,3 +51,15 @@ Feature: Project Browse files
...
@@ -51,3 +51,15 @@ Feature: Project Browse files
Scenario
:
I
can browse code with Browse Code
Scenario
:
I
can browse code with Browse Code
Given
I click on history link
Given
I click on history link
Then
I see Browse code 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 permalink
Then
I am redirected to the permalink URL
Scenario
:
I
don't see the permalink link from a SHA ref
Given
I visit project source page for
"6d394385cf567f80a8fd85055db1ab4c5295806f"
And
I click on
".gitignore"
file in repo
Then
I don't see the permalink link
features/steps/project/browse_files.rb
View file @
81336bd2
...
@@ -90,4 +90,17 @@ class ProjectBrowseFiles < Spinach::FeatureSteps
...
@@ -90,4 +90,17 @@ class ProjectBrowseFiles < Spinach::FeatureSteps
page
.
should_not
have_link
'Browse File »'
page
.
should_not
have_link
'Browse File »'
page
.
should_not
have_link
'Browse Dir »'
page
.
should_not
have_link
'Browse Dir »'
end
end
step
'I click on permalink'
do
click_link
'permalink'
end
step
'I am redirected to the permalink URL'
do
expect
(
current_path
).
to
eq
(
project_blob_path
(
@project
,
@project
.
repository
.
commit
.
sha
+
'/.gitignore'
))
end
step
"I don't see the permalink link"
do
expect
(
page
).
not_to
have_link
(
'permalink'
)
end
end
end
features/steps/shared/paths.rb
View file @
81336bd2
...
@@ -269,6 +269,12 @@ module SharedPaths
...
@@ -269,6 +269,12 @@ module SharedPaths
visit
project_tree_path
(
@project
,
"6d39438"
)
visit
project_tree_path
(
@project
,
"6d39438"
)
end
end
step
'I visit project source page for'
\
' "6d394385cf567f80a8fd85055db1ab4c5295806f"'
do
visit
project_tree_path
(
@project
,
'6d394385cf567f80a8fd85055db1ab4c5295806f'
)
end
step
'I visit project tags page'
do
step
'I visit project tags page'
do
visit
project_tags_path
(
@project
)
visit
project_tags_path
(
@project
)
end
end
...
...
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