diff --git a/app/coffee/modules/backlog/main.coffee b/app/coffee/modules/backlog/main.coffee
index 36719ed7..69beb617 100644
--- a/app/coffee/modules/backlog/main.coffee
+++ b/app/coffee/modules/backlog/main.coffee
@@ -91,6 +91,8 @@ class BacklogController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.F
@scope.$on("sprintform:remove:success", @.loadUserstories)
@scope.$on("usform:new:success", @.loadUserstories)
@scope.$on("usform:edit:success", @.loadUserstories)
+ @scope.$on("usform:new:success", @.loadProjectStats)
+ @scope.$on("usform:bulk:success", @.loadProjectStats)
@scope.$on("sprint:us:move", @.moveUs)
@scope.$on("sprint:us:moved", @.loadSprints)
@scope.$on("sprint:us:moved", @.loadProjectStats)
@@ -968,3 +970,52 @@ tgBacklogGraphDirective = ->
module.directive("tgGmBacklogGraph", tgBacklogGraphDirective)
+
+
+#############################################################################
+## Backlog progress bar directive
+#############################################################################
+
+TgBacklogProgressBarDirective = ->
+ template = _.template("""
+
+
+
+ """)
+
+ render = (el, projectPointsPercentaje, closedPointsPercentaje) ->
+ el.html(template({
+ projectPointsPercentaje: projectPointsPercentaje,
+ closedPointsPercentaje:closedPointsPercentaje
+ }))
+
+ adjustPercentaje = (percentage) ->
+ adjusted = _.max([0 , percentage])
+ adjusted = _.min([100, adjusted])
+ return Math.round(adjusted)
+
+ link = ($scope, $el, $attrs) ->
+ element = angular.element($el)
+
+ $scope.$watch $attrs.tgBacklogProgressBar, (stats) ->
+ if stats?
+ totalPoints = stats.total_points
+ definedPoints = stats.defined_points
+ closedPoints = stats.closed_points
+ if definedPoints > totalPoints
+ projectPointsPercentaje = totalPoints * 100 / definedPoints
+ closedPointsPercentaje = closedPoints * 100 / definedPoints
+ else
+ projectPointsPercentaje = 100
+ closedPointsPercentaje = closedPoints * 100 / totalPoints
+
+ projectPointsPercentaje = adjustPercentaje(projectPointsPercentaje - 3)
+ closedPointsPercentaje = adjustPercentaje(closedPointsPercentaje - 3)
+ render($el, projectPointsPercentaje, closedPointsPercentaje)
+
+ $scope.$on "$destroy", ->
+ $el.off()
+
+ return {link: link}
+
+module.directive("tgBacklogProgressBar", TgBacklogProgressBarDirective)
diff --git a/app/coffee/modules/taskboard/main.coffee b/app/coffee/modules/taskboard/main.coffee
index ebe51465..a5b98e69 100644
--- a/app/coffee/modules/taskboard/main.coffee
+++ b/app/coffee/modules/taskboard/main.coffee
@@ -117,6 +117,8 @@ class TaskboardController extends mixOf(taiga.Controller, taiga.PageMixin)
@scope.stats.completedPercentage = Math.round(100 * stats.completedPointsSum / stats.totalPointsSum)
else
@scope.stats.completedPercentage = 0
+
+ @scope.stats.openTasks = stats.total_tasks - stats.completed_tasks
return stats
refreshTagsColors: ->
@@ -211,7 +213,8 @@ TaskboardDirective = ($rootscope) ->
$el.on "click", ".toggle-analytics-visibility", (event) ->
event.preventDefault()
target = angular.element(event.currentTarget)
- toggleText(target, ["Hide statistics", "Show statistics"]) # TODO: i18n
+ target.toggleClass('active');
+ #toggleText(target, ["Hide statistics", "Show statistics"]) # TODO: i18n
$rootscope.$broadcast("taskboard:graph:toggle-visibility")
tableBodyDom = $el.find(".taskboard-table-body")
diff --git a/app/fonts/taiga.eot b/app/fonts/taiga.eot
index dea55db9..7a6a04e8 100644
Binary files a/app/fonts/taiga.eot and b/app/fonts/taiga.eot differ
diff --git a/app/fonts/taiga.svg b/app/fonts/taiga.svg
index 56a5973d..3c640f2f 100644
--- a/app/fonts/taiga.svg
+++ b/app/fonts/taiga.svg
@@ -37,12 +37,12 @@
-
-
-
-
-
+
+
+
+
+
-
+
diff --git a/app/fonts/taiga.ttf b/app/fonts/taiga.ttf
index 38083689..fac99541 100644
Binary files a/app/fonts/taiga.ttf and b/app/fonts/taiga.ttf differ
diff --git a/app/fonts/taiga.woff b/app/fonts/taiga.woff
index eaf0682e..1c12ca6a 100644
Binary files a/app/fonts/taiga.woff and b/app/fonts/taiga.woff differ
diff --git a/app/partials/views/components/large-summary.jade b/app/partials/views/components/large-summary.jade
index d9d73440..a20b326d 100644
--- a/app/partials/views/components/large-summary.jade
+++ b/app/partials/views/components/large-summary.jade
@@ -35,4 +35,4 @@ div.summary.large-summary
span.icon.icon-iocaine
span.number 10
span.description iocanie
doses
- a.button.button-green.toggle-analytics-visibility(href="", title="Show statistics") Show statistics
+ a.icon.icon-stats.toggle-analytics-visibility(href="", title="Show statistics")
diff --git a/app/partials/views/components/sprint-summary.jade b/app/partials/views/components/sprint-summary.jade
index 55ecef1e..71c4e124 100644
--- a/app/partials/views/components/sprint-summary.jade
+++ b/app/partials/views/components/sprint-summary.jade
@@ -11,17 +11,11 @@ div.summary.large-summary
li
span.number(ng-bind="stats.completedPointsSum|default:'--'")
span.description completed
points
- li
- span.number(ng-bind="stats.remainingPointsSum|default:'--'")
- span.description remaining
points
ul
li
span.icon.icon-bulk
- span.number(ng-bind="stats.total_tasks|default:'--'")
- span.description created
tasks
- li
- span.number(ng-bind="stats.remainingTasks|default:'--'")
+ span.number(ng-bind="stats.openTasks|default:'--'")
span.description open
tasks
li
span.number(ng-bind="stats.completed_tasks|default:'--'")
@@ -33,4 +27,4 @@ div.summary.large-summary
span.number(ng-bind="stats.iocaine_doses|default:'--'")
span.description iocaine
doses
- a.button.button-green.toggle-analytics-visibility(href="", title="Show statistics") Show statistics
+ a.icon.icon-stats.toggle-analytics-visibility(href="", title="Show statistics")
diff --git a/app/partials/views/components/summary.jade b/app/partials/views/components/summary.jade
index 3ad90218..f8031e8e 100644
--- a/app/partials/views/components/summary.jade
+++ b/app/partials/views/components/summary.jade
@@ -1,6 +1,6 @@
div.summary
- div.summary-progress-bar(tg-progress-bar="stats.completedPercentage")
- div.current-progress(style="width: {{stats.completedPercentage}}")
+ div.summary-progress-bar(tg-backlog-progress-bar="stats")
+
div.data
span.number(tg-bind-html="stats.completedPercentage + '%'")
ul
@@ -10,9 +10,9 @@ div.summary
li
span.number(tg-bind-html="stats.defined_points") --
span.description defined
points
- li
- span.number(tg-bind-html="stats.assigned_points") --
- span.description assigned
points
li
span.number(tg-bind-html="stats.closed_points") --
span.description closed
points
+ li
+ span.number(tg-bind-html="stats.speed | number:0") --
+ span.description points /
sprint
diff --git a/app/styles/components/summary.scss b/app/styles/components/summary.scss
index 8f26a867..ded6fa1e 100644
--- a/app/styles/components/summary.scss
+++ b/app/styles/components/summary.scss
@@ -15,7 +15,7 @@
}
.data {
float: left;
- margin-right: 1.5em;
+ margin-right: 1em;
margin-top: 4px;
.number {
color: $fresh-taiga;
@@ -53,11 +53,26 @@
margin-right: 10px;
padding: 3px;
position: relative;
- width: 20%;
+ width: 15%;
.current-progress {
background: $fresh-taiga;
height: 24px;
- width: calc(30% - 4px);
+ }
+ .defined-points {
+ background: $red-light;
+ height: 24px;
+ position: absolute;
+ width: calc(100% - 6px);
+ }
+ .project-points-progress {
+ background: $white;
+ height: 24px;
+ position: absolute;
+ }
+ .closed-points-progress {
+ background: $fresh-taiga;
+ height: 24px;
+ position: absolute;
}
}
@@ -67,7 +82,7 @@
border-right: 1px solid $whitish;
margin-right: 1rem;
vertical-align: top;
- &:last-child {
+ &:last-of-type {
border: 0;
margin: 0;
}
@@ -75,8 +90,22 @@
.icon {
@extend %xlarge;
margin-right: .4rem;
- }
- .button {
- color: $white;
+ &.icon-stats {
+ @include transition(color .3s linear);
+ color: $gray;
+ display: inline-block;
+ float: right;
+ &:hover {
+ @include transition(color .3s linear);
+ color: $fresh-taiga;
+ }
+ &.active {
+ color: $fresh-taiga;
+ &:hover {
+ @include transition(color .3s linear);
+ color: $gray;
+ }
+ }
+ }
}
}
diff --git a/app/styles/dependencies/typography.scss b/app/styles/dependencies/typography.scss
index df6a227c..8ea1f17b 100755
--- a/app/styles/dependencies/typography.scss
+++ b/app/styles/dependencies/typography.scss
@@ -232,19 +232,19 @@ a:visited {
content: 'D';
}
.icon-caret-up:before {
- content: 'F';
+ content: 'E';
}
.icon-caret-down:before {
- content: 'G';
+ content: 'F';
}
.icon-bulk:before {
- content: 'H';
+ content: 'G';
}
.icon-idea:before {
- content: 'I';
+ content: 'H';
}
.icon-spinner:before {
- content: 'E';
+ content: 'I';
}
.icon-minimize:before {
content: 'J';
@@ -252,6 +252,7 @@ a:visited {
.icon-maximize:before {
content: 'K';
}
-.icon-megaphone:before {
+.icon-stats:before {
content: 'L';
}
+