Sha256: 6d975f63ddb84ec479d827c86c40835fa93ec38b9ea81acbec4cd93298421616
Contents?: true
Size: 1.68 KB
Versions: 60
Compression:
Stored size: 1.68 KB
Contents
<% @proposals.each do |proposal| %> (function() { var $proposalVotesCount = $('#proposal-<%= proposal.id %>-votes-count'); if($proposalVotesCount[0]) { morphdom($proposalVotesCount[0], '<%= j(render partial: "decidim/proposals/proposals/votes_count", locals: { proposal: proposal, from_proposals_list: @from_proposals_list }).strip.html_safe %>'); } var $proposalVoteButton = $('#proposal-<%= proposal.id %>-vote-button'); if($proposalVoteButton[0]) { morphdom($proposalVoteButton[0], '<%= j(render partial: "decidim/proposals/proposals/vote_button", locals: { proposal: proposal, from_proposals_list: @from_proposals_list }).strip.html_safe %>'); } })(); <% end %> <% if vote_limit_enabled? %> (function() { var $remainingVotesCount = $('#remaining-votes-count'); var $notVotedButtons = $('.card__button.button').not('.success'); if(!$remainingVotesCount[0]) { return; } morphdom($remainingVotesCount[0], '<%= j(render partial: "decidim/proposals/proposals/remaining_votes_count").strip.html_safe %>'); <% if remaining_votes_count_for(current_user) == 0 %> $notVotedButtons.attr('disabled', true); $notVotedButtons.val('<%= t("decidim.proposals.proposals.vote_button.no_votes_remaining") %>'); <% else %> $notVotedButtons.attr('disabled', false); $notVotedButtons.val('<%= t("decidim.proposals.proposals.vote_button.vote") %>'); <% end %> }()); <% end %> <% if show_voting_rules? %> (function() { var $votingRules = $('.voting-rules'); if(!$votingRules[0]) { return; } morphdom($votingRules[0], '<%= j(render partial: "decidim/proposals/proposals/voting_rules").strip.html_safe %>'); }()); <% end %>
Version data entries
60 entries across 60 versions & 1 rubygems