mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-17 08:36:06 +10:00
27 lines
467 B
CoffeeScript
27 lines
467 B
CoffeeScript
((w) ->
|
|
|
|
w.gl or= {}
|
|
w.gl.utils or= {}
|
|
|
|
w.gl.utils.isInGroupsPage = ->
|
|
|
|
return $('body').data('page').split(':')[0] is 'groups'
|
|
|
|
|
|
w.gl.utils.isInProjectPage = ->
|
|
|
|
return $('body').data('page').split(':')[0] is 'projects'
|
|
|
|
|
|
w.gl.utils.getProjectSlug = ->
|
|
|
|
return if @isInProjectPage() then $('body').data 'project' else null
|
|
|
|
|
|
w.gl.utils.getGroupSlug = ->
|
|
|
|
return if @isInGroupsPage() then $('body').data 'group' else null
|
|
|
|
|
|
) window
|