From 0376926dfcb20226c704b433458a56bc9777df9f Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Sun, 21 Apr 2013 15:11:34 +0000 Subject: [PATCH] add percentages to progress bars; tidy translation * If the current language is English, the second "English" column will no longer display. * Progress bars have percentages again. * Some jade logic has been simplified. --- views/project/project.jade | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/views/project/project.jade b/views/project/project.jade index d447388..fa865d7 100644 --- a/views/project/project.jade +++ b/views/project/project.jade @@ -35,9 +35,6 @@ html(lang='#{curr839}') th #{openmilestone} th #{closedmilestone} each milestone in milestones - - var mstone = "milestone" - - var wd = "width:" - - var pc = "%" - var wdth = ((milestone.closed_issues/(milestone.open_issues + milestone.closed_issues))*100) tr(id=mstone+milestone.number) td @@ -45,8 +42,9 @@ html(lang='#{curr839}') #{milestone.title} td div.progress(class=milestone.state) - div.progress-inner(style=wd+wdth+pc)(class=milestone.state) + div.progress-inner(style="width:"+wdth+"%")(class=milestone.state)   + print #{Math.round(wdth)+"%"} td #{milestone.open_issues} td #{milestone.closed_issues} h4 #{languagetranshead} @@ -54,7 +52,8 @@ html(lang='#{curr839}') tr th #{languagecurr} th #{languagenati} - th #{languageeng} + unless (curr839 == "en") + th #{languageeng} th #{languageprog} th #{languagetrans} each language in translation @@ -62,16 +61,19 @@ html(lang='#{curr839}') tr td #{language.local} td #{language.own} - td #{language.english} + unless (curr839 == "en") + td #{language.english} td.prog unless (language.iso == curr839) div.progress(class="open") div.progress-inner(style="width:"+w+"%")(class="open")   + print #{Math.round(w)+"%"} else div.progress(class="closed") div.progress-inner(style="width:"+w+"%")(class="closed")   + print #{Math.round(w)+"%"} td #{language.count} / #{translation.en.count} h4 #{credits} #{thanks}