Make neightbor section compatible with the new API spec

stable
David Barragán Merino 2016-01-04 17:56:27 +01:00
parent 2319ba1766
commit 2a6a1dfd86
3 changed files with 6 additions and 6 deletions

View File

@ -127,14 +127,14 @@ class IssueDetailController extends mixOf(taiga.Controller, taiga.PageMixin)
@scope.issueId = issue.id @scope.issueId = issue.id
@scope.commentModel = issue @scope.commentModel = issue
if @scope.issue.neighbors.previous.ref? if @scope.issue.neighbors.previous?.ref?
ctx = { ctx = {
project: @scope.project.slug project: @scope.project.slug
ref: @scope.issue.neighbors.previous.ref ref: @scope.issue.neighbors.previous.ref
} }
@scope.previousUrl = @navUrls.resolve("project-issues-detail", ctx) @scope.previousUrl = @navUrls.resolve("project-issues-detail", ctx)
if @scope.issue.neighbors.next.ref? if @scope.issue.neighbors.next?.ref?
ctx = { ctx = {
project: @scope.project.slug project: @scope.project.slug
ref: @scope.issue.neighbors.next.ref ref: @scope.issue.neighbors.next.ref

View File

@ -115,14 +115,14 @@ class TaskDetailController extends mixOf(taiga.Controller, taiga.PageMixin)
@scope.taskId = task.id @scope.taskId = task.id
@scope.commentModel = task @scope.commentModel = task
if @scope.task.neighbors.previous.ref? if @scope.task.neighbors.previous?.ref?
ctx = { ctx = {
project: @scope.project.slug project: @scope.project.slug
ref: @scope.task.neighbors.previous.ref ref: @scope.task.neighbors.previous.ref
} }
@scope.previousUrl = @navUrls.resolve("project-tasks-detail", ctx) @scope.previousUrl = @navUrls.resolve("project-tasks-detail", ctx)
if @scope.task.neighbors.next.ref? if @scope.task.neighbors.next?.ref?
ctx = { ctx = {
project: @scope.project.slug project: @scope.project.slug
ref: @scope.task.neighbors.next.ref ref: @scope.task.neighbors.next.ref

View File

@ -152,14 +152,14 @@ class UserStoryDetailController extends mixOf(taiga.Controller, taiga.PageMixin)
@scope.usId = us.id @scope.usId = us.id
@scope.commentModel = us @scope.commentModel = us
if @scope.us.neighbors.previous.ref? if @scope.us.neighbors.previous?.ref?
ctx = { ctx = {
project: @scope.project.slug project: @scope.project.slug
ref: @scope.us.neighbors.previous.ref ref: @scope.us.neighbors.previous.ref
} }
@scope.previousUrl = @navUrls.resolve("project-userstories-detail", ctx) @scope.previousUrl = @navUrls.resolve("project-userstories-detail", ctx)
if @scope.us.neighbors.next.ref? if @scope.us.neighbors.next?.ref?
ctx = { ctx = {
project: @scope.project.slug project: @scope.project.slug
ref: @scope.us.neighbors.next.ref ref: @scope.us.neighbors.next.ref