mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-21 18:46:10 +10:00
Added a common util to get project slug.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
((w) ->
|
||||
|
||||
w.gl or= {}
|
||||
w.gl.utils or= {}
|
||||
|
||||
w.gl.utils.getProjectSlug = ->
|
||||
|
||||
$body = $ 'body'
|
||||
isInProjectPage = $body.data('page').split(':')[0] is 'projects'
|
||||
|
||||
return if isInProjectPage then $body.data 'project' else null
|
||||
|
||||
) window
|
||||
Reference in New Issue
Block a user