diff --git a/index.html b/index.html index 9d69ad4..168ad30 100644 --- a/index.html +++ b/index.html @@ -298,21 +298,23 @@ Propostas - {{!-- Apoio --}} - {{!-- Participacao --}} - Pontuação + Apoio + Participação - {{#each articles}} + {{#each proposals}}

{{abstract}}

- {{votes_for}} - {{votes_against}} - {{!-- {{#apoio .}}{{/apoio}} --}} - {{!-- {{#participacao .}}{{/participacao}} --}} - {{#score .}}{{/score}} + {{votes_for}} + {{votes_against}} + {{#round effective_support}}{{/round}} + {{#round effective_participation}}{{/round}} {{/each}} +
+ Atualizado + +
diff --git a/js/handlebars-helpers.js b/js/handlebars-helpers.js index df3ec76..4b8b4af 100644 --- a/js/handlebars-helpers.js +++ b/js/handlebars-helpers.js @@ -60,21 +60,7 @@ define(['handlebars'], function(Handlebars){ Handlebars.registerHelper('replace', function(string, to_replace, replacement) { return (string || '').replace(new RegExp(to_replace, 'g'), replacement); }); - - Handlebars.registerHelper('score', function(article) { - return article.votes_for - article.votes_against; - }); - - Handlebars.registerHelper('apoio', function(article) { - // return (article.votes_for - article.votes_against)/(article.countViews); - return 0; - }); - - Handlebars.registerHelper('participacao', function(article) { - // return (article.votes_for + article.votes_against)/(article.countViews); - return 0; - }); - + Handlebars.registerHelper('select_proposal', function(proposals, category_slug, selected_id) { var ret = '' ret = ret + '