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

View File

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

View File

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

View File

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

View File

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

View File

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