Header Detail
parent
0905c2b56f
commit
140bc1d3f8
|
@ -35,6 +35,8 @@
|
|||
"ONE_ITEM_LINE": "One item per line...",
|
||||
"NEW_BULK": "New bulk insert",
|
||||
"RELATED_TASKS": "Related tasks",
|
||||
"PREVIOUS": "Previous",
|
||||
"NEXT": "Next",
|
||||
"LOGOUT": "Logout",
|
||||
"EXTERNAL_USER": "an external user",
|
||||
"GENERIC_ERROR": "One of our Oompa Loompas says {{error}}.",
|
||||
|
@ -1060,8 +1062,6 @@
|
|||
"EXTERNAL_REFERENCE": "This US has been created from",
|
||||
"GO_TO_EXTERNAL_REFERENCE": "Go to origin",
|
||||
"BLOCKED": "This user story is blocked",
|
||||
"PREVIOUS": "previous user story",
|
||||
"NEXT": "next user story",
|
||||
"TITLE_DELETE_ACTION": "Delete User Story",
|
||||
"LIGHTBOX_TITLE_BLOKING_US": "Blocking us",
|
||||
"TASK_COMPLETED": "{{totalClosedTasks}}/{{totalTasks}} tasks completed",
|
||||
|
@ -1295,8 +1295,6 @@
|
|||
"ORIGIN_US": "This task has been created from",
|
||||
"TITLE_LINK_GO_ORIGIN": "Go to user story",
|
||||
"BLOCKED": "This task is blocked",
|
||||
"PREVIOUS": "previous task",
|
||||
"NEXT": "next task",
|
||||
"TITLE_DELETE_ACTION": "Delete Task",
|
||||
"LIGHTBOX_TITLE_BLOKING_TASK": "Blocking task",
|
||||
"FIELDS": {
|
||||
|
@ -1341,8 +1339,6 @@
|
|||
"EXTERNAL_REFERENCE": "This issue has been created from",
|
||||
"GO_TO_EXTERNAL_REFERENCE": "Go to origin",
|
||||
"BLOCKED": "This issue is blocked",
|
||||
"TITLE_PREVIOUS_ISSUE": "previous issue",
|
||||
"TITLE_NEXT_ISSUE": "next issue",
|
||||
"ACTION_DELETE": "Delete issue",
|
||||
"LIGHTBOX_TITLE_BLOKING_ISSUE": "Blocking issue",
|
||||
"FIELDS": {
|
||||
|
|
|
@ -36,20 +36,19 @@ class StoryHeaderController
|
|||
console.log @.item
|
||||
|
||||
_checkNav: () ->
|
||||
|
||||
if @.item.neighbors.previous?.ref?
|
||||
ctx = {
|
||||
project: @.project.slug
|
||||
ref: @.item.neighbors.previous.ref
|
||||
}
|
||||
@.previousUrl = @navUrls.resolve("project-userstories-detail", ctx)
|
||||
@.previousUrl = @navUrls.resolve("project-" + @.item._name + "-detail", ctx)
|
||||
|
||||
if @.item.neighbors.next?.ref?
|
||||
ctx = {
|
||||
project: @.project.slug
|
||||
ref: @.item.neighbors.next.ref
|
||||
}
|
||||
@.nextUrl = @navUrls.resolve("project-userstories-detail", ctx)
|
||||
@.nextUrl = @navUrls.resolve("project-" + @.item._name + "-detail", ctx)
|
||||
|
||||
_checkPermissions: () ->
|
||||
@.permissions = {
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
tg-svg(
|
||||
svg-icon="icon-save"
|
||||
)
|
||||
|
||||
//- User Story belongs to epic
|
||||
.belong-to-epics-wrapper(ng-if="vm.item.epics")
|
||||
span This User Story belongs to
|
||||
tg-belong-to-epics(
|
||||
|
@ -42,20 +44,41 @@
|
|||
project="project"
|
||||
)
|
||||
|
||||
.task-belongs-to(ng-if="vm.item.user_story")
|
||||
//- Task belongs to US
|
||||
.task-belongs-to(
|
||||
ng-if="vm.item.user_story_extra_info"
|
||||
tg-check-permission="view_us"
|
||||
)
|
||||
span(translate="TASK.OWNER_US")
|
||||
a(
|
||||
href=""
|
||||
tg-check-permission="view_us"
|
||||
tg-nav="project-userstories-detail:project=project.slug,ref=vm.item.user_story.ref"
|
||||
tg-nav="project-userstories-detail:project=vm.project.slug,ref=vm.item.user_story_extra_info.ref"
|
||||
title="{{'TASK.TITLE_LINK_GO_OWNER' | translate}}"
|
||||
)
|
||||
span.item-ref {{'#' + vm.item.ref}}
|
||||
span {{::vm.item.subject}}
|
||||
span.item-ref {{'#' + vm.item.user_story_extra_info.ref}}
|
||||
span {{::vm.item.user_story_extra_info.subject}}
|
||||
|
||||
.item-origin-issue(
|
||||
ng-if="vm.item.origin_issue"
|
||||
)
|
||||
|
||||
//- User Stories generated from issue
|
||||
.item-generated-us(ng-if="vm.item.generated_user_stories.length")
|
||||
span(translate="ISSUES.PROMOTED")
|
||||
a(
|
||||
ng-repeat="userstory in vm.item.generated_user_stories track by userstory.id"
|
||||
tg-check-permission="view_us"
|
||||
tg-nav="project-userstories-detail:project=vm.project.slug,ref=userstory.ref"
|
||||
) {{'#' + userstory.ref}} {{userstory.subject}}
|
||||
|
||||
//- Issue origin from github
|
||||
.issue-external-reference(ng-if="vm.item.external_reference")
|
||||
span(translate="ISSUES.EXTERNAL_REFERENCE")
|
||||
a(
|
||||
target="_blank"
|
||||
ng-href="::vm.item.external_reference[1]"
|
||||
ng-title="{{'ISSUES.GO_TO_EXTERNAL_REFERENCE' | translate}}"
|
||||
)
|
||||
span {{ ::vm.item.external_reference[1] }}
|
||||
|
||||
//- User Story promoted from issue
|
||||
.item-origin-issue(ng-if="vm.item.origin_issue")
|
||||
span(translate="US.PROMOTED")
|
||||
a(
|
||||
href=""
|
||||
|
@ -63,25 +86,25 @@
|
|||
tg-nav="project-issues-detail:project=vm.project.slug,ref=vm.item.origin_issue.ref"
|
||||
title="{{'US.TITLE_LINK_GO_TO_ISSUE' | translate}}"
|
||||
)
|
||||
span {{'#' + vm.item.origin_issue.ref}}
|
||||
span.item-ref {{'#' + vm.item.origin_issue.ref}}
|
||||
span {{vm.item.origin_issue.subject}}
|
||||
|
||||
//- Blocked description
|
||||
.block-desc-container(ng-show="vm.item.is_blocked")
|
||||
span.block-description-title(translate="COMMON.BLOCKED")
|
||||
span.block-description(
|
||||
ng-if="vm.item.blocked_note"
|
||||
) {{vm.item.blocked_note}}
|
||||
span.block-description(ng-if="vm.item.blocked_note") {{vm.item.blocked_note}}
|
||||
|
||||
//- Navigation
|
||||
.issue-nav
|
||||
a(
|
||||
ng-if="vm.previousUrl"
|
||||
ng-href="{{vm.previousUrl}}"
|
||||
title="{{'US.PREVIOUS' | translate}}"
|
||||
title="{{'COMMON.PREVIOUS' | translate}}"
|
||||
)
|
||||
tg-svg(svg-icon="icon-arrow-left")
|
||||
a(
|
||||
ng-if="vm.nextUrl"
|
||||
ng-href="{{vm.nextUrl}}"
|
||||
title="{{'US.NEXT' | translate}}"
|
||||
title="{{'COMMON.NEXT' | translate}}"
|
||||
)
|
||||
tg-svg(svg-icon="icon-arrow-right")
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
fill: $white;
|
||||
}
|
||||
}
|
||||
.item-generated-us,
|
||||
.item-origin-issue,
|
||||
.task-belongs-to,
|
||||
.belong-to-epics-wrapper,
|
||||
|
@ -28,6 +29,7 @@
|
|||
@include font-size(small);
|
||||
margin-top: .5rem;
|
||||
}
|
||||
.item-generated-us,
|
||||
.task-belongs-to,
|
||||
.item-origin-issue {
|
||||
a {
|
||||
|
|
|
@ -17,52 +17,13 @@ div.wrapper(
|
|||
on-upvote="ctrl.onUpvote"
|
||||
on-downvote="ctrl.onDownvote"
|
||||
)
|
||||
.us-title(ng-class="{blocked: issue.is_blocked}")
|
||||
h2.us-title-text
|
||||
span.us-number(tg-bo-ref="issue.ref")
|
||||
span.us-name(tg-editable-subject, ng-model="issue", required-perm="modify_issue")
|
||||
|
||||
p.us-related-task(ng-if="issue.generated_user_stories.length") {{ 'ISSUES.PROMOTED'|translate }}
|
||||
a(
|
||||
href=""
|
||||
ng-repeat="us in issue.generated_user_stories"
|
||||
tg-check-permission="view_us"
|
||||
tg-bo-title="'#' + us.ref + ' ' + us.subject"
|
||||
tg-nav="project-userstories-detail:project=project.slug,ref=us.ref"
|
||||
)
|
||||
span(tg-bo-ref="us.ref")
|
||||
|
||||
p.external-reference(ng-if="issue.external_reference")
|
||||
| {{ 'ISSUES.EXTERNAL_REFERENCE'|translate }}
|
||||
a(
|
||||
target="_blank"
|
||||
tg-bo-href="issue.external_reference[1]"
|
||||
title="{{'ISSUES.GO_TO_EXTERNAL_REFERENCE' | translate}}"
|
||||
)
|
||||
span {{ issue.external_reference[1] }}
|
||||
|
||||
p.block-desc-container(ng-show="issue.is_blocked")
|
||||
span.block-description-title(translate="COMMON.BLOCKED")
|
||||
span.block-description(ng-bind="issue.blocked_note || ('ISSUES.BLOCKED' | translate)")
|
||||
|
||||
.issue-nav
|
||||
a(
|
||||
ng-show="previousUrl"
|
||||
tg-bo-href="previousUrl"
|
||||
title="{{'ISSUES.TITLE_PREVIOUS_ISSUE' | translate}}"
|
||||
)
|
||||
tg-svg(
|
||||
svg-icon="icon-arrow-left"
|
||||
)
|
||||
a(
|
||||
ng-show="nextUrl"
|
||||
tg-bo-href="nextUrl"
|
||||
title="{{'ISSUES.TITLE_NEXT_ISSUE' | translate}}"
|
||||
|
||||
)
|
||||
tg-svg(
|
||||
svg-icon="icon-arrow-right"
|
||||
)
|
||||
tg-detail-header.detail-header-container(
|
||||
item="issue"
|
||||
project="project"
|
||||
required-perm="modify_issue"
|
||||
ng-class="{blocked: issue.is_blocked}"
|
||||
ng-if="project && issue"
|
||||
)
|
||||
.subheader
|
||||
tg-tag-line.tags-block(
|
||||
ng-if="issue && project"
|
||||
|
|
Loading…
Reference in New Issue