Reafactoring assign to

stable
Daniel García 2018-08-31 15:18:13 +02:00 committed by Alex Hermida
parent 4c423f8ec4
commit cecfac0a02
7 changed files with 28 additions and 35 deletions

View File

@ -12,7 +12,7 @@
.assigned-to
.assigned-to-options
.assigned-to-actions
span.assigned-name(
ng-if="!isEditable && fullNameVisible"
) {{ fullName }}
@ -51,7 +51,7 @@
span(translate="COMMON.OR", ng-if="isUnassigned")
div(ng-if="isUnassigned")
a.assign-to-me(
a.self-assign(
href="#"
ng-click="selfAssign()"
title="{{'COMMON.ASSIGNED_TO.SELF' | translate}}"

View File

@ -11,34 +11,27 @@
tg-svg(svg-icon="icon-iocaine")
.assigned-to
.assigned-to-options
span.assigned-name(
ng-if="!isEditable && fullNameVisible"
) {{ fullName }}
span.user-assigned(
title="{{ 'COMMON.ASSIGNED_TO.TITLE_ACTION_EDIT_ASSIGNMENT'|translate }}"
ng-class="{ 'editable': isEditable }"
.assigned-to-actions
span(ng-if="fullNameVisible")
a.user-assigned.assigned-name(
ng-if="isEditable"
title="{{ 'COMMON.ASSIGNED_TO.TITLE_ACTION_EDIT_ASSIGNMENT' | translate }}"
ng-class="{ 'editable': isEditable }"
ng-click="assign()"
)
span.assigned-name
span(ng-if="fullNameVisible") {{ fullName }}
) {{ fullName }}
span.assigned-name(
ng-if="!isEditable"
) {{ fullName }}
span(ng-if="isUnassigned")
span(ng-if="fullNameVisible")
|  
span(translate="COMMON.OR")
|  
a.assign-to-me(
href="#"
title="{{'COMMON.ASSIGNED_TO.SELF' | translate}}"
ng-click="selfAssign()"
)
span {{ "COMMON.ASSIGNED_TO.SELF" | translate }}
a.self-assign(href="#", ng-click="selfAssign()") {{ "COMMON.ASSIGNED_TO.SELF" | translate }}
tg-svg.remove-user(
ng-click="unassign()"
ng-if="isEditable && !isUnassigned"
svg-icon="icon-close",
title="{{'COMMON.ASSIGNED_TO.DELETE_ASSIGNMENT' | translate}}"
title="{{ 'COMMON.ASSIGNED_TO.DELETE_ASSIGNMENT' | translate }}"
)

View File

@ -53,7 +53,7 @@ div(ng-if="isAssigned")
|  
span(translate="COMMON.OR")
|  
a.assign-to-me(
a.self-assign(
href="#"
ng-click="selfAssign()"
title="{{'COMMON.ASSIGNED_TO.SELF' | translate}}"

View File

@ -25,7 +25,7 @@
span(ng-if="!isAssigned")
span(translate="COMMON.OR")
|  
a.assign-to-me(
a.self-assign(
href="#"
title="{{'COMMON.ASSIGNED_TO.SELF' | translate}}"
ng-click="selfAssign()"

View File

@ -55,7 +55,7 @@
display: block;
margin: .2rem 0 .25rem;
}
.assigned-to-options {
.assigned-to-actions {
align-content: center;
display: flex;
a {
@ -63,7 +63,7 @@
}
}
.user-assigned,
.assign-to-me {
.self-assign {
color: $primary;
cursor: default;
&:hover {
@ -89,7 +89,7 @@
}
}
.user-assigned,
.assign-to-me {
.self-assign {
color: $primary;
&:hover {
color: currentColor;

View File

@ -58,7 +58,7 @@
}
.user-assigned,
.assign-to-me {
.self-assign {
color: $primary;
&.editable {
color: $primary;
@ -87,7 +87,7 @@
margin-left: .5rem;
}
.assigned-to-options {
.assigned-to-actions {
align-content: center;
display: flex;
a {
@ -95,7 +95,7 @@
}
}
.user-assigned,
.assign-to-me {
.self-assign {
color: $primary;
cursor: default;
&:hover {

View File

@ -704,7 +704,7 @@
flex-direction: column;
margin: 0;
}
.assigned-to-options {
.assigned-to-actions {
display: block;
}
.remove-user {