Merge branch 'master' into proposal-dashboard

This commit is contained in:
decabeza
2019-03-27 17:56:46 +01:00
138 changed files with 639 additions and 639 deletions

View File

@@ -5,7 +5,7 @@ module HasOrders
def has_orders(valid_orders, *args)
before_action(*args) do |c|
@valid_orders = valid_orders.respond_to?(:call) ? valid_orders.call(c) : valid_orders.dup
@valid_orders.delete('relevance') if params[:search].blank?
@valid_orders.delete("relevance") if params[:search].blank?
@current_order = @valid_orders.include?(params[:order]) ? params[:order] : @valid_orders.first
end
end

View File

@@ -24,6 +24,6 @@ class StatsController < ApplicationController
private
def daily_cache(key, &block)
Rails.cache.fetch("public_stats/#{Time.current.strftime('%Y-%m-%d')}/#{key}", &block)
Rails.cache.fetch("public_stats/#{Time.current.strftime("%Y-%m-%d")}/#{key}", &block)
end
end

View File

@@ -18,7 +18,7 @@ module DocumentablesHelper
def accepted_content_types_extensions(documentable_class)
documentable_class.accepted_content_types
.collect{ |content_type| ".#{content_type.split('/').last}" }
.collect{ |content_type| ".#{content_type.split("/").last}" }
.join(",")
end

View File

@@ -22,7 +22,7 @@ module FollowablesHelper
end
def followable_class_name(followable)
followable.class.to_s.parameterize('_')
followable.class.to_s.parameterize("_")
end
def find_or_build_follow(user, followable)

View File

@@ -22,7 +22,7 @@ module ImageablesHelper
def imageable_accepted_content_types_extensions
Image::ACCEPTED_CONTENT_TYPE
.collect{ |content_type| ".#{content_type.split('/').last}" }
.collect{ |content_type| ".#{content_type.split("/").last}" }
.join(",")
end

View File

@@ -57,9 +57,9 @@ module MapLocationsHelper
map_tiles_provider_attribution: Rails.application.secrets.map_tiles_provider_attribution,
marker_editable: editable,
marker_remove_selector: "##{map_location_remove_marker_link_id(map_location)}",
latitude_input_selector: "##{map_location_input_id(parent_class, 'latitude')}",
longitude_input_selector: "##{map_location_input_id(parent_class, 'longitude')}",
zoom_input_selector: "##{map_location_input_id(parent_class, 'zoom')}",
latitude_input_selector: "##{map_location_input_id(parent_class, "latitude")}",
longitude_input_selector: "##{map_location_input_id(parent_class, "longitude")}",
zoom_input_selector: "##{map_location_input_id(parent_class, "zoom")}",
marker_investments_coordinates: investments_coordinates
}
options[:marker_latitude] = map_location.latitude if map_location.latitude.present?

View File

@@ -34,9 +34,9 @@ module ProposalsHelper
def empty_recommended_proposals_message_text(user)
if user.interests.any?
t('proposals.index.recommendations.without_results')
t("proposals.index.recommendations.without_results")
else
t('proposals.index.recommendations.without_interests')
t("proposals.index.recommendations.without_interests")
end
end

View File

@@ -18,7 +18,7 @@ module ValuationHelper
when 0
t("valuation.budget_investments.index.no_valuators_assigned")
when 1
"<span title=\"#{t('valuation.budget_investments.index.valuators_assigned', count: 1)}\">".html_safe +
"<span title=\"#{t("valuation.budget_investments.index.valuators_assigned", count: 1)}\">".html_safe +
valuators.first.name +
"</span>".html_safe
else

View File

@@ -1,5 +1,5 @@
class ApplicationMailer < ActionMailer::Base
helper :settings
default from: "#{Setting['mailer_from_name']} <#{Setting['mailer_from_address']}>"
default from: "#{Setting["mailer_from_name"]} <#{Setting["mailer_from_address"]}>"
layout "mailer"
end

View File

@@ -218,7 +218,7 @@ class Budget
end
def code
"#{created_at.strftime('%Y')}-#{id}" + (administrator.present? ? "-A#{administrator.id}" : "")
"#{created_at.strftime("%Y")}-#{id}" + (administrator.present? ? "-A#{administrator.id}" : "")
end
def send_unfeasible_email

View File

@@ -120,7 +120,7 @@ class Legislation::Proposal < ActiveRecord::Base
end
def code
"#{Setting['proposal_code_prefix']}-#{created_at.strftime('%Y-%m')}-#{id}"
"#{Setting["proposal_code_prefix"]}-#{created_at.strftime("%Y-%m")}-#{id}"
end
def after_commented

View File

@@ -184,7 +184,7 @@ class Proposal < ActiveRecord::Base
end
def code
"#{Setting['proposal_code_prefix']}-#{created_at.strftime('%Y-%m')}-#{id}"
"#{Setting["proposal_code_prefix"]}-#{created_at.strftime("%Y-%m")}-#{id}"
end
def after_commented

View File

@@ -109,7 +109,7 @@ class SpendingProposal < ActiveRecord::Base
end
def code
"#{created_at.strftime('%Y')}-#{id}" + (administrator.present? ? "-A#{administrator.id}" : "")
"#{created_at.strftime("%Y")}-#{id}" + (administrator.present? ? "-A#{administrator.id}" : "")
end
def send_unfeasible_email

View File

@@ -238,7 +238,7 @@ class User < ActiveRecord::Base
Poll::Voter.where(user_id: other_user.id).update_all(user_id: id)
Budget::Ballot.where(user_id: other_user.id).update_all(user_id: id)
Vote.where("voter_id = ? AND voter_type = ?", other_user.id, "User").update_all(voter_id: id)
data_log = "id: #{other_user.id} - #{Time.current.strftime('%Y-%m-%d %H:%M:%S')}"
data_log = "id: #{other_user.id} - #{Time.current.strftime("%Y-%m-%d %H:%M:%S")}"
update(former_users_data_log: "#{former_users_data_log} | #{data_log}")
end

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

@@ -4,8 +4,8 @@
<%= f.hidden_field :value,
value: (setting.enabled? ? "" : "active") %>
<%= f.submit(t("admin.settings.index.features.#{setting.enabled? ? 'disable' : 'enable'}"),
class: "button #{setting.enabled? ? 'hollow alert' : 'success'}",
<%= f.submit(t("admin.settings.index.features.#{setting.enabled? ? "disable" : "enable"}"),
class: "button #{setting.enabled? ? "hollow alert" : "success"}",
data: {confirm: t("admin.actions.confirm")}) %>
<% end %>
</div>

View File

@@ -38,7 +38,7 @@
<td>
<% if draft_version.status == "draft" %>
<%= t("admin.legislation.draft_versions.statuses.draft") %>
<%= link_to "(#{t('.preview')})", legislation_process_draft_version_path(@process, draft_version) %>
<%= link_to "(#{t(".preview")})", legislation_process_draft_version_path(@process, draft_version) %>
<% else %>
<%= t("admin.legislation.draft_versions.statuses.published") %>
<% end %>

View File

@@ -21,7 +21,7 @@
<%= f.text_field :custom_list, value: @process.tag_list_on(:customs).to_s,
label: false,
placeholder: t("admin.legislation.proposals.form.custom_categories_placeholder"),
class: 'js-tag-list',
class: "js-tag-list",
aria: {describedby: "tag-list-help-text"} %>
</div>

View File

@@ -1,7 +1,7 @@
<% if proposals.any? %>
<h3><%= page_entries_info proposals %></h3>
<%= render 'shared/wide_order_selector', i18n_namespace: "admin.legislation.processes.proposals" %>
<%= render "shared/wide_order_selector", i18n_namespace: "admin.legislation.processes.proposals" %>
<table class="stack" id="legislation_proposals_list">
<thead>

View File

@@ -8,8 +8,8 @@
<h2><%= @process.title %></h2>
<%= render 'admin/legislation/processes/subnav', process: @process, active: 'proposals' %>
<%= render "admin/legislation/processes/subnav", process: @process, active: "proposals" %>
<%= render 'form' %>
<%= render 'proposals', proposals: @proposals %>
<%= render "form" %>
<%= render "proposals", proposals: @proposals %>
</div>

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

@@ -35,8 +35,8 @@
<%= form_for(feature, url: admin_setting_path(feature), html: { id: "edit_#{dom_id(feature)}"}) do |f| %>
<%= f.hidden_field :value, id: dom_id(feature), value: (feature.enabled? ? "" : "active") %>
<%= f.submit(t("admin.settings.index.features.#{feature.enabled? ? 'disable' : 'enable'}"),
class: "button expanded #{feature.enabled? ? 'hollow alert' : 'success'}",
<%= f.submit(t("admin.settings.index.features.#{feature.enabled? ? "disable" : "enable"}"),
class: "button expanded #{feature.enabled? ? "hollow alert" : "success"}",
data: {confirm: t("admin.actions.confirm")}) %>
<% end %>
</td>

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" %>");

View File

@@ -37,5 +37,5 @@
</div>
</div>
<%= f.submit(t("admin.homepage.#{action_name}.#{@card.header? ? 'submit_header' : 'submit_card'}"), class: "button success") %>
<%= f.submit(t("admin.homepage.#{action_name}.#{@card.header? ? "submit_header" : "submit_card"}"), class: "button success") %>
<% end %>

View File

@@ -1,6 +1,6 @@
<ul class="no-bullet budget-timeline">
<% 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>
<span>
<%= l(phase.starts_at.to_date, format: :long) if phase.starts_at.present? %>

View File

@@ -1,8 +1,8 @@
<% if @investments.present? %>
<% @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_ids: investment_ids,
ballot: ballot) %>');
ballot: ballot) %>");
<% end %>
<% end %>

View File

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

View File

@@ -1,11 +1,11 @@
$("#progress_bar").html('<%= j render("budgets/ballot/progress_bar", ballot: @ballot) %>');
$("#sidebar").html('<%= j render("budgets/investments/sidebar") %>');
$("#ballot").html('<%= j render("budgets/ballot/ballot") %>')
$("#progress_bar").html("<%= j render("budgets/ballot/progress_bar", ballot: @ballot) %>");
$("#sidebar").html("<%= j render("budgets/investments/sidebar") %>");
$("#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_ids: @investment_ids,
ballot: @ballot) %>');
ballot: @ballot) %>");
<%= render "refresh_ballots",
investment: @investment,
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();

View File

@@ -1,6 +1,6 @@
<span class="flag-content">
<% 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>
</a>
<span class="dropdown-pane" id="flag-drop-investment-<%= investment.id %>" data-dropdown data-auto-focus="true">
@@ -12,7 +12,7 @@
<% end %>
<% 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>
</a>
<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 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? %>
<div class="row" data-equalizer>

View File

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

View File

@@ -3,7 +3,7 @@
<span class="divider">&nbsp;|&nbsp;</span>
<a id="flag-expand-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>
</a>
<span id="flag-drop-comment-<%= comment.id %>"
@@ -19,7 +19,7 @@
<span class="divider">&nbsp;|&nbsp;</span>
<a id="unflag-expand-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>
</a>
<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.add_comment(commentable_id, comment_html);
<% 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.add_reply(parent_id, comment_html);
<% end -%>

View File

@@ -1,5 +1,5 @@
<% dom_id = parent_or_commentable_dom_id(@comment.parent_id, @commentable) %>
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">
<% 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>
</a>
<span class="dropdown-pane" id="flag-drop-debate-<%= debate.id %>" data-dropdown data-auto-focus="true">
@@ -9,7 +9,7 @@
<% end %>
<% 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>
</a>
<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) %>",
"<%= j render('follow_button', follow: @follow) %>",
"<%= j render('layouts/flash') %>")
"<%= j render("follow_button", follow: @follow) %>",
"<%= j render("layouts/flash") %>")

View File

@@ -2,7 +2,7 @@
<div class="row">
<div class="small-12 large-4 column">
<h1 class="logo">
<%= link_to t("layouts.header.open_gov", open: "#{t('layouts.header.open')}").html_safe %>
<%= link_to t("layouts.header.open_gov", open: "#{t("layouts.header.open")}").html_safe %>
</h1>
<p class="info">
@@ -37,7 +37,7 @@
<ul>
<% if setting["twitter_handle"] %>
<li class="inline-block">
<%= link_to "https://twitter.com/#{setting['twitter_handle']}", target: "_blank",
<%= link_to "https://twitter.com/#{setting["twitter_handle"]}", target: "_blank",
title: t("shared.go_to_page") + t("social.twitter", org: setting["org_name"]) + t("shared.target_blank_html") do %>
<span class="show-for-sr"><%= t("social.twitter", org: setting["org_name"]) %></span>
<span class="icon-twitter" aria-hidden="true"></span>
@@ -46,7 +46,7 @@
<% end %>
<% if setting["facebook_handle"] %>
<li class="inline-block">
<%= link_to "https://www.facebook.com/#{setting['facebook_handle']}/", target: "_blank",
<%= link_to "https://www.facebook.com/#{setting["facebook_handle"]}/", target: "_blank",
title: t("shared.go_to_page") + t("social.facebook", org: setting["org_name"]) + t("shared.target_blank_html") do %>
<span class="show-for-sr"><%= t("social.facebook", org: setting["org_name"]) %></span>
<span class="icon-facebook" aria-hidden="true"></span>
@@ -55,7 +55,7 @@
<% end %>
<% if setting["youtube_handle"] %>
<li class="inline-block">
<%= link_to "https://www.youtube.com/#{setting['youtube_handle']}", target: "_blank",
<%= link_to "https://www.youtube.com/#{setting["youtube_handle"]}", target: "_blank",
title: t("shared.go_to_page") + t("social.youtube", org: setting["org_name"]) + t("shared.target_blank_html") do %>
<span class="show-for-sr"><%= t("social.youtube", org: setting["org_name"]) %></span>
<span class="icon-youtube" aria-hidden="true"></span>
@@ -64,7 +64,7 @@
<% end %>
<% if setting["telegram_handle"] %>
<li class="inline-block">
<%= link_to "https://www.telegram.me/#{setting['telegram_handle']}", target: "_blank",
<%= link_to "https://www.telegram.me/#{setting["telegram_handle"]}", target: "_blank",
title: t("shared.go_to_page") + t("social.telegram", org: setting["org_name"]) + t("shared.target_blank_html") do %>
<span class="show-for-sr"><%= t("social.telegram", org: setting["org_name"]) %></span>
<span class="icon-telegram" aria-hidden="true"></span>
@@ -73,7 +73,7 @@
<% end %>
<% if setting["instagram_handle"] %>
<li class="inline-block">
<%= link_to "https://www.instagram.com/#{setting['instagram_handle']}", target: "_blank",
<%= link_to "https://www.instagram.com/#{setting["instagram_handle"]}", target: "_blank",
title: t("shared.go_to_page") + t("social.instagram", org: setting["org_name"]) + t("shared.target_blank_html") do %>
<span class="show-for-sr"><%= t("social.instagram", org: setting["org_name"]) %></span>
<span class="icon-instagram" aria-hidden="true"></span>

View File

@@ -6,7 +6,7 @@
<%= content_for :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-inner" data-off-canvas-wrapper>
<div class="off-canvas position-left" id="offCanvas" data-off-canvas>

View File

@@ -1,7 +1,7 @@
<span class="icon-comment" aria-hidden="true"></span>
<div class="comment-number">
<%= t('legislation.annotations.comments.comments_count',
<%= t("legislation.annotations.comments.comments_count",
count: annotation.comments.roots.count) %>
</div>

View File

@@ -1,7 +1,7 @@
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 {
$("#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 sub_annotation_ids = current_annotation_link.split("=")[1];

View File

@@ -1,4 +1,4 @@
<% provide :title do %><%= "#{t('.title')} - #{@draft_version.title} - #{@process.title}" %><% end %>
<% provide :title do %><%= "#{t(".title")} - #{@draft_version.title} - #{@process.title}" %><% end %>
<%= render "legislation/processes/header", process: @process, header: :small %>

View File

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

View File

@@ -1,4 +1,4 @@
<% provide :title do %><%= "#{t('.title')} - #{@draft_version.title} - #{@process.title}" %><% end %>
<% provide :title do %><%= "#{t(".title")} - #{@draft_version.title} - #{@process.title}" %><% end %>
<%= render "legislation/processes/header", process: @process, header: :small %>

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 @@
<% provide :title do %><%= "#{@draft_version.title} - #{t('.title')} - #{@process.title}" %><% end %>
<% provide :title do %><%= "#{@draft_version.title} - #{t(".title")} - #{@process.title}" %><% end %>
<%= render "legislation/processes/header", process: @process, header: :small %>

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="small-12 column">
<% if process.enabled_phases? %>

View File

@@ -1,7 +1,7 @@
<span class="js-flag-actions">
<span class="flag-content">
<% 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>
</a>
<span class="dropdown-pane" id="flag-drop-proposal-<%= proposal.id %>" data-dropdown data-auto-focus="true">
@@ -10,7 +10,7 @@
<% end %>
<% 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>
</a>
<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) %>"
class="proposal clear <%= ("successful" if proposal.total_votes > Proposal.votes_needed_for_success) %>"
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>
<% 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| %>
<% 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 %>
<span class="control-indicator"></span>
<%= question_option.value %>
@@ -16,7 +16,7 @@
<form class="controls-stacked disabled">
<% 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">
<span class="control-indicator"></span>
<%= question_option.value %>

View File

@@ -11,7 +11,7 @@
<ul>
<% [:debates, :create_proposals, :support_proposals, :vote_proposals].each do |permission| %>
<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}") %>
</li>
<% 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_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"),
aria: {describedby: "emails-help-text"} %>
<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>
<% 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?) %>
<% locals = { notification: notification,
timestamp: notification.timestamp,

View File

@@ -74,7 +74,7 @@
<% results_by_booth = @partial_results.group_by(&:booth_assignment_id) %>
<% results_by_booth.keys.each do |booth_assignment| %>
<% 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>
<%= l(date, format: :long) %>
</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();
$(".js-vote-collection").removeClass("is-hidden");

View File

@@ -1,2 +1,2 @@
<% 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">
<% @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? %>
<h3><%= answer.title %></h3>

View File

@@ -1,6 +1,6 @@
<span class="flag-content">
<% 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>
</a>
<span class="dropdown-pane" id="flag-drop-proposal-<%= proposal.id %>" data-dropdown data-auto-focus="true">
@@ -9,7 +9,7 @@
<% end %>
<% 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>
</a>
<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
<%= ("successful" if proposal.total_votes > Proposal.votes_needed_for_success) %>"
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>
<% 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) %>
<!-- Twitter -->
<meta name="twitter:card" content="summary"/>
<meta name="twitter:site" content="<%= setting['twitter_handle'] %>"/>
<meta name="twitter:title" content="<%= local_assigns[:social_title] || setting['meta_title'] %>"/>
<meta name="twitter:site" content="<%= setting["twitter_handle"] %>"/>
<meta name="twitter:title" content="<%= local_assigns[:social_title] || setting["meta_title"] %>"/>
<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 -->
<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"] %>
<meta property="article:publisher" content="<%= setting['url'] %>"/>
<meta property="article:publisher" content="<%= setting["url"] %>"/>
<% end %>
<% 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 %>
<meta property="og:type" content="article"/>
<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 property="og:site_name" content="<%= setting['org_name'] %>"/>
<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 id="ogdescription" property="og:description" content="<%= description %>"/>
<meta property="fb:app_id" content="<%= Rails.application.secrets.facebook_key %>"/>

View File

@@ -1,14 +1,14 @@
<% description = local_assigns.fetch(:description, "") %>
<% description = truncate(ActionView::Base.full_sanitizer.sanitize(description), length: 140) %>
<% mobile = local_assigns[:mobile] %>
<% mobile_url = mobile.present? ? "#{mobile.gsub(/\s+/, '%20')}%20" : "" %>
<% mobile_url = mobile.present? ? "#{mobile.gsub(/\s+/, "%20")}%20" : "" %>
<% if local_assigns[:share_title].present? %>
<div id="social-share" class="sidebar-divider"></div>
<p class="sidebar-title"><%= share_title %></p>
<% end %>
<div class="social-share-full">
<%= social_share_button_tag("#{title} #{setting['twitter_hashtag']} #{setting['twitter_handle']}",
<%= social_share_button_tag("#{title} #{setting["twitter_hashtag"]} #{setting["twitter_handle"]}",
url: local_assigns[:url],
image: local_assigns.fetch(:image_url, ""),
desc: description,

View File

@@ -4,7 +4,7 @@
<% voting_allowed = true unless reason.presence == :not_voting_allowed %>
<% 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) %>
</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.debates') %>" : <%= number_with_delimiter(@debates) %>",
"<%= t('stats.index.proposals') %>" : "<%= number_with_delimiter(@proposals) %>",
"<%= t('stats.index.comments') %>" : "<%= number_with_delimiter(@comments) %>",
"<%= t('stats.index.proposal_votes') %>" : "<%= number_with_delimiter(@proposal_votes) %>",
"<%= t('stats.index.debate_votes') %>" : "<%= number_with_delimiter(@debate_votes) %>",
"<%= t('stats.index.comment_votes') %>" : "<%= number_with_delimiter(@comment_votes) %>",
"<%= t('stats.index.votes') %>" : "<%= number_with_delimiter(@votes) %>",
"<%= t('stats.index.verified_users') %>" : "<%= number_with_delimiter(@verified_users) %>",
"<%= t('stats.index.unverified_users') %>" : "<%= number_with_delimiter(@unverified_users) %>"
"<%= t("stats.index.visits") %>" : "<%= number_with_delimiter(@visits) %>",
"<%= t("stats.index.debates") %>" : <%= number_with_delimiter(@debates) %>",
"<%= t("stats.index.proposals") %>" : "<%= number_with_delimiter(@proposals) %>",
"<%= t("stats.index.comments") %>" : "<%= number_with_delimiter(@comments) %>",
"<%= t("stats.index.proposal_votes") %>" : "<%= number_with_delimiter(@proposal_votes) %>",
"<%= t("stats.index.debate_votes") %>" : "<%= number_with_delimiter(@debate_votes) %>",
"<%= t("stats.index.comment_votes") %>" : "<%= number_with_delimiter(@comment_votes) %>",
"<%= t("stats.index.votes") %>" : "<%= number_with_delimiter(@votes) %>",
"<%= t("stats.index.verified_users") %>" : "<%= number_with_delimiter(@verified_users) %>",
"<%= t("stats.index.unverified_users") %>" : "<%= number_with_delimiter(@unverified_users) %>"
}

View File

@@ -6,7 +6,7 @@
<% if can? :destroy, budget_investment %>
<%= link_to t("shared.delete"), budget_investment_path(budget_investment.budget, budget_investment),
method: :delete, class: "button hollow alert expanded",
data: {confirm: "#{t('users.show.delete_alert')}"} %>
data: {confirm: "#{t("users.show.delete_alert")}"} %>
<% end %>
</td>
</tr>

View File

@@ -1,6 +1,6 @@
<%= link_to valuation_budget_budget_investment_path(@budget, @investment), class: "back" do %>
<span class="icon-angle-left"></span>
<%= "#{t('valuation.budget_investments.show.title')} #{@investment.id}"%>
<%= "#{t("valuation.budget_investments.show.title")} #{@investment.id}"%>
<% end %>
<h2><%= t("valuation.budget_investments.edit.dossier") %></h2>
@@ -50,12 +50,12 @@
<div class="row">
<div class="small-12 medium-6 column">
<%= f.label :price, "#{t('valuation.budget_investments.edit.price_html', currency: @budget.currency_symbol)}" %>
<%= f.label :price, "#{t("valuation.budget_investments.edit.price_html", currency: @budget.currency_symbol)}" %>
<%= f.number_field :price, label: false, max: 1000000000000000 %>
</div>
<div class="small-12 medium-6 column end">
<%= f.label :price_first_year, "#{t('valuation.budget_investments.edit.price_first_year_html', currency: @budget.currency_symbol)}" %>
<%= f.label :price_first_year, "#{t("valuation.budget_investments.edit.price_first_year_html", currency: @budget.currency_symbol)}" %>
<%= f.number_field :price_first_year, label: false, max: 1000000000000000 %>
</div>
</div>

View File

@@ -8,7 +8,7 @@
<div class="small-12 medium-4 column select-heading">
<% slice.each do |filter| %>
<%= link_to valuation_budget_budget_investments_path(budget_id: @budget.id, heading_id: filter[:id]),
class: "#{'is-active' if params[:heading_id].to_s == filter[:id].to_s}" do %>
class: "#{"is-active" if params[:heading_id].to_s == filter[:id].to_s}" do %>
<%= filter[:name] %> (<%= filter[:count] %>)
<% end %>
<% end %>

View File

@@ -1,4 +1,4 @@
<%= link_to "#{t('valuation.spending_proposals.show.heading')} #{@spending_proposal.id}", valuation_spending_proposal_path(@spending_proposal), class: "back" %>
<%= link_to "#{t("valuation.spending_proposals.show.heading")} #{@spending_proposal.id}", valuation_spending_proposal_path(@spending_proposal), class: "back" %>
<h2><%= t("valuation.spending_proposals.edit.dossier") %></h2>
<%= form_for(@spending_proposal, url: valuate_valuation_spending_proposal_path(@spending_proposal), html: {id: "valuation_spending_proposal_edit_form"}) do |f| %>
@@ -46,12 +46,12 @@
<div class="row">
<div class="small-12 medium-4 column">
<%= f.label :price, "#{t('valuation.spending_proposals.edit.price_html', currency: t('valuation.spending_proposals.edit.currency'))}" %>
<%= f.label :price, "#{t("valuation.spending_proposals.edit.price_html", currency: t("valuation.spending_proposals.edit.currency"))}" %>
<%= f.number_field :price, label: false, max: 1000000000000000 %>
</div>
<div class="small-12 medium-4 column end">
<%= f.label :price_first_year, "#{t('valuation.spending_proposals.edit.price_first_year_html', currency: t('valuation.spending_proposals.edit.currency'))}" %>
<%= f.label :price_first_year, "#{t("valuation.spending_proposals.edit.price_first_year_html", currency: t("valuation.spending_proposals.edit.currency"))}" %>
<%= f.number_field :price_first_year, label: false, max: 1000000000000000 %>
</div>
</div>

View File

@@ -5,7 +5,7 @@
<div class="small-12 medium-4 column select-geozone">
<% slice.each do |filter| %>
<%= link_to valuation_spending_proposals_path(geozone_id: filter[:id]),
class: "#{'is-active' if params[:geozone_id].to_s == filter[:id].to_s}" do %>
class: "#{"is-active" if params[:geozone_id].to_s == filter[:id].to_s}" do %>
<%= filter[:name] %>&nbsp;(<%= filter[:pending_count] %>)
<% end %>
<% end %>

View File

@@ -3,14 +3,14 @@
<% if feed_proposals?(feed) %>
<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>
<h3 class="title"><%= t("welcome.feed.most_active.#{feed.kind}") %></h3>
<% 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
<%= '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>
<p><%= item.summary %></p>
</div>
@@ -32,12 +32,12 @@
<% if feed_debates?(feed) %>
<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>
<h3 class="title"><%= t("welcome.feed.most_active.#{feed.kind}") %></h3>
<% 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>
</div>
<% end %>

View File

@@ -1,11 +1,11 @@
<% if header.present? %>
<div class="jumbo highlight">
<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>
<h1><%= header.title %></h1>
<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" %>
</div>
</div>

View File

@@ -8,7 +8,7 @@
<% feed.items.each do |item| %>
<%= 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: "") %>
<figcaption>
<span><%= t("welcome.feed.process_label") %></span><br>

View File

@@ -21,7 +21,7 @@
<div class="row">
<% 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" %>
</div>
<% end %>

View File

@@ -6,7 +6,7 @@ default: &default
pool: 5
port: 5432
username: postgres
password: <%= ENV['POSTGRES_PASSWORD'] %>
password: <%= ENV["POSTGRES_PASSWORD"] %>
development: &development
<<: *default

View File

@@ -3,7 +3,7 @@ Ckeditor.setup do |config|
# Load and configure the ORM. Supports :active_record (default), :mongo_mapper and
# :mongoid (bson_ext recommended) by default. Other ORMs may be
# available as additional gems.
require 'ckeditor/orm/active_record'
require "ckeditor/orm/active_record"
config.authorize_with :cancan

View File

@@ -15,7 +15,7 @@ Devise.setup do |config|
if Rails.env.test? || !ActiveRecord::Base.connection.table_exists?("settings")
config.mailer_sender = "noreply@consul.dev"
else
config.mailer_sender = "'#{Setting['mailer_from_name']}' <#{Setting['mailer_from_address']}>"
config.mailer_sender = "'#{Setting["mailer_from_name"]}' <#{Setting["mailer_from_address"]}>"
end
# Configure the class responsible to send e-mails.

Some files were not shown because too many files have changed in this diff Show More