.card-owner
    .card-owner-info(ng-if="vm.item.get('assigned_to') && (!vm.hasMultipleAssignedUsers() || !vm.visible('owner'))")
        .card-owner-avatar
            img(
                ng-class="{'is-iocaine': vm.item.getIn(['model', 'is_iocaine'])}"
                tg-avatar="vm.item.get('assigned_to')"
            )
        span.card-owner-name(ng-if="vm.visible('owner') && !vm.hasMultipleAssignedUsers()") {{vm.item.getIn(['assigned_to', 'full_name'])}}
        div(ng-if="!vm.visible('owner')")
            include card-title

    .card-owner-info.multiple(ng-if="vm.item.get('assigned_to') && vm.hasMultipleAssignedUsers() && vm.visible('owner')")
        .card-owner-avatar(tg-repeat="assignedUser in vm.item.get('assigned_users')")
            img(
                ng-class="{'is-iocaine': vm.item.getIn(['model', 'is_iocaine'])}"
                tg-avatar="assignedUser"
            )
        div(ng-if="!vm.visible('owner')")
            include card-title

    .card-owner-info(ng-if="!vm.item.get('assigned_to')")
        img(ng-src="/#{v}/images/unnamed.png")
        span.card-owner-name(
            ng-if="vm.visible('owner')",
            translate="COMMON.ASSIGNED_TO.NOT_ASSIGNED"
        )
        div(ng-if="!vm.visible('owner')")
            include card-title

    .card-owner-actions(
        ng-if="vm.visible('owner')"
        tg-check-permission="{{vm.getModifyPermisionKey()}}"
    )
        a.e2e-assign.card-owner-assign(
            ng-click="!$event.ctrlKey && !$event.metaKey && vm.onClickAssignedTo({id: vm.item.get('id')})"
            href=""
          )
            tg-svg(svg-icon="icon-add-user")
            span(translate="COMMON.CARD.ASSIGN_TO")

        div.card-actions
            a.e2e-edit.card-edit(
                href=""
                ng-click="!$event.ctrlKey && !$event.metaKey && vm.onClickEdit({id: vm.item.get('id')})"
                tg-loading="vm.item.get('loading-edit')"
                title="{{ 'COMMON.CARD.EDIT' | translate }}"
            )
                tg-svg(svg-icon="icon-edit", svg-title="{{ 'COMMON.CARD.EDIT' | translate }}")
            a.e2e-edit.card-edit(
                href=""
                ng-if="vm.item.get('modelName') == 'issues'"
                ng-click="!$event.ctrlKey && !$event.metaKey && vm.onClickRemove({id: vm.item.get('id')})"
                tg-loading="vm.item.get('loading-remove-from-sprint')"
                title="{{ 'COMMON.CARD.DETACH_ISSUE_FROM_SPRINT' | translate }}"
            )
                tg-svg(svg-icon="icon-close", svg-title="{{ 'COMMON.CARD.DETACH_ISSUE_FROM_SPRINT' | translate }}")
            a.e2e-edit.card-delete(
                href=""
                ng-click="!$event.ctrlKey && !$event.metaKey && vm.onClickDelete({id: vm.item.get('id')})"
                tg-loading="vm.item.get('loading-delete')"
                ng-attr-title="{{ vm.item.get('modelName') == 'issues' ? 'COMMON.CARD.DELETE_ISSUE' : 'COMMON.CARD.DELETE' | translate }}"
                tg-check-permission="{{vm.getDeletePermisionKey()}}"
            )
                tg-svg(svg-icon="icon-trash", svg-title="{{ vm.item.get('modelName') == 'issues' ? 'COMMON.CARD.DELETE_ISSUE' : 'COMMON.CARD.DELETE' | translate }}")
