diff --git a/index.html b/index.html index 09572c5..f94dc27 100644 --- a/index.html +++ b/index.html @@ -170,7 +170,7 @@
Ela se tornará pública em até 24 horas após o envio e poderá ser apoiada por outros participantes.
Envie Sua Proposta
Login
-
+
diff --git a/js/handlebars-helpers.js b/js/handlebars-helpers.js index e17a2be..dccde10 100644 --- a/js/handlebars-helpers.js +++ b/js/handlebars-helpers.js @@ -74,12 +74,20 @@ define(['handlebars'], function(Handlebars){ ret += ''; return ret; }); - + Handlebars.registerHelper('trimString', function(passedString, endstring) { var theString = passedString.substring(0, endstring); return new Handlebars.SafeString(theString) }); - + + Handlebars.registerHelper('proposal_action', function(discussion, target) { + if(discussion.setting && discussion.setting.moderate_proposals) { + return '/api/v1/articles/'+target.id+'/children/suggest'; + } else { + return '/api/v1/articles/'+target.id+'/children'; + } + }); + function proposal_has_category(proposal, category_slug) { for(var i=0; i