conditional kanban joyride step if the user has creation perms

stable
Juanfran 2015-10-19 08:23:52 +02:00 committed by Alejandro Alonso
parent 50db211c86
commit 12f7ef7e51
1 changed files with 17 additions and 13 deletions

View File

@ -94,7 +94,7 @@ class JoyRideService extends taiga.Service
return steps
kanban: () =>
return [
steps = [
{
element: '.kanban-table-inner',
position: 'bottom',
@ -110,8 +110,11 @@ class JoyRideService extends taiga.Service
title: @translate.instant('JOYRIDE.KANBAN.STEP2.TITLE')
text: @translate.instant('JOYRIDE.KANBAN.STEP2.TEXT')
}
},
{
}
]
if @checkPermissionsService.check('add_us')
steps.push({
element: '.icon-plus',
position: 'bottom',
joyride: {
@ -121,8 +124,9 @@ class JoyRideService extends taiga.Service
@translate.instant('JOYRIDE.KANBAN.STEP3.TEXT2'),
]
}
}
]
})
return steps
}
get: (name) ->