Merge pull request #116 from taigaio/bug/1042/redirect-after-delete-task-or-us
redirect after delete an us or taskstable
commit
f8fde1247b
|
@ -140,7 +140,12 @@ class TaskDetailController extends mixOf(taiga.Controller, taiga.PageMixin)
|
|||
promise = @.repo.remove(@scope.task)
|
||||
promise.then =>
|
||||
finish()
|
||||
@location.path(@navUrls.resolve("project-backlog", {project: @scope.project.slug}))
|
||||
|
||||
if @scope.task.milestone
|
||||
@location.path(@navUrls.resolve("project-taskboard", {project: @scope.project.slug, sprint: @scope.sprint.slug}))
|
||||
else if @scope.us
|
||||
@location.path(@navUrls.resolve("project-userstories-detail", {project: @scope.project.slug, ref: @scope.us.ref}))
|
||||
|
||||
promise.then null, =>
|
||||
finish(false)
|
||||
@confirm.notify("error")
|
||||
|
|
|
@ -152,7 +152,13 @@ class UserStoryDetailController extends mixOf(taiga.Controller, taiga.PageMixin)
|
|||
promise = @.repo.remove(@scope.us)
|
||||
promise.then =>
|
||||
finish()
|
||||
@location.path(@navUrls.resolve("project-backlog", {project: @scope.project.slug}))
|
||||
|
||||
if @scope.us.milestone
|
||||
@location.path(@navUrls.resolve("project-taskboard", {project: @scope.project.slug, sprint: @scope.sprint.slug}))
|
||||
else if @scope.project.is_backlog_activated
|
||||
@location.path(@navUrls.resolve("project-backlog", {project: @scope.project.slug}))
|
||||
else
|
||||
@location.path(@navUrls.resolve("project-kanban", {project: @scope.project.slug}))
|
||||
promise.then null, =>
|
||||
finish(false)
|
||||
$confirm.notify("error")
|
||||
|
|
Loading…
Reference in New Issue