Avoid redirect on navigation
parent
405b922dc5
commit
606eed0528
|
@ -871,6 +871,7 @@ init = ($log, $rootscope, $auth, $events, $analytics, $translate, $location, $na
|
|||
errorHandlingService.init()
|
||||
|
||||
if projectService.project?.get('blocked_code')
|
||||
projectService.setProject(null)
|
||||
errorHandlingService.block()
|
||||
|
||||
if lightboxService.getLightboxOpen().length
|
||||
|
|
|
@ -118,7 +118,7 @@ NavigationUrlsDirective = ($navurls, $auth, $q, $location, lightboxService, tgSe
|
|||
user = $auth.getUser()
|
||||
options.user = user.username if user
|
||||
|
||||
if options['section']
|
||||
if name == 'project'
|
||||
path = tgSections.getPath(options['project'], options['section'])
|
||||
name = "#{name}-#{path}"
|
||||
|
||||
|
|
|
@ -44,7 +44,11 @@ class SectionsService extends taiga.Service
|
|||
getPath: (projectSlug, sectionId) ->
|
||||
projects = @currentUserService.projects.get("all")
|
||||
project = projects.find (p) -> return p.get('slug') == projectSlug
|
||||
|
||||
if not sectionId
|
||||
sectionId = project.get('my_homepage')
|
||||
section = _.find(SECTIONS, {"id": sectionId})
|
||||
|
||||
if !section or project?.get(section.enabled) is not true
|
||||
return "timeline"
|
||||
|
||||
|
|
Loading…
Reference in New Issue