Use double quotes inside string interpolation
This commit is contained in:
@@ -24,6 +24,6 @@ class StatsController < ApplicationController
|
|||||||
private
|
private
|
||||||
|
|
||||||
def daily_cache(key, &block)
|
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
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ module DocumentablesHelper
|
|||||||
|
|
||||||
def accepted_content_types_extensions(documentable_class)
|
def accepted_content_types_extensions(documentable_class)
|
||||||
documentable_class.accepted_content_types
|
documentable_class.accepted_content_types
|
||||||
.collect{ |content_type| ".#{content_type.split('/').last}" }
|
.collect{ |content_type| ".#{content_type.split("/").last}" }
|
||||||
.join(",")
|
.join(",")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ module ImageablesHelper
|
|||||||
|
|
||||||
def imageable_accepted_content_types_extensions
|
def imageable_accepted_content_types_extensions
|
||||||
Image::ACCEPTED_CONTENT_TYPE
|
Image::ACCEPTED_CONTENT_TYPE
|
||||||
.collect{ |content_type| ".#{content_type.split('/').last}" }
|
.collect{ |content_type| ".#{content_type.split("/").last}" }
|
||||||
.join(",")
|
.join(",")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -57,9 +57,9 @@ module MapLocationsHelper
|
|||||||
map_tiles_provider_attribution: Rails.application.secrets.map_tiles_provider_attribution,
|
map_tiles_provider_attribution: Rails.application.secrets.map_tiles_provider_attribution,
|
||||||
marker_editable: editable,
|
marker_editable: editable,
|
||||||
marker_remove_selector: "##{map_location_remove_marker_link_id(map_location)}",
|
marker_remove_selector: "##{map_location_remove_marker_link_id(map_location)}",
|
||||||
latitude_input_selector: "##{map_location_input_id(parent_class, 'latitude')}",
|
latitude_input_selector: "##{map_location_input_id(parent_class, "latitude")}",
|
||||||
longitude_input_selector: "##{map_location_input_id(parent_class, 'longitude')}",
|
longitude_input_selector: "##{map_location_input_id(parent_class, "longitude")}",
|
||||||
zoom_input_selector: "##{map_location_input_id(parent_class, 'zoom')}",
|
zoom_input_selector: "##{map_location_input_id(parent_class, "zoom")}",
|
||||||
marker_investments_coordinates: investments_coordinates
|
marker_investments_coordinates: investments_coordinates
|
||||||
}
|
}
|
||||||
options[:marker_latitude] = map_location.latitude if map_location.latitude.present?
|
options[:marker_latitude] = map_location.latitude if map_location.latitude.present?
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ module ValuationHelper
|
|||||||
when 0
|
when 0
|
||||||
t("valuation.budget_investments.index.no_valuators_assigned")
|
t("valuation.budget_investments.index.no_valuators_assigned")
|
||||||
when 1
|
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 +
|
valuators.first.name +
|
||||||
"</span>".html_safe
|
"</span>".html_safe
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
class ApplicationMailer < ActionMailer::Base
|
class ApplicationMailer < ActionMailer::Base
|
||||||
helper :settings
|
helper :settings
|
||||||
default from: "#{Setting['mailer_from_name']} <#{Setting['mailer_from_address']}>"
|
default from: "#{Setting["mailer_from_name"]} <#{Setting["mailer_from_address"]}>"
|
||||||
layout "mailer"
|
layout "mailer"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ class Budget
|
|||||||
end
|
end
|
||||||
|
|
||||||
def code
|
def code
|
||||||
"#{created_at.strftime('%Y')}-#{id}" + (administrator.present? ? "-A#{administrator.id}" : "")
|
"#{created_at.strftime("%Y")}-#{id}" + (administrator.present? ? "-A#{administrator.id}" : "")
|
||||||
end
|
end
|
||||||
|
|
||||||
def send_unfeasible_email
|
def send_unfeasible_email
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ class Legislation::Proposal < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def code
|
def code
|
||||||
"#{Setting['proposal_code_prefix']}-#{created_at.strftime('%Y-%m')}-#{id}"
|
"#{Setting["proposal_code_prefix"]}-#{created_at.strftime("%Y-%m")}-#{id}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def after_commented
|
def after_commented
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ class Proposal < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def code
|
def code
|
||||||
"#{Setting['proposal_code_prefix']}-#{created_at.strftime('%Y-%m')}-#{id}"
|
"#{Setting["proposal_code_prefix"]}-#{created_at.strftime("%Y-%m")}-#{id}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def after_commented
|
def after_commented
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ class SpendingProposal < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def code
|
def code
|
||||||
"#{created_at.strftime('%Y')}-#{id}" + (administrator.present? ? "-A#{administrator.id}" : "")
|
"#{created_at.strftime("%Y")}-#{id}" + (administrator.present? ? "-A#{administrator.id}" : "")
|
||||||
end
|
end
|
||||||
|
|
||||||
def send_unfeasible_email
|
def send_unfeasible_email
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ class User < ActiveRecord::Base
|
|||||||
Poll::Voter.where(user_id: other_user.id).update_all(user_id: id)
|
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)
|
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)
|
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}")
|
update(former_users_data_log: "#{former_users_data_log} | #{data_log}")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
<%= f.hidden_field :value,
|
<%= f.hidden_field :value,
|
||||||
value: (setting.enabled? ? "" : "active") %>
|
value: (setting.enabled? ? "" : "active") %>
|
||||||
|
|
||||||
<%= f.submit(t("admin.settings.index.features.#{setting.enabled? ? 'disable' : 'enable'}"),
|
<%= f.submit(t("admin.settings.index.features.#{setting.enabled? ? "disable" : "enable"}"),
|
||||||
class: "button #{setting.enabled? ? 'hollow alert' : 'success'}",
|
class: "button #{setting.enabled? ? "hollow alert" : "success"}",
|
||||||
data: {confirm: t("admin.actions.confirm")}) %>
|
data: {confirm: t("admin.actions.confirm")}) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<% if draft_version.status == "draft" %>
|
<% if draft_version.status == "draft" %>
|
||||||
<%= t("admin.legislation.draft_versions.statuses.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 %>
|
<% else %>
|
||||||
<%= t("admin.legislation.draft_versions.statuses.published") %>
|
<%= t("admin.legislation.draft_versions.statuses.published") %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -35,8 +35,8 @@
|
|||||||
<%= form_for(feature, url: admin_setting_path(feature), html: { id: "edit_#{dom_id(feature)}"}) do |f| %>
|
<%= 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.hidden_field :value, id: dom_id(feature), value: (feature.enabled? ? "" : "active") %>
|
||||||
<%= f.submit(t("admin.settings.index.features.#{feature.enabled? ? 'disable' : 'enable'}"),
|
<%= f.submit(t("admin.settings.index.features.#{feature.enabled? ? "disable" : "enable"}"),
|
||||||
class: "button expanded #{feature.enabled? ? 'hollow alert' : 'success'}",
|
class: "button expanded #{feature.enabled? ? "hollow alert" : "success"}",
|
||||||
data: {confirm: t("admin.actions.confirm")}) %>
|
data: {confirm: t("admin.actions.confirm")}) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -37,5 +37,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</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 %>
|
<% end %>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="small-12 large-4 column">
|
<div class="small-12 large-4 column">
|
||||||
<h1 class="logo">
|
<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>
|
</h1>
|
||||||
|
|
||||||
<p class="info">
|
<p class="info">
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<% if setting["twitter_handle"] %>
|
<% if setting["twitter_handle"] %>
|
||||||
<li class="inline-block">
|
<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 %>
|
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="show-for-sr"><%= t("social.twitter", org: setting["org_name"]) %></span>
|
||||||
<span class="icon-twitter" aria-hidden="true"></span>
|
<span class="icon-twitter" aria-hidden="true"></span>
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<% if setting["facebook_handle"] %>
|
<% if setting["facebook_handle"] %>
|
||||||
<li class="inline-block">
|
<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 %>
|
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="show-for-sr"><%= t("social.facebook", org: setting["org_name"]) %></span>
|
||||||
<span class="icon-facebook" aria-hidden="true"></span>
|
<span class="icon-facebook" aria-hidden="true"></span>
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<% if setting["youtube_handle"] %>
|
<% if setting["youtube_handle"] %>
|
||||||
<li class="inline-block">
|
<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 %>
|
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="show-for-sr"><%= t("social.youtube", org: setting["org_name"]) %></span>
|
||||||
<span class="icon-youtube" aria-hidden="true"></span>
|
<span class="icon-youtube" aria-hidden="true"></span>
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<% if setting["telegram_handle"] %>
|
<% if setting["telegram_handle"] %>
|
||||||
<li class="inline-block">
|
<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 %>
|
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="show-for-sr"><%= t("social.telegram", org: setting["org_name"]) %></span>
|
||||||
<span class="icon-telegram" aria-hidden="true"></span>
|
<span class="icon-telegram" aria-hidden="true"></span>
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<% if setting["instagram_handle"] %>
|
<% if setting["instagram_handle"] %>
|
||||||
<li class="inline-block">
|
<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 %>
|
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="show-for-sr"><%= t("social.instagram", org: setting["org_name"]) %></span>
|
||||||
<span class="icon-instagram" aria-hidden="true"></span>
|
<span class="icon-instagram" aria-hidden="true"></span>
|
||||||
|
|||||||
@@ -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 %>
|
<%= render "legislation/processes/header", process: @process, header: :small %>
|
||||||
|
|
||||||
|
|||||||
@@ -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 %>
|
<%= render "legislation/processes/header", process: @process, header: :small %>
|
||||||
|
|
||||||
|
|||||||
@@ -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 %>
|
<%= render "legislation/processes/header", process: @process, header: :small %>
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
<% description = local_assigns.fetch(:description, "") %>
|
<% description = local_assigns.fetch(:description, "") %>
|
||||||
<% description = truncate(ActionView::Base.full_sanitizer.sanitize(description), length: 140) %>
|
<% description = truncate(ActionView::Base.full_sanitizer.sanitize(description), length: 140) %>
|
||||||
<% mobile = local_assigns[:mobile] %>
|
<% 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? %>
|
<% if local_assigns[:share_title].present? %>
|
||||||
<div id="social-share" class="sidebar-divider"></div>
|
<div id="social-share" class="sidebar-divider"></div>
|
||||||
<p class="sidebar-title"><%= share_title %></p>
|
<p class="sidebar-title"><%= share_title %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="social-share-full">
|
<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],
|
url: local_assigns[:url],
|
||||||
image: local_assigns.fetch(:image_url, ""),
|
image: local_assigns.fetch(:image_url, ""),
|
||||||
desc: description,
|
desc: description,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<% if can? :destroy, budget_investment %>
|
<% if can? :destroy, budget_investment %>
|
||||||
<%= link_to t("shared.delete"), budget_investment_path(budget_investment.budget, budget_investment),
|
<%= link_to t("shared.delete"), budget_investment_path(budget_investment.budget, budget_investment),
|
||||||
method: :delete, class: "button hollow alert expanded",
|
method: :delete, class: "button hollow alert expanded",
|
||||||
data: {confirm: "#{t('users.show.delete_alert')}"} %>
|
data: {confirm: "#{t("users.show.delete_alert")}"} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<%= link_to valuation_budget_budget_investment_path(@budget, @investment), class: "back" do %>
|
<%= link_to valuation_budget_budget_investment_path(@budget, @investment), class: "back" do %>
|
||||||
<span class="icon-angle-left"></span>
|
<span class="icon-angle-left"></span>
|
||||||
<%= "#{t('valuation.budget_investments.show.title')} #{@investment.id}"%>
|
<%= "#{t("valuation.budget_investments.show.title")} #{@investment.id}"%>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<h2><%= t("valuation.budget_investments.edit.dossier") %></h2>
|
<h2><%= t("valuation.budget_investments.edit.dossier") %></h2>
|
||||||
@@ -50,12 +50,12 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="small-12 medium-6 column">
|
<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 %>
|
<%= f.number_field :price, label: false, max: 1000000000000000 %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="small-12 medium-6 column end">
|
<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 %>
|
<%= f.number_field :price_first_year, label: false, max: 1000000000000000 %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<div class="small-12 medium-4 column select-heading">
|
<div class="small-12 medium-4 column select-heading">
|
||||||
<% slice.each do |filter| %>
|
<% slice.each do |filter| %>
|
||||||
<%= link_to valuation_budget_budget_investments_path(budget_id: @budget.id, heading_id: filter[:id]),
|
<%= 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] %>)
|
<%= filter[:name] %> (<%= filter[:count] %>)
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -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>
|
<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| %>
|
<%= 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="row">
|
||||||
<div class="small-12 medium-4 column">
|
<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 %>
|
<%= f.number_field :price, label: false, max: 1000000000000000 %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="small-12 medium-4 column end">
|
<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 %>
|
<%= f.number_field :price_first_year, label: false, max: 1000000000000000 %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<div class="small-12 medium-4 column select-geozone">
|
<div class="small-12 medium-4 column select-geozone">
|
||||||
<% slice.each do |filter| %>
|
<% slice.each do |filter| %>
|
||||||
<%= link_to valuation_spending_proposals_path(geozone_id: filter[:id]),
|
<%= 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] %> (<%= filter[:pending_count] %>)
|
<%= filter[:name] %> (<%= filter[:pending_count] %>)
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ Devise.setup do |config|
|
|||||||
if Rails.env.test? || !ActiveRecord::Base.connection.table_exists?("settings")
|
if Rails.env.test? || !ActiveRecord::Base.connection.table_exists?("settings")
|
||||||
config.mailer_sender = "noreply@consul.dev"
|
config.mailer_sender = "noreply@consul.dev"
|
||||||
else
|
else
|
||||||
config.mailer_sender = "'#{Setting['mailer_from_name']}' <#{Setting['mailer_from_address']}>"
|
config.mailer_sender = "'#{Setting["mailer_from_name"]}' <#{Setting["mailer_from_address"]}>"
|
||||||
end
|
end
|
||||||
|
|
||||||
# Configure the class responsible to send e-mails.
|
# Configure the class responsible to send e-mails.
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ section "Creating Investments" do
|
|||||||
group: heading.group,
|
group: heading.group,
|
||||||
budget: heading.group.budget,
|
budget: heading.group.budget,
|
||||||
title: Faker::Lorem.sentence(3).truncate(60),
|
title: Faker::Lorem.sentence(3).truncate(60),
|
||||||
description: "<p>#{Faker::Lorem.paragraphs.join('</p><p>')}</p>",
|
description: "<p>#{Faker::Lorem.paragraphs.join("</p><p>")}</p>",
|
||||||
created_at: rand((Time.current - 1.week)..Time.current),
|
created_at: rand((Time.current - 1.week)..Time.current),
|
||||||
feasibility: %w[undecided unfeasible feasible feasible feasible feasible].sample,
|
feasibility: %w[undecided unfeasible feasible feasible feasible feasible].sample,
|
||||||
unfeasibility_explanation: Faker::Lorem.paragraph,
|
unfeasibility_explanation: Faker::Lorem.paragraph,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ section "Creating Debates" do
|
|||||||
tags = Faker::Lorem.words(25)
|
tags = Faker::Lorem.words(25)
|
||||||
30.times do
|
30.times do
|
||||||
author = User.all.sample
|
author = User.all.sample
|
||||||
description = "<p>#{Faker::Lorem.paragraphs.join('</p><p>')}</p>"
|
description = "<p>#{Faker::Lorem.paragraphs.join("</p><p>")}</p>"
|
||||||
Debate.create!(author: author,
|
Debate.create!(author: author,
|
||||||
title: Faker::Lorem.sentence(3).truncate(60),
|
title: Faker::Lorem.sentence(3).truncate(60),
|
||||||
created_at: rand((Time.current - 1.week)..Time.current),
|
created_at: rand((Time.current - 1.week)..Time.current),
|
||||||
@@ -15,7 +15,7 @@ section "Creating Debates" do
|
|||||||
tags = ActsAsTaggableOn::Tag.where(kind: "category")
|
tags = ActsAsTaggableOn::Tag.where(kind: "category")
|
||||||
30.times do
|
30.times do
|
||||||
author = User.all.sample
|
author = User.all.sample
|
||||||
description = "<p>#{Faker::Lorem.paragraphs.join('</p><p>')}</p>"
|
description = "<p>#{Faker::Lorem.paragraphs.join("</p><p>")}</p>"
|
||||||
Debate.create!(author: author,
|
Debate.create!(author: author,
|
||||||
title: Faker::Lorem.sentence(3).truncate(60),
|
title: Faker::Lorem.sentence(3).truncate(60),
|
||||||
created_at: rand((Time.current - 1.week)..Time.current),
|
created_at: rand((Time.current - 1.week)..Time.current),
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ section "Creating comment notifications" do
|
|||||||
User.find_each do |user|
|
User.find_each do |user|
|
||||||
debate = Debate.create!(author: user,
|
debate = Debate.create!(author: user,
|
||||||
title: Faker::Lorem.sentence(3).truncate(60),
|
title: Faker::Lorem.sentence(3).truncate(60),
|
||||||
description: "<p>#{Faker::Lorem.paragraphs.join('</p><p>')}</p>",
|
description: "<p>#{Faker::Lorem.paragraphs.join("</p><p>")}</p>",
|
||||||
tag_list: ActsAsTaggableOn::Tag.all.sample(3).join(","),
|
tag_list: ActsAsTaggableOn::Tag.all.sample(3).join(","),
|
||||||
geozone: Geozone.reorder("RANDOM()").first,
|
geozone: Geozone.reorder("RANDOM()").first,
|
||||||
terms_of_service: "1")
|
terms_of_service: "1")
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ section "Creating Poll Questions & Answers" do
|
|||||||
end
|
end
|
||||||
question.save!
|
question.save!
|
||||||
Faker::Lorem.words((2..4).to_a.sample).each do |title|
|
Faker::Lorem.words((2..4).to_a.sample).each do |title|
|
||||||
description = "<p>#{Faker::Lorem.paragraphs.join('</p><p>')}</p>"
|
description = "<p>#{Faker::Lorem.paragraphs.join("</p><p>")}</p>"
|
||||||
answer = Poll::Question::Answer.new(question: question,
|
answer = Poll::Question::Answer.new(question: question,
|
||||||
title: title.capitalize,
|
title: title.capitalize,
|
||||||
description: description)
|
description: description)
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ section "Creating Proposals" do
|
|||||||
tags = Faker::Lorem.words(25)
|
tags = Faker::Lorem.words(25)
|
||||||
30.times do
|
30.times do
|
||||||
author = User.all.sample
|
author = User.all.sample
|
||||||
description = "<p>#{Faker::Lorem.paragraphs.join('</p><p>')}</p>"
|
description = "<p>#{Faker::Lorem.paragraphs.join("</p><p>")}</p>"
|
||||||
proposal = Proposal.create!(author: author,
|
proposal = Proposal.create!(author: author,
|
||||||
title: Faker::Lorem.sentence(3).truncate(60),
|
title: Faker::Lorem.sentence(3).truncate(60),
|
||||||
question: Faker::Lorem.sentence(3) + "?",
|
question: Faker::Lorem.sentence(3) + "?",
|
||||||
@@ -46,7 +46,7 @@ section "Creating Archived Proposals" do
|
|||||||
tags = Faker::Lorem.words(25)
|
tags = Faker::Lorem.words(25)
|
||||||
5.times do
|
5.times do
|
||||||
author = User.all.sample
|
author = User.all.sample
|
||||||
description = "<p>#{Faker::Lorem.paragraphs.join('</p><p>')}</p>"
|
description = "<p>#{Faker::Lorem.paragraphs.join("</p><p>")}</p>"
|
||||||
proposal = Proposal.create!(author: author,
|
proposal = Proposal.create!(author: author,
|
||||||
title: Faker::Lorem.sentence(3).truncate(60),
|
title: Faker::Lorem.sentence(3).truncate(60),
|
||||||
question: Faker::Lorem.sentence(3) + "?",
|
question: Faker::Lorem.sentence(3) + "?",
|
||||||
@@ -67,7 +67,7 @@ section "Creating Successful Proposals" do
|
|||||||
tags = Faker::Lorem.words(25)
|
tags = Faker::Lorem.words(25)
|
||||||
10.times do
|
10.times do
|
||||||
author = User.all.sample
|
author = User.all.sample
|
||||||
description = "<p>#{Faker::Lorem.paragraphs.join('</p><p>')}</p>"
|
description = "<p>#{Faker::Lorem.paragraphs.join("</p><p>")}</p>"
|
||||||
proposal = Proposal.create!(author: author,
|
proposal = Proposal.create!(author: author,
|
||||||
title: Faker::Lorem.sentence(3).truncate(60),
|
title: Faker::Lorem.sentence(3).truncate(60),
|
||||||
question: Faker::Lorem.sentence(3) + "?",
|
question: Faker::Lorem.sentence(3) + "?",
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ section "Creating Spending Proposals" do
|
|||||||
60.times do
|
60.times do
|
||||||
geozone = Geozone.all.sample
|
geozone = Geozone.all.sample
|
||||||
author = User.all.sample
|
author = User.all.sample
|
||||||
description = "<p>#{Faker::Lorem.paragraphs.join('</p><p>')}</p>"
|
description = "<p>#{Faker::Lorem.paragraphs.join("</p><p>")}</p>"
|
||||||
feasible_explanation = "<p>#{Faker::Lorem.paragraphs.join('</p><p>')}</p>"
|
feasible_explanation = "<p>#{Faker::Lorem.paragraphs.join("</p><p>")}</p>"
|
||||||
valuation_finished = [true, false].sample
|
valuation_finished = [true, false].sample
|
||||||
feasible = [true, false].sample
|
feasible = [true, false].sample
|
||||||
created_at = rand((Time.current - 1.week)..Time.current)
|
created_at = rand((Time.current - 1.week)..Time.current)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ describe HasFilters do
|
|||||||
has_filters ["all", "pending", "reviewed"], only: :index
|
has_filters ["all", "pending", "reviewed"], only: :index
|
||||||
|
|
||||||
def index
|
def index
|
||||||
render text: "#{@current_filter} (#{@valid_filters.join(' ')})"
|
render text: "#{@current_filter} (#{@valid_filters.join(" ")})"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -10,11 +10,11 @@ describe HasOrders do
|
|||||||
has_orders ->(c) { ["votes_count", "flags_count"] }, only: :new
|
has_orders ->(c) { ["votes_count", "flags_count"] }, only: :new
|
||||||
|
|
||||||
def index
|
def index
|
||||||
render text: "#{@current_order} (#{@valid_orders.join(' ')})"
|
render text: "#{@current_order} (#{@valid_orders.join(" ")})"
|
||||||
end
|
end
|
||||||
|
|
||||||
def new
|
def new
|
||||||
render text: "#{@current_order} (#{@valid_orders.join(' ')})"
|
render text: "#{@current_order} (#{@valid_orders.join(" ")})"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ FactoryBot.define do
|
|||||||
postal_code "28002"
|
postal_code "28002"
|
||||||
end
|
end
|
||||||
|
|
||||||
sequence(:document_number) { |n| "#{n.to_s.rjust(8, '0')}X" }
|
sequence(:document_number) { |n| "#{n.to_s.rjust(8, "0")}X" }
|
||||||
|
|
||||||
factory :verification_residence, class: Verification::Residence do
|
factory :verification_residence, class: Verification::Residence do
|
||||||
user
|
user
|
||||||
|
|||||||
Reference in New Issue
Block a user