Team statistics styles
parent
a4f65b947a
commit
a1d09e75c4
|
@ -80,10 +80,13 @@ class TeamController extends mixOf(taiga.Controller, taiga.PageMixin)
|
|||
|
||||
processStat: (stat) ->
|
||||
max = _.max(stat)
|
||||
min = _.min(stat)
|
||||
singleStat = _.map stat, (value, key) ->
|
||||
if value == max
|
||||
return [key, 1]
|
||||
return [key, (value * 0.3) / max]
|
||||
else if value == min
|
||||
return [key, 0.1]
|
||||
return [key, (value * 0.5) / max]
|
||||
singleStat = _.object(singleStat)
|
||||
return singleStat
|
||||
|
||||
|
@ -150,22 +153,22 @@ TeamMembersDirective = () ->
|
|||
</figure>
|
||||
</div>
|
||||
<div class="attribute">
|
||||
<span class="icon icon-edit" ng-style="{'opacity': stats.closed_tasks[user.user_id]}"></span>
|
||||
<span class="icon icon-briefcase" ng-style="{'opacity': stats.closed_bugs[user.user]}" ng-class="{'top': stats.closed_bugs[user.user] == 1}"></span>
|
||||
</div>
|
||||
<div class="attribute">
|
||||
<span class="icon icon-github"></span>
|
||||
<span class="icon icon-iocaine" ng-style="{'opacity': stats.iocaine_tasks[user.user]}" ng-class="{'top': stats.iocaine_tasks[user.user] == 1}"></span>
|
||||
</div>
|
||||
<div class="attribute">
|
||||
<span class="icon icon-github"></span>
|
||||
<span class="icon icon-writer" ng-style="{'opacity': stats.wiki_changes[user.user]}" ng-class="{'top': stats.wiki_changes[user.user] == 1}"></span>
|
||||
</div>
|
||||
<div class="attribute">
|
||||
<span class="icon icon-github"></span>
|
||||
<span class="icon icon-bug" ng-style="{'opacity': stats.created_bugs[user.user]}" ng-class="{'top': stats.created_bugs[user.user] == 1}"></span>
|
||||
</div>
|
||||
<div class="attribute">
|
||||
<span class="icon icon-github top"></span>
|
||||
<span class="icon icon-tasks" ng-style="{'opacity': stats.closed_tasks[user.user]}" ng-class="{'top': stats.closed_tasks[user.user] == 1}"></span>
|
||||
</div>
|
||||
<div class="attribute">
|
||||
<span class="points">666</span>
|
||||
<span class="points"></span>
|
||||
</div>
|
||||
</div>
|
||||
"""
|
||||
|
|
|
@ -2,25 +2,25 @@ section.table-team.basic-table
|
|||
header.row.team-header
|
||||
div.username
|
||||
div.attribute.attribute-name
|
||||
span Bug Killer
|
||||
span Mr. Wolf
|
||||
div.popover.attribute-explanation
|
||||
span Thanks to you, this project still steady!
|
||||
span I see, you solve issues!
|
||||
div.attribute
|
||||
span Poison Drinker
|
||||
div.popover.attribute-explanation
|
||||
span Hey, are you a iocaine-holic?
|
||||
div.attribute
|
||||
span Brown Dispatcher
|
||||
span Cervantes
|
||||
div.popover.attribute-explanation
|
||||
span Oh, stop dealing work!
|
||||
span You have no fear to the blank page!
|
||||
div.attribute
|
||||
Total Brown Eater
|
||||
Total Bug Hunter
|
||||
div.popover.attribute-explanation
|
||||
span Oh, poor devil, you are valuable!
|
||||
span Thaks to you, this project still alive.
|
||||
div.attribute
|
||||
span Chatter
|
||||
span Night Shift
|
||||
div.popover.attribute-explanation
|
||||
span This is not a chat... but I love your comments!
|
||||
span Poor Devil, you work too much.
|
||||
div.attribute
|
||||
Total Power
|
||||
div.popover.attribute-explanation
|
||||
|
@ -32,4 +32,4 @@ h2
|
|||
span Team >
|
||||
span {{filtersRole.name || "All"}}
|
||||
|
||||
section.table-team.basic-table(tg-team-members, memberships="memberships", filtersq="filtersQ", filtersrole="filtersRole")
|
||||
section.table-team.basic-table(tg-team-members, memberships="memberships", stats="stats", filtersq="filtersQ", filtersrole="filtersRole")
|
||||
|
|
|
@ -255,3 +255,15 @@ a:visited {
|
|||
.icon-help:before {
|
||||
content: 'U';
|
||||
}
|
||||
.icon-bug:before {
|
||||
content: 'Q';
|
||||
}
|
||||
.icon-briefcase:before {
|
||||
content: 'R';
|
||||
}
|
||||
.icon-writer:before {
|
||||
content: 'S';
|
||||
}
|
||||
.icon-tasks:before {
|
||||
content: 'T';
|
||||
}
|
||||
|
|
|
@ -13,6 +13,9 @@
|
|||
.points {
|
||||
@extend %xlarge;
|
||||
color: $grayer;
|
||||
&.top {
|
||||
color: $fresh-taiga;
|
||||
}
|
||||
}
|
||||
.points {
|
||||
@extend %title;
|
||||
|
|
Loading…
Reference in New Issue