extends dummy-layout

block head
    title Taiga  Project management web application with scrum in mind!

block content
    div.wrapper(tg-task-detail, ng-controller="TaskDetailController as ctrl",
                ng-init="section='backlog'")
        div.main.us-detail
            div.us-detail-header
                include views/components/mainTitle
                a.button.button-green(href="", title="Edit", tg-nav="project-tasks-detail-edit:project=project.slug,ref=task.ref") Edit

            section.us-story-main-data
                div.us-title
                    h2.us-title-text
                        span.us-number(tg-bo-html="task.ref")
                        span.us-name(ng-bind="task.subject")
                    div.issue-nav
                        a.icon.icon-arrow-left(ng-show="nextUrl", href="{{ nextUrl }}", title="next task")
                        a.icon.icon-arrow-right(ng-show="previousUrl",href="{{ previousUrl }}", title="previous task")

                div.blocked-warning(ng-show="task.is_blocked")
                    span.icon.icon-warning
                    p.blocked Blocked!
                    p(tg-bind-html="task.blocked_note || 'This task is blocked'")

                div.user-story-tags(tg-tag-line, ng-model="task.tags")

            section.us-content.wysiwyg(tg-bind-html="task.description_html")

            // include views/modules/attachments
            section.us-activity
                ul.us-activity-tabs
                    li
                        a.active(href="#")
                            span.icon.icon-bulk
                            span.tab-title Comments

                    li
                        a(href="#")
                            span.icon.icon-issues
                            span.tab-title Activity

                include views/modules/comments
                include views/modules/activity

        sidebar.menu-secondary.sidebar
            section.us-status(tg-task-status, ng-model="task")
            section.us-assigned-to(tg-assigned-to, ng-model="task")
            section.watchers(tg-watchers, ng-model="task")

            section.us-detail-settings
                span.button.button-gray(href="", title="Is iocaine", ng-class="task.is_iocaine ? 'active' : ''") Iocaine
