Show related user stories section only if it's needed

stable
David Barragán Merino 2016-09-22 12:14:24 +02:00
parent 1d9a405a76
commit a0e95d36ca
2 changed files with 6 additions and 1 deletions

View File

@ -29,6 +29,9 @@ class RelatedUserStoriesController
@.sectionName = "Epics"
@.showCreateRelatedUserstoriesLightbox = false
showRelatedUserStoriesSection: () ->
return @projectService.hasPermission("modify_epic") or @.userstories?.legth > 0
userCanSort: () ->
return @projectService.hasPermission("modify_epic")

View File

@ -1,4 +1,6 @@
section.related-userstories
section.related-userstories(
ng-if="vm.showRelatedUserStoriesSection()"
)
.related-userstories-header
span.related-userstories-title(translate="COMMON.RELATED_USERSTORIES")
tg-related-userstories-create(