Add interactions only if user can edit

stable
Xavier Julián 2014-10-30 14:05:17 +01:00 committed by David Barragán Merino
parent 0277a1ad82
commit 4260e2e855
2 changed files with 11 additions and 2 deletions

View File

@ -53,7 +53,7 @@ RelatedTaskRowDirective = ($repo, $compile, $confirm, $rootscope, $loading) ->
</a> </a>
</div> </div>
<div tg-related-task-assigned-to-inline-edition="task" class="assigned-to"> <div tg-related-task-assigned-to-inline-edition="task" class="assigned-to">
<div title="Assigned to" class="task-assignedto"> <div title="Assigned to" class="task-assignedto <% if(perms.modify_task) { %>editable<% } %>">
<figure class="avatar"></figure> <figure class="avatar"></figure>
<% if(perms.modify_task) { %> <% if(perms.modify_task) { %>
<span class="icon icon-arrow-bottom"></span> <span class="icon icon-arrow-bottom"></span>

View File

@ -61,6 +61,12 @@
.status { .status {
position: relative; position: relative;
text-align: left; text-align: left;
&:hover {
.icon {
@include transition (opacity .2s ease-in);
opacity: 1;
}
}
.not-clickable { .not-clickable {
&:hover { &:hover {
color: $grayer; color: $grayer;
@ -78,6 +84,7 @@
.icon { .icon {
color: $gray-light; color: $gray-light;
margin-left: .2rem; margin-left: .2rem;
opacity: 0;
} }
} }
.pop-status { .pop-status {
@ -165,8 +172,10 @@
text-align: left; text-align: left;
} }
.task-assignedto { .task-assignedto {
cursor: pointer;
position: relative; position: relative;
&.editable {
cursor: pointer;
}
&:hover { &:hover {
.icon { .icon {
@include transition(opacity .3s linear); @include transition(opacity .3s linear);