.row.us-item-row(
    ng-repeat="us in userstories | inArray:visibleUserStories:'ref'"
    tg-bind-scope
    ng-class="{blocked: us.is_blocked}"
    tg-class-permission="{'readonly': '!modify_us'}"
)

    .input(tg-check-permission="modify_us")
        input(
          type="checkbox"
          name=""
        )
    .votes(
        ng-class="{'inactive': !us.total_voters, 'is-voted': us.is_voter}"
        title="{{ 'COMMON.VOTE_BUTTON.COUNTER_TITLE'|translate:{total:us.total_voters||0}:'messageformat' }}"
    )
        tg-svg(svg-icon="icon-upvote")
        span {{ ::us.total_voters }}
    .user-stories
        .tags-block(tg-colorize-backlog-tags="us.tags")
        .user-story-name
            a.clickable(
                href=""
                tg-nav="project-userstories-detail:project=project.slug,ref=us.ref"
                tg-nav-get-params="{\"no-milestone\": 1}"
                title="#{{ us.ref }} {{ us.subject }}"
            )
                span(tg-bo-ref="us.ref")
                span(ng-bind="us.subject")
                tg-belong-to-epics(
                    format="pill"
                    ng-if="us.epics"
                    epics="us.epics"
                )
            .us-settings
                a.e2e-edit.edit-story(
                    href=""
                    tg-check-permission="modify_us"
                    ng-click="ctrl.editUserStory(us.project, us.ref, $event)"
                    title="{{'COMMON.EDIT' | translate}}"
                )
                    tg-svg(svg-icon="icon-edit")

                a.e2e-delete(
                    href=""
                    tg-check-permission="delete_us"
                    ng-click="ctrl.deleteUserStory(us)"
                    title="{{'COMMON.DELETE' | translate}}"
                )
                    tg-svg(svg-icon="icon-trash")

    div.status(tg-us-status="us" on-update="ctrl.updateUserStoryStatus()")
        a.us-status(href="", title="{{'BACKLOG.STATUS_NAME' | translate}}")
            span.us-status-bind
            tg-svg(
                tg-check-permission="modify_us",
                svg-icon="icon-arrow-down"
            )

    div.points(tg-backlog-us-points="us")
        a.us-points(href="", title="{{'COMMON.FIELDS.POINTS' | translate}}")

    a.e2e-drag(tg-check-permission="modify_us", href="", title="{{'COMMON.DRAG' | translate}}")
        tg-svg(svg-icon="icon-drag")
