Use double quotes inside ERB

We were using single quotes inside ERB code when that code was inside
HTML double quotes.
This commit is contained in:
Javi Martín
2019-03-25 13:31:26 +01:00
parent 4c35df4812
commit 3e4e65ead7
65 changed files with 107 additions and 107 deletions

View File

@@ -1 +1 @@
$("#investments").html('<%= j render("admin/budget_investments/investments") %>'); $("#investments").html("<%= j render("admin/budget_investments/investments") %>");

View File

@@ -1 +1 @@
$("#<%= dom_id(@investment) %>").html('<%= j render("select_investment", investment: @investment) %>'); $("#<%= dom_id(@investment) %>").html("<%= j render("select_investment", investment: @investment) %>");

View File

@@ -52,7 +52,7 @@
<% end %> <% end %>
</td> </td>
<td class="text-center"> <td class="text-center">
<span class="budget-phase-enabled <%= phase.enabled? ? 'enabled' : 'disabled' %>"></span> <span class="budget-phase-enabled <%= phase.enabled? ? "enabled" : "disabled" %>"></span>
</td> </td>
<td> <td>
<%= link_to t("admin.budgets.edit.edit_phase"), <%= link_to t("admin.budgets.edit.edit_phase"),

View File

@@ -1 +1 @@
$("#<%= dom_id(@proposal) %> .select").html('<%= j render("select_proposal", proposal: @proposal) %>'); $("#<%= dom_id(@proposal) %> .select").html("<%= j render("select_proposal", proposal: @proposal) %>");

View File

@@ -1 +1 @@
$("#<%= dom_id(@booth) %>").html('<%= j render("booth_assignment", booth: @booth, booth_assignment: @booth.assignment_on_poll(@poll)) %>'); $("#<%= dom_id(@booth) %>").html("<%= j render("booth_assignment", booth: @booth, booth_assignment: @booth.assignment_on_poll(@poll)) %>");

View File

@@ -1 +1 @@
$("#<%= dom_id(@booth) %>").html('<%= j render("booth_assignment", booth: @booth, booth_assignment: @booth.assignment_on_poll(@poll)) %>'); $("#<%= dom_id(@booth) %>").html("<%= j render("booth_assignment", booth: @booth, booth_assignment: @booth.assignment_on_poll(@poll)) %>");

View File

@@ -1 +1 @@
$("#search-booths-results").html("<%= j render 'search_booths_results' %>"); $("#search-booths-results").html("<%= j render "search_booths_results" %>");

View File

@@ -83,7 +83,7 @@
<tbody> <tbody>
<% (@poll.starts_at.to_date..@poll.ends_at.to_date).each do |voting_date| %> <% (@poll.starts_at.to_date..@poll.ends_at.to_date).each do |voting_date| %>
<% system_count = @voters_by_date[voting_date].present? ? @voters_by_date[voting_date].size : 0 %> <% system_count = @voters_by_date[voting_date].present? ? @voters_by_date[voting_date].size : 0 %>
<tr id="recounting_<%= voting_date.strftime('%Y%m%d') %>"> <tr id="recounting_<%= voting_date.strftime("%Y%m%d") %>">
<td><%= l voting_date %></td> <td><%= l voting_date %></td>
<td class="text-center"><%= system_count %></td> <td class="text-center"><%= system_count %></td>
</tr> </tr>

View File

@@ -1 +1 @@
$("#search-officers-results").html("<%= j render 'search_officers_results' %>"); $("#search-officers-results").html("<%= j render "search_officers_results" %>");

View File

@@ -1 +1 @@
$("#search-result").html("<%= j render 'officer', officer: @officer %>"); $("#search-result").html("<%= j render "officer", officer: @officer %>");

View File

@@ -1 +1 @@
$("#search-result").html("<div class=\"callout alert\"><%= j t('admin.poll_officers.search.user_not_found') %></div>"); $("#search-result").html("<div class=\"callout alert\"><%= j t("admin.poll_officers.search.user_not_found") %></div>");

View File

@@ -42,7 +42,7 @@
</div> </div>
</div> </div>
<div id="geozones" style="<%= @poll.geozone_restricted? ? '' : 'display:none' %>"> <div id="geozones" style="<%= @poll.geozone_restricted? ? "" : "display:none" %>">
<div class="row"> <div class="row">
<%= f.collection_check_boxes(:geozone_ids, @geozones, :id, :name) do |b| %> <%= f.collection_check_boxes(:geozone_ids, @geozones, :id, :name) do |b| %>
<div class="small-6 medium-3 column"> <div class="small-6 medium-3 column">

View File

@@ -43,7 +43,7 @@
<%= link_to booth_assignment.booth.name, admin_poll_booth_assignment_path(@poll, booth_assignment, anchor: "tab-recounts") %> <%= link_to booth_assignment.booth.name, admin_poll_booth_assignment_path(@poll, booth_assignment, anchor: "tab-recounts") %>
</strong> </strong>
</td> </td>
<td class="text-center <%= 'count-error' if total_recounts.to_i != system_count %>"> <td class="text-center <%= "count-error" if total_recounts.to_i != system_count %>">
<% if total_recounts.present? %> <% if total_recounts.present? %>
<strong><%= total_recounts %></strong> <strong><%= total_recounts %></strong>
<% else %> <% else %>

View File

@@ -1 +1 @@
$("#search-officers-results").html("<%= j render 'search_officers_results' %>"); $("#search-officers-results").html("<%= j render "search_officers_results" %>");

View File

@@ -8,7 +8,7 @@
<th><%= t("admin.spending_proposals.summary.cost_for_geozone") %></th> <th><%= t("admin.spending_proposals.summary.cost_for_geozone") %></th>
<% spending_proposals.each do |geozone, price| %> <% spending_proposals.each do |geozone, price| %>
<tr id="<%= geozone.present? ? dom_id(geozone) : 'geozone_all_city' %>"> <tr id="<%= geozone.present? ? dom_id(geozone) : "geozone_all_city" %>">
<td class="name"> <td class="name">
<%= geozone.present? ? geozone.name : t("geozones.none") %> <%= geozone.present? ? geozone.name : t("geozones.none") %>
</td> </td>

View File

@@ -59,7 +59,7 @@
</td> </td>
<td class="small"> <td class="small">
<% if spending_proposal.administrator.present? %> <% if spending_proposal.administrator.present? %>
<span title="<%= t('admin.spending_proposals.index.assigned_admin') %>"><%= spending_proposal.administrator.name %></span> <span title="<%= t("admin.spending_proposals.index.assigned_admin") %>"><%= spending_proposal.administrator.name %></span>
<% else %> <% else %>
<%= t("admin.spending_proposals.index.no_admin_assigned") %> <%= t("admin.spending_proposals.index.no_admin_assigned") %>
<% end %> <% end %>

View File

@@ -1 +1 @@
$("#users").html("<%= j render 'users' %>"); $("#users").html("<%= j render "users" %>");

View File

@@ -1,6 +1,6 @@
<ul class="no-bullet budget-timeline"> <ul class="no-bullet budget-timeline">
<% current_budget.published_phases.each do |phase| %> <% current_budget.published_phases.each do |phase| %>
<li class="phase <%= 'is-active' if phase == current_budget.current_phase %>"> <li class="phase <%= "is-active" if phase == current_budget.current_phase %>">
<h3><%= t("budgets.phase.#{phase.kind}") %></h3> <h3><%= t("budgets.phase.#{phase.kind}") %></h3>
<span> <span>
<%= l(phase.starts_at.to_date, format: :long) if phase.starts_at.present? %> <%= l(phase.starts_at.to_date, format: :long) if phase.starts_at.present? %>

View File

@@ -1,8 +1,8 @@
<% if @investments.present? %> <% if @investments.present? %>
<% @investments.each do |investment| %> <% @investments.each do |investment| %>
$("#<%= dom_id(investment) %>_ballot").html('<%= j render("/budgets/investments/ballot", $("#<%= dom_id(investment) %>_ballot").html("<%= j render("/budgets/investments/ballot",
investment: investment, investment: investment,
investment_ids: investment_ids, investment_ids: investment_ids,
ballot: ballot) %>'); ballot: ballot) %>");
<% end %> <% end %>
<% end %> <% end %>

View File

@@ -1,9 +1,9 @@
$("#progress_bar").html('<%= j render("/budgets/ballot/progress_bar", ballot: @ballot) %>'); $("#progress_bar").html("<%= j render("/budgets/ballot/progress_bar", ballot: @ballot) %>");
$("#sidebar").html('<%= j render("/budgets/investments/sidebar") %>'); $("#sidebar").html("<%= j render("/budgets/investments/sidebar") %>");
$("#<%= dom_id(@investment) %>_ballot").html('<%= j render("/budgets/investments/ballot", $("#<%= dom_id(@investment) %>_ballot").html("<%= j render("/budgets/investments/ballot",
investment: @investment, investment: @investment,
investment_ids: @investment_ids, investment_ids: @investment_ids,
ballot: @ballot) %>'); ballot: @ballot) %>");
<%= render "refresh_ballots", <%= render "refresh_ballots",
investment: @investment, investment: @investment,

View File

@@ -1,11 +1,11 @@
$("#progress_bar").html('<%= j render("budgets/ballot/progress_bar", ballot: @ballot) %>'); $("#progress_bar").html("<%= j render("budgets/ballot/progress_bar", ballot: @ballot) %>");
$("#sidebar").html('<%= j render("budgets/investments/sidebar") %>'); $("#sidebar").html("<%= j render("budgets/investments/sidebar") %>");
$("#ballot").html('<%= j render("budgets/ballot/ballot") %>') $("#ballot").html("<%= j render("budgets/ballot/ballot") %>")
$("#<%= dom_id(@investment) %>_ballot").html('<%= j render("/budgets/investments/ballot", $("#<%= dom_id(@investment) %>_ballot").html("<%= j render("/budgets/investments/ballot",
investment: @investment, investment: @investment,
investment_ids: @investment_ids, investment_ids: @investment_ids,
ballot: @ballot) %>'); ballot: @ballot) %>");
<%= render "refresh_ballots", <%= render "refresh_ballots",
investment: @investment, investment: @investment,
investment_ids: @investment_ids, investment_ids: @investment_ids,

View File

@@ -1,2 +1,2 @@
$("#<%= dom_id(@spending_proposal) %>_ballot").html('<%= j render("spending_proposals/ballot", spending_proposal: @spending_proposal) %>'); $("#<%= dom_id(@spending_proposal) %>_ballot").html("<%= j render("spending_proposals/ballot", spending_proposal: @spending_proposal) %>");
$(".no-supports-allowed").show(); $(".no-supports-allowed").show();

View File

@@ -1,6 +1,6 @@
<span class="flag-content"> <span class="flag-content">
<% if show_flag_action? investment %> <% if show_flag_action? investment %>
<a id="flag-expand-investment-<%= investment.id %>" data-toggle="flag-drop-investment-<%= investment.id %>" title="<%= t('shared.flag') %>"> <a id="flag-expand-investment-<%= investment.id %>" data-toggle="flag-drop-investment-<%= investment.id %>" title="<%= t("shared.flag") %>">
<span class="icon-flag flag-disable"></span> <span class="icon-flag flag-disable"></span>
</a> </a>
<span class="dropdown-pane" id="flag-drop-investment-<%= investment.id %>" data-dropdown data-auto-focus="true"> <span class="dropdown-pane" id="flag-drop-investment-<%= investment.id %>" data-dropdown data-auto-focus="true">
@@ -12,7 +12,7 @@
<% end %> <% end %>
<% if show_unflag_action? investment %> <% if show_unflag_action? investment %>
<a id="unflag-expand-investment-<%= investment.id %>" data-toggle="unflag-drop-investment-<%= investment.id %>" title="<%= t('shared.unflag') %>"> <a id="unflag-expand-investment-<%= investment.id %>" data-toggle="unflag-drop-investment-<%= investment.id %>" title="<%= t("shared.unflag") %>">
<span class="icon-flag flag-active"></span> <span class="icon-flag flag-active"></span>
</a> </a>
<span class="dropdown-pane" id="unflag-drop-investment-<%= investment.id %>" data-dropdown data-auto-focus="true"> <span class="dropdown-pane" id="unflag-drop-investment-<%= investment.id %>" data-dropdown data-auto-focus="true">

View File

@@ -1,5 +1,5 @@
<div id="<%= dom_id(investment) %>" class="budget-investment clear"> <div id="<%= dom_id(investment) %>" class="budget-investment clear">
<div class="panel <%= ('with-image' if feature?(:allow_images) && investment.image.present?) %>"> <div class="panel <%= ("with-image" if feature?(:allow_images) && investment.image.present?) %>">
<% if feature?(:allow_images) && investment.image.present? %> <% if feature?(:allow_images) && investment.image.present? %>
<div class="row" data-equalizer> <div class="row" data-equalizer>

View File

@@ -4,7 +4,7 @@
<div class="supports js-participation"> <div class="supports js-participation">
<span class="total-supports <%= 'no-button' unless voting_allowed || user_voted_for %>"> <span class="total-supports <%= "no-button" unless voting_allowed || user_voted_for %>">
<%= t("budgets.investments.investment.supports", count: investment.total_votes) %> <%= t("budgets.investments.investment.supports", count: investment.total_votes) %>
</span> </span>

View File

@@ -1,4 +1,4 @@
$("#<%= dom_id(@investment) %>_votes").html('<%= j render("/budgets/investments/votes", $("#<%= dom_id(@investment) %>_votes").html("<%= j render("/budgets/investments/votes",
investment: @investment, investment: @investment,
investment_votes: @investment_votes, investment_votes: @investment_votes,
vote_url: namespaced_budget_investment_vote_path(@investment, value: "yes")) %>'); vote_url: namespaced_budget_investment_vote_path(@investment, value: "yes")) %>");

View File

@@ -1,5 +1,5 @@
<div class="<%= results_type == :compatible ? 'success' : 'js-discarded' %>" <div class="<%= results_type == :compatible ? "success" : "js-discarded" %>"
style="<%= results_type != :compatible ? 'display: none' : '' %>" style="<%= results_type != :compatible ? "display: none" : "" %>"
id="<%= results_type %>-container"> id="<%= results_type %>-container">
<h4><%= title %></h4> <h4><%= title %></h4>
@@ -29,8 +29,8 @@
<% amount_available = heading_price %> <% amount_available = heading_price %>
<% investments.each do |investment| %> <% investments.each do |investment| %>
<tr id="<%= dom_id(investment) %>" <tr id="<%= dom_id(investment) %>"
class="budget-investments <%= investment.winner? ? 'success' : 'js-discarded' %>" class="budget-investments <%= investment.winner? ? "success" : "js-discarded" %>"
style="<%= investment.winner? ? '' : 'display: none' %>"> style="<%= investment.winner? ? "" : "display: none" %>">
<td> <td>
<% if investment.winner? %> <% if investment.winner? %>
<span class="icon-check"> <span class="icon-check">

View File

@@ -3,7 +3,7 @@
<span class="divider">&nbsp;|&nbsp;</span> <span class="divider">&nbsp;|&nbsp;</span>
<a id="flag-expand-comment-<%= comment.id %>" <a id="flag-expand-comment-<%= comment.id %>"
data-toggle="flag-drop-comment-<%= comment.id %>" data-toggle="flag-drop-comment-<%= comment.id %>"
title="<%= t('shared.flag') %>"> title="<%= t("shared.flag") %>">
<span class="icon-flag flag-disable"></span> <span class="icon-flag flag-disable"></span>
</a> </a>
<span id="flag-drop-comment-<%= comment.id %>" <span id="flag-drop-comment-<%= comment.id %>"
@@ -19,7 +19,7 @@
<span class="divider">&nbsp;|&nbsp;</span> <span class="divider">&nbsp;|&nbsp;</span>
<a id="unflag-expand-comment-<%= comment.id %>" <a id="unflag-expand-comment-<%= comment.id %>"
data-toggle="unflag-drop-comment-<%= comment.id %>" data-toggle="unflag-drop-comment-<%= comment.id %>"
title="<%= t('shared.unflag') %>"> title="<%= t("shared.unflag") %>">
<span class="icon-flag flag-active"></span> <span class="icon-flag flag-active"></span>
</a> </a>
<span class="dropdown-pane" id="unflag-drop-comment-<%= comment.id %>" data-dropdown data-auto-focus="true"> <span class="dropdown-pane" id="unflag-drop-comment-<%= comment.id %>" data-dropdown data-auto-focus="true">

View File

@@ -1 +1 @@
$("#flag-actions-<%= dom_id(@comment) %>").html('<%= j render("comments/flag_actions", comment: @comment) %>'); $("#flag-actions-<%= dom_id(@comment) %>").html("<%= j render("comments/flag_actions", comment: @comment) %>");

View File

@@ -5,7 +5,7 @@ var comment_html = "<%= j(render @comment) %>"
App.Comments.reset_form(commentable_id); App.Comments.reset_form(commentable_id);
App.Comments.add_comment(commentable_id, comment_html); App.Comments.add_comment(commentable_id, comment_html);
<% else -%> <% else -%>
var parent_id = '<%= "comment_#{@comment.parent_id}" %>'; var parent_id = "<%= "comment_#{@comment.parent_id}" %>";
App.Comments.reset_and_hide_form(parent_id); App.Comments.reset_and_hide_form(parent_id);
App.Comments.add_reply(parent_id, comment_html); App.Comments.add_reply(parent_id, comment_html);
<% end -%> <% end -%>

View File

@@ -1,5 +1,5 @@
<% dom_id = parent_or_commentable_dom_id(@comment.parent_id, @commentable) %> <% dom_id = parent_or_commentable_dom_id(@comment.parent_id, @commentable) %>
var field_with_errors = "#js-comment-form-<%= dom_id %> #comment-body-<%= dom_id %>"; var field_with_errors = "#js-comment-form-<%= dom_id %> #comment-body-<%= dom_id %>";
App.Comments.display_error(field_with_errors, "<%= j render('comments/errors') %>"); App.Comments.display_error(field_with_errors, "<%= j render("comments/errors") %>");

View File

@@ -1 +1 @@
$("#<%= dom_id(@comment) %>_votes").html('<%= j render("comments/votes", comment: @comment) %>'); $("#<%= dom_id(@comment) %>_votes").html("<%= j render("comments/votes", comment: @comment) %>");

View File

@@ -1,6 +1,6 @@
<span class="flag-content"> <span class="flag-content">
<% if show_flag_action? debate %> <% if show_flag_action? debate %>
<a id="flag-expand-debate-<%= debate.id %>" data-toggle="flag-drop-debate-<%= debate.id %>" title="<%= t('shared.flag') %>"> <a id="flag-expand-debate-<%= debate.id %>" data-toggle="flag-drop-debate-<%= debate.id %>" title="<%= t("shared.flag") %>">
<span class="icon-flag flag-disable"></span> <span class="icon-flag flag-disable"></span>
</a> </a>
<span class="dropdown-pane" id="flag-drop-debate-<%= debate.id %>" data-dropdown data-auto-focus="true"> <span class="dropdown-pane" id="flag-drop-debate-<%= debate.id %>" data-dropdown data-auto-focus="true">
@@ -9,7 +9,7 @@
<% end %> <% end %>
<% if show_unflag_action? debate %> <% if show_unflag_action? debate %>
<a id="unflag-expand-debate-<%= debate.id %>" data-toggle="unflag-drop-debate-<%= debate.id %>" title="<%= t('shared.unflag') %>"> <a id="unflag-expand-debate-<%= debate.id %>" data-toggle="unflag-drop-debate-<%= debate.id %>" title="<%= t("shared.unflag") %>">
<span class="icon-flag flag-active"></span> <span class="icon-flag flag-active"></span>
</a> </a>
<span class="dropdown-pane" id="unflag-drop-debate-<%= debate.id %>" data-dropdown data-auto-focus="true"> <span class="dropdown-pane" id="unflag-drop-debate-<%= debate.id %>" data-dropdown data-auto-focus="true">

View File

@@ -1 +1 @@
$("#<%= dom_id(@debate) %> .js-flag-actions").html('<%= j render("debates/flag_actions", debate: @debate) %>'); $("#<%= dom_id(@debate) %> .js-flag-actions").html("<%= j render("debates/flag_actions", debate: @debate) %>");

View File

@@ -1 +1 @@
$("#<%= dom_id(@debate) %>_votes").html('<%= j render("debates/votes", debate: @debate) %>'); $("#<%= dom_id(@debate) %>_votes").html("<%= j render("debates/votes", debate: @debate) %>");

View File

@@ -1,3 +1,3 @@
App.Followable.update("<%= dom_id(@follow.followable) %>", App.Followable.update("<%= dom_id(@follow.followable) %>",
"<%= j render('follow_button', follow: @follow) %>", "<%= j render("follow_button", follow: @follow) %>",
"<%= j render('layouts/flash') %>") "<%= j render("layouts/flash") %>")

View File

@@ -6,7 +6,7 @@
<%= content_for :head %> <%= content_for :head %>
</head> </head>
<body class="admin" data-watch-form-message="<%= I18n.t('layouts.admin.watch_form_message') %>"> <body class="admin" data-watch-form-message="<%= I18n.t("layouts.admin.watch_form_message") %>">
<div class="off-canvas-wrapper"> <div class="off-canvas-wrapper">
<div class="off-canvas-wrapper-inner" data-off-canvas-wrapper> <div class="off-canvas-wrapper-inner" data-off-canvas-wrapper>
<div class="off-canvas position-left" id="offCanvas" data-off-canvas> <div class="off-canvas position-left" id="offCanvas" data-off-canvas>

View File

@@ -1,7 +1,7 @@
if ($(".comment").length == 0) { if ($(".comment").length == 0) {
$("#comments-box").append("<%= j render('comments_box', annotation: @annotation) %>").show(); $("#comments-box").append("<%= j render("comments_box", annotation: @annotation) %>").show();
} else { } else {
$("#comments-box #comments").append("<%= j render('comments', annotation: @annotation) %>"); $("#comments-box #comments").append("<%= j render("comments", annotation: @annotation) %>");
var current_annotation_link = $("#annotation-link a").attr("href") var current_annotation_link = $("#annotation-link a").attr("href")
var sub_annotation_ids = current_annotation_link.split("=")[1]; var sub_annotation_ids = current_annotation_link.split("=")[1];

View File

@@ -1 +1 @@
$("#comments-box").html("<%= j render('form') %>"); $("#comments-box").html("<%= j render("form") %>");

View File

@@ -1 +1 @@
$("#legislation-answer-form").html('<%= j render("legislation/questions/answer_form", process: @process, question: @question, answer: @answer) %>'); $("#legislation-answer-form").html("<%= j render("legislation/questions/answer_form", process: @process, question: @question, answer: @answer) %>");

View File

@@ -1,4 +1,4 @@
<nav class="<%= 'legislation-process-list' if process.enabled_phases? %>"> <nav class="<%= "legislation-process-list" if process.enabled_phases? %>">
<div class="row"> <div class="row">
<div class="small-12 column"> <div class="small-12 column">
<% if process.enabled_phases? %> <% if process.enabled_phases? %>

View File

@@ -1,7 +1,7 @@
<span class="js-flag-actions"> <span class="js-flag-actions">
<span class="flag-content"> <span class="flag-content">
<% if show_flag_action? proposal %> <% if show_flag_action? proposal %>
<a id="flag-expand-proposal-<%= proposal.id %>" data-toggle="flag-drop-proposal-<%= proposal.id %>" title="<%= t('shared.flag') %>"> <a id="flag-expand-proposal-<%= proposal.id %>" data-toggle="flag-drop-proposal-<%= proposal.id %>" title="<%= t("shared.flag") %>">
<span class="icon-flag flag-disable"></span> <span class="icon-flag flag-disable"></span>
</a> </a>
<span class="dropdown-pane" id="flag-drop-proposal-<%= proposal.id %>" data-dropdown data-auto-focus="true"> <span class="dropdown-pane" id="flag-drop-proposal-<%= proposal.id %>" data-dropdown data-auto-focus="true">
@@ -10,7 +10,7 @@
<% end %> <% end %>
<% if show_unflag_action? proposal %> <% if show_unflag_action? proposal %>
<a id="unflag-expand-proposal-<%= proposal.id %>" data-toggle="unflag-drop-proposal-<%= proposal.id %>" title="<%= t('shared.unflag') %>"> <a id="unflag-expand-proposal-<%= proposal.id %>" data-toggle="unflag-drop-proposal-<%= proposal.id %>" title="<%= t("shared.unflag") %>">
<span class="icon-flag flag-active"></span> <span class="icon-flag flag-active"></span>
</a> </a>
<span class="dropdown-pane" id="unflag-drop-proposal-<%= proposal.id %>" data-dropdown data-auto-focus="true"> <span class="dropdown-pane" id="unflag-drop-proposal-<%= proposal.id %>" data-dropdown data-auto-focus="true">

View File

@@ -1,7 +1,7 @@
<div id="<%= dom_id(proposal) %>" <div id="<%= dom_id(proposal) %>"
class="proposal clear <%= ("successful" if proposal.total_votes > Proposal.votes_needed_for_success) %>" class="proposal clear <%= ("successful" if proposal.total_votes > Proposal.votes_needed_for_success) %>"
data-type="proposal"> data-type="proposal">
<div class="panel <%= ('with-image' if proposal.image.present?) %>"> <div class="panel <%= ("with-image" if proposal.image.present?) %>">
<div class="icon-successful"></div> <div class="icon-successful"></div>
<% if proposal.image.present? %> <% if proposal.image.present? %>

View File

@@ -1 +1 @@
$("#<%= dom_id(@proposal) %> .js-flag-actions").html('<%= j render("proposals/flag_actions", proposal: @proposal) %>'); $("#<%= dom_id(@proposal) %> .js-flag-actions").html("<%= j render("proposals/flag_actions", proposal: @proposal) %>");

View File

@@ -1 +1 @@
$("#<%= dom_id(@proposal) %>_votes").html('<%= j render("legislation/proposals/votes", proposal: @proposal) %>'); $("#<%= dom_id(@proposal) %>_votes").html("<%= j render("legislation/proposals/votes", proposal: @proposal) %>");

View File

@@ -3,7 +3,7 @@
<%= form_for answer, url: legislation_process_question_answers_path(process, question, answer), remote: true , html: { class: "controls-stacked"} do |f| %> <%= form_for answer, url: legislation_process_question_answers_path(process, question, answer), remote: true , html: { class: "controls-stacked"} do |f| %>
<% question.question_options.each do |question_option| %> <% question.question_options.each do |question_option| %>
<label class="control radio <%= 'is-active' if @answer.legislation_question_option_id == question_option.id %>"> <label class="control radio <%= "is-active" if @answer.legislation_question_option_id == question_option.id %>">
<%= f.radio_button :legislation_question_option_id, question_option.id, label: false %> <%= f.radio_button :legislation_question_option_id, question_option.id, label: false %>
<span class="control-indicator"></span> <span class="control-indicator"></span>
<%= question_option.value %> <%= question_option.value %>
@@ -16,7 +16,7 @@
<form class="controls-stacked disabled"> <form class="controls-stacked disabled">
<% question.question_options.each do |question_option| %> <% question.question_options.each do |question_option| %>
<label class="control radio <%= 'is-active' if answer.persisted? && (answer.legislation_question_option_id == question_option.id) %>"> <label class="control radio <%= "is-active" if answer.persisted? && (answer.legislation_question_option_id == question_option.id) %>">
<input id="quiz-1" name="radio" type="radio" disabled="true"> <input id="quiz-1" name="radio" type="radio" disabled="true">
<span class="control-indicator"></span> <span class="control-indicator"></span>
<%= question_option.value %> <%= question_option.value %>

View File

@@ -11,7 +11,7 @@
<ul> <ul>
<% [:debates, :create_proposals, :support_proposals, :vote_proposals].each do |permission| %> <% [:debates, :create_proposals, :support_proposals, :vote_proposals].each do |permission| %>
<li> <li>
<span class="<%= permissions.include?(permission) ? 'icon-check' : 'icon-x' %>"></span> <span class="<%= permissions.include?(permission) ? "icon-check" : "icon-x" %>"></span>
<%= t("management.permissions.#{permission}") %> <%= t("management.permissions.#{permission}") %>
</li> </li>
<% end %> <% end %>

View File

@@ -1,4 +1,4 @@
$("#<%= dom_id(@investment) %>_votes").html('<%= j render("/budgets/investments/votes", $("#<%= dom_id(@investment) %>_votes").html("<%= j render("/budgets/investments/votes",
investment: @investment, investment: @investment,
investment_votes: @investment_votes, investment_votes: @investment_votes,
vote_url: namespaced_budget_investment_vote_path(@investment, value: 'yes')) %>'); vote_url: namespaced_budget_investment_vote_path(@investment, value: "yes")) %>");

View File

@@ -7,6 +7,6 @@
placeholder: t("management.user_invites.new.info"), placeholder: t("management.user_invites.new.info"),
aria: {describedby: "emails-help-text"} %> aria: {describedby: "emails-help-text"} %>
<div class="small-12 medium-6 large-3"> <div class="small-12 medium-6 large-3">
<input type="submit" name="" value="<%= t('management.user_invites.new.submit') %>", class="button expanded"> <input type="submit" name="" value="<%= t("management.user_invites.new.submit") %>", class="button expanded">
</div> </div>
<% end %> <% end %>

View File

@@ -1,4 +1,4 @@
<li id="<%= dom_id(notification) %>" class="notification <%= 'unread' if notification&.unread? %>"> <li id="<%= dom_id(notification) %>" class="notification <%= "unread" if notification&.unread? %>">
<% if notification.notifiable.try(:notifiable_available?) %> <% if notification.notifiable.try(:notifiable_available?) %>
<% locals = { notification: notification, <% locals = { notification: notification,
timestamp: notification.timestamp, timestamp: notification.timestamp,

View File

@@ -74,7 +74,7 @@
<% results_by_booth = @partial_results.group_by(&:booth_assignment_id) %> <% results_by_booth = @partial_results.group_by(&:booth_assignment_id) %>
<% results_by_booth.keys.each do |booth_assignment| %> <% results_by_booth.keys.each do |booth_assignment| %>
<% results_by_booth[booth_assignment].group_by(&:date).keys.each do |date| %> <% results_by_booth[booth_assignment].group_by(&:date).keys.each do |date| %>
<tr id="results_<%= booth_assignment %>_<%= date.strftime('%Y%m%d') %>"> <tr id="results_<%= booth_assignment %>_<%= date.strftime("%Y%m%d") %>">
<td> <td>
<%= l(date, format: :long) %> <%= l(date, format: :long) %>
</td> </td>

View File

@@ -1,3 +1,3 @@
$("#<%= dom_id(@poll) %> #actions").html('<%= j render("voted") %>'); $("#<%= dom_id(@poll) %> #actions").html("<%= j render("voted") %>");
$("#<%= dom_id(@poll) %> #can_vote_callout").hide(); $("#<%= dom_id(@poll) %> #can_vote_callout").hide();
$(".js-vote-collection").removeClass("is-hidden"); $(".js-vote-collection").removeClass("is-hidden");

View File

@@ -1,2 +1,2 @@
<% token = poll_voter_token(@question.poll, current_user) %> <% token = poll_voter_token(@question.poll, current_user) %>
$("#<%= dom_id(@question) %>_answers").html('<%= j render("polls/questions/answers", question: @question, token: token) %>'); $("#<%= dom_id(@question) %>_answers").html("<%= j render("polls/questions/answers", question: @question, token: token) %>");

View File

@@ -54,7 +54,7 @@
<div class="row padding"> <div class="row padding">
<% @poll_questions_answers.each do |answer| %> <% @poll_questions_answers.each do |answer| %>
<div class="small-12 medium-6 column end answer <%= cycle('first', '') %>" id="answer_<%= answer.id %>"> <div class="small-12 medium-6 column end answer <%= cycle("first", "") %>" id="answer_<%= answer.id %>">
<% if answer.description.present? %> <% if answer.description.present? %>
<h3><%= answer.title %></h3> <h3><%= answer.title %></h3>

View File

@@ -1,6 +1,6 @@
<span class="flag-content"> <span class="flag-content">
<% if show_flag_action? proposal %> <% if show_flag_action? proposal %>
<a id="flag-expand-proposal-<%= proposal.id %>" data-toggle="flag-drop-proposal-<%= proposal.id %>" title="<%= t('shared.flag') %>"> <a id="flag-expand-proposal-<%= proposal.id %>" data-toggle="flag-drop-proposal-<%= proposal.id %>" title="<%= t("shared.flag") %>">
<span class="icon-flag flag-disable"></span> <span class="icon-flag flag-disable"></span>
</a> </a>
<span class="dropdown-pane" id="flag-drop-proposal-<%= proposal.id %>" data-dropdown data-auto-focus="true"> <span class="dropdown-pane" id="flag-drop-proposal-<%= proposal.id %>" data-dropdown data-auto-focus="true">
@@ -9,7 +9,7 @@
<% end %> <% end %>
<% if show_unflag_action? proposal %> <% if show_unflag_action? proposal %>
<a id="unflag-expand-proposal-<%= proposal.id %>" data-toggle="unflag-drop-proposal-<%= proposal.id %>" title="<%= t('shared.unflag') %>"> <a id="unflag-expand-proposal-<%= proposal.id %>" data-toggle="unflag-drop-proposal-<%= proposal.id %>" title="<%= t("shared.unflag") %>">
<span class="icon-flag flag-active"></span> <span class="icon-flag flag-active"></span>
</a> </a>
<span class="dropdown-pane" id="unflag-drop-proposal-<%= proposal.id %>" data-dropdown data-auto-focus="true"> <span class="dropdown-pane" id="unflag-drop-proposal-<%= proposal.id %>" data-dropdown data-auto-focus="true">

View File

@@ -2,7 +2,7 @@
class="proposal clear class="proposal clear
<%= ("successful" if proposal.total_votes > Proposal.votes_needed_for_success) %>" <%= ("successful" if proposal.total_votes > Proposal.votes_needed_for_success) %>"
data-type="proposal"> data-type="proposal">
<div class="panel <%= 'with-image' if proposal.image.present? %>"> <div class="panel <%= "with-image" if proposal.image.present? %>">
<div class="icon-successful"></div> <div class="icon-successful"></div>
<% if proposal.image.present? %> <% if proposal.image.present? %>

View File

@@ -1 +1 @@
$("#<%= dom_id(@proposal) %>_votes").html('<%= j render("proposals/featured_votes", proposal: @proposal) %>'); $("#<%= dom_id(@proposal) %>_votes").html("<%= j render("proposals/featured_votes", proposal: @proposal) %>");

View File

@@ -2,21 +2,21 @@
<% description = truncate(ActionView::Base.full_sanitizer.sanitize(description), length: 140) %> <% description = truncate(ActionView::Base.full_sanitizer.sanitize(description), length: 140) %>
<!-- Twitter --> <!-- Twitter -->
<meta name="twitter:card" content="summary"/> <meta name="twitter:card" content="summary"/>
<meta name="twitter:site" content="<%= setting['twitter_handle'] %>"/> <meta name="twitter:site" content="<%= setting["twitter_handle"] %>"/>
<meta name="twitter:title" content="<%= local_assigns[:social_title] || setting['meta_title'] %>"/> <meta name="twitter:title" content="<%= local_assigns[:social_title] || setting["meta_title"] %>"/>
<meta name="twitter:description" content="<%= description %>"/> <meta name="twitter:description" content="<%= description %>"/>
<meta name="twitter:image" content="<%= root_url + (local_assigns[:twitter_image_url] || 'social_media_icon_twitter.png') %>"/> <meta name="twitter:image" content="<%= root_url + (local_assigns[:twitter_image_url] || "social_media_icon_twitter.png") %>"/>
<!-- Facebook OG --> <!-- Facebook OG -->
<meta id="ogtitle" property="og:title" content="<%= local_assigns[:social_title] || setting['meta_title'] %>"/> <meta id="ogtitle" property="og:title" content="<%= local_assigns[:social_title] || setting["meta_title"] %>"/>
<% if setting["url"] %> <% if setting["url"] %>
<meta property="article:publisher" content="<%= setting['url'] %>"/> <meta property="article:publisher" content="<%= setting["url"] %>"/>
<% end %> <% end %>
<% if setting["facebook_handle"] %> <% if setting["facebook_handle"] %>
<meta property="article:author" content="https://www.facebook.com/<%= setting['facebook_handle'] %>"/> <meta property="article:author" content="https://www.facebook.com/<%= setting["facebook_handle"] %>"/>
<% end %> <% end %>
<meta property="og:type" content="article"/> <meta property="og:type" content="article"/>
<meta id="ogurl" property="og:url" content="<%= social_url %>"/> <meta id="ogurl" property="og:url" content="<%= social_url %>"/>
<meta id="ogimage" property="og:image" content="<%= root_url + (local_assigns[:og_image_url] || 'social_media_icon.png') %>"/> <meta id="ogimage" property="og:image" content="<%= root_url + (local_assigns[:og_image_url] || "social_media_icon.png") %>"/>
<meta property="og:site_name" content="<%= setting['org_name'] %>"/> <meta property="og:site_name" content="<%= setting["org_name"] %>"/>
<meta id="ogdescription" property="og:description" content="<%= description %>"/> <meta id="ogdescription" property="og:description" content="<%= description %>"/>
<meta property="fb:app_id" content="<%= Rails.application.secrets.facebook_key %>"/> <meta property="fb:app_id" content="<%= Rails.application.secrets.facebook_key %>"/>

View File

@@ -4,7 +4,7 @@
<% voting_allowed = true unless reason.presence == :not_voting_allowed %> <% voting_allowed = true unless reason.presence == :not_voting_allowed %>
<% user_voted_for = voted_for?(@spending_proposal_votes, spending_proposal) %> <% user_voted_for = voted_for?(@spending_proposal_votes, spending_proposal) %>
<span class="total-supports <%= 'no-button' unless voting_allowed || user_voted_for %>"> <span class="total-supports <%= "no-button" unless voting_allowed || user_voted_for %>">
<%= t("spending_proposals.spending_proposal.supports", count: spending_proposal.total_votes) %> <%= t("spending_proposals.spending_proposal.supports", count: spending_proposal.total_votes) %>
</span> </span>

View File

@@ -1 +1 @@
$("#<%= dom_id(@spending_proposal) %>_votes").html('<%= j render("spending_proposals/votes", spending_proposal: @spending_proposal, vote_url: vote_spending_proposal_path(@spending_proposal, value: "yes")) %>'); $("#<%= dom_id(@spending_proposal) %>_votes").html("<%= j render("spending_proposals/votes", spending_proposal: @spending_proposal, vote_url: vote_spending_proposal_path(@spending_proposal, value: "yes")) %>");

View File

@@ -1,12 +1,12 @@
{ {
"<%= t('stats.index.visits') %>" : "<%= number_with_delimiter(@visits) %>", "<%= t("stats.index.visits") %>" : "<%= number_with_delimiter(@visits) %>",
"<%= t('stats.index.debates') %>" : <%= number_with_delimiter(@debates) %>", "<%= t("stats.index.debates") %>" : <%= number_with_delimiter(@debates) %>",
"<%= t('stats.index.proposals') %>" : "<%= number_with_delimiter(@proposals) %>", "<%= t("stats.index.proposals") %>" : "<%= number_with_delimiter(@proposals) %>",
"<%= t('stats.index.comments') %>" : "<%= number_with_delimiter(@comments) %>", "<%= t("stats.index.comments") %>" : "<%= number_with_delimiter(@comments) %>",
"<%= t('stats.index.proposal_votes') %>" : "<%= number_with_delimiter(@proposal_votes) %>", "<%= t("stats.index.proposal_votes") %>" : "<%= number_with_delimiter(@proposal_votes) %>",
"<%= t('stats.index.debate_votes') %>" : "<%= number_with_delimiter(@debate_votes) %>", "<%= t("stats.index.debate_votes") %>" : "<%= number_with_delimiter(@debate_votes) %>",
"<%= t('stats.index.comment_votes') %>" : "<%= number_with_delimiter(@comment_votes) %>", "<%= t("stats.index.comment_votes") %>" : "<%= number_with_delimiter(@comment_votes) %>",
"<%= t('stats.index.votes') %>" : "<%= number_with_delimiter(@votes) %>", "<%= t("stats.index.votes") %>" : "<%= number_with_delimiter(@votes) %>",
"<%= t('stats.index.verified_users') %>" : "<%= number_with_delimiter(@verified_users) %>", "<%= t("stats.index.verified_users") %>" : "<%= number_with_delimiter(@verified_users) %>",
"<%= t('stats.index.unverified_users') %>" : "<%= number_with_delimiter(@unverified_users) %>" "<%= t("stats.index.unverified_users") %>" : "<%= number_with_delimiter(@unverified_users) %>"
} }

View File

@@ -3,14 +3,14 @@
<% if feed_proposals?(feed) %> <% if feed_proposals?(feed) %>
<div id="feed_proposals" class="small-12 column margin-top <div id="feed_proposals" class="small-12 column margin-top
<%= 'medium-8' if feed_debates_and_proposals_enabled? %>"> <%= "medium-8" if feed_debates_and_proposals_enabled? %>">
<div class="feed-content" data-equalizer-watch> <div class="feed-content" data-equalizer-watch>
<h3 class="title"><%= t("welcome.feed.most_active.#{feed.kind}") %></h3> <h3 class="title"><%= t("welcome.feed.most_active.#{feed.kind}") %></h3>
<% feed.items.each do |item| %> <% feed.items.each do |item| %>
<div class="<%= item.class.to_s.parameterize('_') %> row"> <div class="<%= item.class.to_s.parameterize("_") %> row">
<div class="feed-description small-12 column <div class="feed-description small-12 column
<%= 'medium-6 large-9' if item.image.present? %>"> <%= "medium-6 large-9" if item.image.present? %>">
<strong><%= link_to item.title, url_for(item) %></strong><br> <strong><%= link_to item.title, url_for(item) %></strong><br>
<p><%= item.summary %></p> <p><%= item.summary %></p>
</div> </div>
@@ -32,12 +32,12 @@
<% if feed_debates?(feed) %> <% if feed_debates?(feed) %>
<div id="feed_debates" class="small-12 column margin-top <div id="feed_debates" class="small-12 column margin-top
<%= 'medium-4' if feed_debates_and_proposals_enabled? %>"> <%= "medium-4" if feed_debates_and_proposals_enabled? %>">
<div class="feed-content" data-equalizer-watch> <div class="feed-content" data-equalizer-watch>
<h3 class="title"><%= t("welcome.feed.most_active.#{feed.kind}") %></h3> <h3 class="title"><%= t("welcome.feed.most_active.#{feed.kind}") %></h3>
<% feed.items.each do |item| %> <% feed.items.each do |item| %>
<div class="<%= item.class.to_s.parameterize('_') %>"> <div class="<%= item.class.to_s.parameterize("_") %>">
<strong><%= link_to item.title, url_for(item) %></strong> <strong><%= link_to item.title, url_for(item) %></strong>
</div> </div>
<% end %> <% end %>

View File

@@ -1,11 +1,11 @@
<% if header.present? %> <% if header.present? %>
<div class="jumbo highlight"> <div class="jumbo highlight">
<div class="row"> <div class="row">
<div class="small-12 medium-6 column <%= 'medium-9 small-centered text-center' unless header.image.present? %>"> <div class="small-12 medium-6 column <%= "medium-9 small-centered text-center" unless header.image.present? %>">
<span><%= header.label %></span> <span><%= header.label %></span>
<h1><%= header.title %></h1> <h1><%= header.title %></h1>
<p class="lead"><%= header.description %></p> <p class="lead"><%= header.description %></p>
<div class="small-12 medium-6 large-4 <%= 'small-centered' unless header.image.present? %>"> <div class="small-12 medium-6 large-4 <%= "small-centered" unless header.image.present? %>">
<%= link_to header.link_text, header.link_url, class: "button expanded large" %> <%= link_to header.link_text, header.link_url, class: "button expanded large" %>
</div> </div>
</div> </div>

View File

@@ -8,7 +8,7 @@
<% feed.items.each do |item| %> <% feed.items.each do |item| %>
<%= link_to url_for(item) do %> <%= link_to url_for(item) do %>
<figure class="figure-card <%= item.class.to_s.parameterize('_') %>"> <figure class="figure-card <%= item.class.to_s.parameterize("_") %>">
<%= image_tag("welcome_process.png", alt: "") %> <%= image_tag("welcome_process.png", alt: "") %>
<figcaption> <figcaption>
<span><%= t("welcome.feed.process_label") %></span><br> <span><%= t("welcome.feed.process_label") %></span><br>

View File

@@ -21,7 +21,7 @@
<div class="row"> <div class="row">
<% if @cards.any? %> <% if @cards.any? %>
<div class="small-12 column <%= 'large-8' if feed_processes_enabled? %>"> <div class="small-12 column <%= "large-8" if feed_processes_enabled? %>">
<%= render "cards" %> <%= render "cards" %>
</div> </div>
<% end %> <% end %>