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 %>
</td>
<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>
<%= 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>
<% (@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 %>
<tr id="recounting_<%= voting_date.strftime('%Y%m%d') %>">
<tr id="recounting_<%= voting_date.strftime("%Y%m%d") %>">
<td><%= l voting_date %></td>
<td class="text-center"><%= system_count %></td>
</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 id="geozones" style="<%= @poll.geozone_restricted? ? '' : 'display:none' %>">
<div id="geozones" style="<%= @poll.geozone_restricted? ? "" : "display:none" %>">
<div class="row">
<%= f.collection_check_boxes(:geozone_ids, @geozones, :id, :name) do |b| %>
<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") %>
</strong>
</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? %>
<strong><%= total_recounts %></strong>
<% 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>
<% 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">
<%= geozone.present? ? geozone.name : t("geozones.none") %>
</td>

View File

@@ -59,7 +59,7 @@
</td>
<td class="small">
<% 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 %>
<%= t("admin.spending_proposals.index.no_admin_assigned") %>
<% end %>

View File

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