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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
a2843c82
Commit
a2843c82
authored
Aug 24, 2020
by
Denys Mishunov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed snippet URLs for sub-folders
parent
56614675
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
app/assets/javascripts/snippets/components/edit.vue
app/assets/javascripts/snippets/components/edit.vue
+1
-1
app/assets/javascripts/snippets/components/snippet_header.vue
...assets/javascripts/snippets/components/snippet_header.vue
+1
-1
spec/frontend/snippets/components/edit_spec.js
spec/frontend/snippets/components/edit_spec.js
+1
-1
No files found.
app/assets/javascripts/snippets/components/edit.vue
View file @
a2843c82
...
...
@@ -90,7 +90,7 @@ export default {
if
(
this
.
newSnippet
)
{
return
this
.
projectPath
?
`
${
gon
.
relative_url_root
}${
this
.
projectPath
}
/-/snippets`
:
`
${
gon
.
relative_url_root
}
-/snippets`
;
:
`
${
gon
.
relative_url_root
}
/
-/snippets`
;
}
return
this
.
snippet
.
webUrl
;
},
...
...
app/assets/javascripts/snippets/components/snippet_header.vue
View file @
a2843c82
...
...
@@ -97,7 +97,7 @@ export default {
text
:
__
(
'
New snippet
'
),
href
:
this
.
snippet
.
project
?
`
${
this
.
snippet
.
project
.
webUrl
}
/-/snippets/new`
:
`
${
gon
.
relative_url_root
}
-/snippets/new`
,
:
`
${
gon
.
relative_url_root
}
/
-/snippets/new`
,
variant
:
'
success
'
,
category
:
'
secondary
'
,
cssClass
:
'
ml-2
'
,
...
...
spec/frontend/snippets/components/edit_spec.js
View file @
a2843c82
...
...
@@ -200,7 +200,7 @@ describe('Snippet Edit app', () => {
it
.
each
`
projectPath | snippetArg | expectation
${
''
}
|
${[]}
|
${
`
${
relativeUrlRoot
}
-/snippets`
}
${
''
}
|
${[]}
|
${
`
${
relativeUrlRoot
}
/
-/snippets`
}
${
'
project/path
'
}
|
${[]}
|
${
`
${
relativeUrlRoot
}
project/path/-/snippets`
}
${
''
}
|
${[
createTestSnippet
()]}
|
${
TEST_WEB_URL
}
${
'
project/path
'
}
|
${[
createTestSnippet
()]}
|
${
TEST_WEB_URL
}
...
...
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