header(tg-backlog-sprint-header, ng-model="sprint")

div.sprint-progress-bar(tg-progress-bar="100 * sprint.closed_points / sprint.total_points")

div.sprint-table
    div.row.milestone-us-item-row(ng-repeat="us in sprint.user_stories track by us.id", tg-bind-scope)
        div.column-us
            a.us-name.clickable(tg-nav="project-userstories-detail:project=project.slug,ref=us.ref",
                                tg-nav-get-params="{\"milestone\": {{us.milestone}}}"
                                tg-bo-title="'#' + us.ref + ' ' +  us.subject",
                                ng-class="{closed: us.is_closed, blocked: us.is_blocked}")
                span(tg-bo-ref="us.ref")
                span(tg-bo-bind="us.subject")
        div.column-points.width-1(tg-bo-bind="us.total_points",
                                  ng-class="{closed: us.is_closed, blocked: us.is_blocked}")

a.button-gray(title="{{ 'BACKLOG.SPRINTS.TITLE_LINK_TASKBOARD' | translate:sprint }}",
              tg-nav="project-taskboard:project=project.slug,sprint=sprint.slug",
              tg-check-permission="view_milestones")

    span(translate="BACKLOG.SPRINTS.LINK_TASKBOARD")
