section.sprints
    header
        h1 SPRINTS
        div.summary
            ul
                li
                    span.number(tg-bind-html="sprintsCounter") --
                    span.description <br/>sprints
            div.new-sprint
              a.button.button-green(ng-click="ctrl.addNewSprint()", href="", title="Add New US")
                span.text + New sprint

    section.sprint(ng-repeat="sprint in sprints track by sprint.id", tg-backlog-sprint="sprint")
        header
            div.sprint-name
                a.icon.icon-arrow-up(href="", title="compact Sprint")
                span {{ sprint.name }}
                a.icon.icon-edit(href="", title="Edit Sprint")
            div.sprint-summary
                div.sprint-date(tg-date-range="sprint.estimated_start,sprint.estimated_finish")
                ul
                    li
                        span.number(ng-bind="sprint.closed_points|default:''") --
                        span.description closed
                    li
                        span.number(ng-bind="sprint.total_points|default:''")
                        span.description total
        div.sprint-progress-bar
            div.current-progress(tg-sprint-progressbar="sprint")
        div.sprint-table
            div.row.milestone-us-item-row(ng-repeat="us in sprint.user_stories|orderBy:order track by us.id")
                div.column-us.width-8
                    a.us-name.clickable(tg-nav="project-userstories-detail:project=project.slug,ref=us.ref", title="")
                        span(tg-bo-ref="us.ref")
                        span(tg-bo-html="us.subject")
                div.column-points.width-1(tg-bo-html="us.total_points")
        a.button.button-gray(href="", tg-nav="project-taskboard:project=project.slug,sprint=sprint.id",
                             title="Current Sprint Taskboard")
            span Sprint Taskboard
