Add and apply ArgumentAlignment rubocop rule
We're choosing the default `with_first_argument` style because it's the one we use the most.
This commit is contained in:
@@ -18,6 +18,9 @@ Bundler/OrderedGems:
|
||||
Enabled: true
|
||||
ConsiderPunctuation: true
|
||||
|
||||
Layout/ArgumentAlignment:
|
||||
Enabled: true
|
||||
|
||||
Layout/ArrayAlignment:
|
||||
Enabled: true
|
||||
|
||||
|
||||
@@ -20,20 +20,20 @@
|
||||
|
||||
<% if feature?(:map) %>
|
||||
<%= f.select :geozone_id,
|
||||
geozone_options,
|
||||
include_blank: t("geozones.none"),
|
||||
hint: t("admin.budget_headings.form.geozone_info") %>
|
||||
geozone_options,
|
||||
include_blank: t("geozones.none"),
|
||||
hint: t("admin.budget_headings.form.geozone_info") %>
|
||||
<% end %>
|
||||
|
||||
<% if heading.budget.approval_voting? %>
|
||||
<%= f.number_field :max_ballot_lines,
|
||||
hint: t("admin.budget_headings.form.max_ballot_lines_info") %>
|
||||
hint: t("admin.budget_headings.form.max_ballot_lines_info") %>
|
||||
<% end %>
|
||||
|
||||
<%= f.text_field :population,
|
||||
maxlength: 8,
|
||||
data: { toggle_focus: "population-info" },
|
||||
hint: t("admin.budget_headings.form.population_info") %>
|
||||
maxlength: 8,
|
||||
data: { toggle_focus: "population-info" },
|
||||
hint: t("admin.budget_headings.form.population_info") %>
|
||||
|
||||
<%= f.text_field :latitude, maxlength: 22 %>
|
||||
<%= f.text_field :longitude, maxlength: 22 %>
|
||||
|
||||
@@ -39,9 +39,9 @@
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= translations_form.text_area :description,
|
||||
maxlength: Budget::Phase::DESCRIPTION_MAX_LENGTH,
|
||||
class: "html-area",
|
||||
hint: t("admin.budget_phases.edit.description_help_text") %>
|
||||
maxlength: Budget::Phase::DESCRIPTION_MAX_LENGTH,
|
||||
class: "html-area",
|
||||
hint: t("admin.budget_phases.edit.description_help_text") %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
<%= enabled_cell(phase) %>
|
||||
</td>
|
||||
<td>
|
||||
<%= render Admin::TableActionsComponent.new(phase,
|
||||
<%= render Admin::TableActionsComponent.new(
|
||||
phase,
|
||||
actions: [:edit],
|
||||
edit_path: edit_path(phase)
|
||||
) %>
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
<div class="row expanded">
|
||||
<div class="small-12 medium-9 large-6 column end">
|
||||
<%= translations_form.text_field :name,
|
||||
maxlength: Budget.title_max_length,
|
||||
hint: t("admin.budgets.edit.name_description") %>
|
||||
maxlength: Budget.title_max_length,
|
||||
hint: t("admin.budgets.edit.name_description") %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row expanded">
|
||||
@@ -67,9 +67,9 @@
|
||||
<% %w[administrators valuators].each do |staff| %>
|
||||
<div class="small-12 medium-6 large-3 column end">
|
||||
<%= link_to t("admin.budgets.edit.#{staff}", count: budget.send(staff).count),
|
||||
"#",
|
||||
class: "button expanded hollow js-budget-show-#{staff}-list js-budget-show-users-list",
|
||||
data: { toggle: "#{staff}_list", texts: t("admin.budgets.edit.#{staff}") } %>
|
||||
"#",
|
||||
class: "button expanded hollow js-budget-show-#{staff}-list js-budget-show-users-list",
|
||||
data: { toggle: "#{staff}_list", texts: t("admin.budgets.edit.#{staff}") } %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
<div class="callout primary">
|
||||
<p>
|
||||
<%= sanitize(t("admin.machine_learning.feature_disabled",
|
||||
link: link_to(t("admin.machine_learning.feature_disabled_link"),
|
||||
admin_settings_path(anchor: "tab-feature-flags")))) %>
|
||||
link: link_to(t("admin.machine_learning.feature_disabled_link"),
|
||||
admin_settings_path(anchor: "tab-feature-flags")))) %>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
</td>
|
||||
<td>
|
||||
<% if officer.persisted? %>
|
||||
<%= render Admin::TableActionsComponent.new(officer,
|
||||
<%= render Admin::TableActionsComponent.new(
|
||||
officer,
|
||||
actions: [:destroy],
|
||||
destroy_text: t("admin.poll_officers.officer.delete"),
|
||||
destroy_options: { class: "destroy-officer-link" }
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
<% else %>
|
||||
<div class="small-12 medium-6 large-4 column">
|
||||
<%= f.select :poll_id,
|
||||
options_for_select(select_options),
|
||||
prompt: t("admin.questions.index.select_poll"),
|
||||
hint: t("admin.questions.form.poll_help") %>
|
||||
options_for_select(select_options),
|
||||
prompt: t("admin.questions.index.select_poll"),
|
||||
hint: t("admin.questions.form.poll_help") %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<% if already_has_role? %>
|
||||
<%= render Admin::TableActionsComponent.new(record,
|
||||
<%= render Admin::TableActionsComponent.new(
|
||||
record,
|
||||
actions: actions,
|
||||
destroy_options: { class: "destroy-role-link" }
|
||||
) %>
|
||||
|
||||
@@ -46,10 +46,10 @@ class Attachable::FieldsComponent < ApplicationComponent
|
||||
def file_field
|
||||
klass = attachable.persisted? || attachable.cached_attachment.present? ? " hide" : ""
|
||||
f.file_field :attachment,
|
||||
label_options: { class: "button hollow #{klass}" },
|
||||
accept: accepted_content_types_extensions,
|
||||
class: "js-#{singular_name}-attachment",
|
||||
data: { url: direct_upload_path }
|
||||
label_options: { class: "button hollow #{klass}" },
|
||||
accept: accepted_content_types_extensions,
|
||||
class: "js-#{singular_name}-attachment",
|
||||
data: { url: direct_upload_path }
|
||||
end
|
||||
|
||||
def direct_upload_path
|
||||
|
||||
@@ -2,21 +2,22 @@
|
||||
<div class="filter">
|
||||
<%= label_tag :milestone_tag, t("budgets.executions.filters.milestone_tag.label") %>
|
||||
<%= select_tag :milestone_tag,
|
||||
options_for_select(
|
||||
options_for_milestone_tags,
|
||||
params[:milestone_tag]
|
||||
),
|
||||
prompt: t("budgets.executions.filters.milestone_tag.all",
|
||||
count: budget.investments.winners.with_milestones.count) %>
|
||||
options_for_select(
|
||||
options_for_milestone_tags,
|
||||
params[:milestone_tag]
|
||||
),
|
||||
prompt: t("budgets.executions.filters.milestone_tag.all",
|
||||
count: budget.investments.winners.with_milestones.count) %>
|
||||
</div>
|
||||
<div class="filter">
|
||||
<%= label_tag :status, t("budgets.executions.filters.status.label") %>
|
||||
<%= select_tag :status,
|
||||
options_from_collection_for_select(statuses,
|
||||
:id, lambda { |s| "#{s.name} (#{filters_select_counts(s.id)})" },
|
||||
params[:status]),
|
||||
prompt: t("budgets.executions.filters.status.all",
|
||||
count: budget.investments.winners.with_milestones.count) %>
|
||||
options_from_collection_for_select(statuses,
|
||||
:id,
|
||||
lambda { |s| "#{s.name} (#{filters_select_counts(s.id)})" },
|
||||
params[:status]),
|
||||
prompt: t("budgets.executions.filters.status.all",
|
||||
count: budget.investments.winners.with_milestones.count) %>
|
||||
</div>
|
||||
<div class="submit">
|
||||
<%= submit_tag t("shared.filter") %>
|
||||
|
||||
@@ -18,15 +18,15 @@
|
||||
<%= f.translatable_fields do |translations_form| %>
|
||||
<div>
|
||||
<%= translations_form.text_field :title,
|
||||
maxlength: Budget::Investment.title_max_length,
|
||||
data: suggest_data(investment) %>
|
||||
maxlength: Budget::Investment.title_max_length,
|
||||
data: suggest_data(investment) %>
|
||||
</div>
|
||||
<div class="js-suggest" data-locale="<%= translations_form.locale %>"></div>
|
||||
|
||||
<div>
|
||||
<%= translations_form.text_area :description,
|
||||
maxlength: Budget::Investment.description_max_length,
|
||||
class: "html-area" %>
|
||||
maxlength: Budget::Investment.description_max_length,
|
||||
class: "html-area" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</fieldset>
|
||||
@@ -94,11 +94,11 @@
|
||||
<% unless current_user.manager? || investment.persisted? %>
|
||||
<div>
|
||||
<%= f.check_box :terms_of_service,
|
||||
title: t("form.accept_terms_title"),
|
||||
label: t("form.accept_terms",
|
||||
policy: link_to(t("form.policy"), "/privacy", target: "blank"),
|
||||
conditions: link_to(t("form.conditions"), "/conditions", target: "blank")
|
||||
) %>
|
||||
title: t("form.accept_terms_title"),
|
||||
label: t("form.accept_terms",
|
||||
policy: link_to(t("form.policy"), "/privacy", target: "blank"),
|
||||
conditions: link_to(t("form.conditions"), "/conditions", target: "blank")
|
||||
) %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -10,13 +10,12 @@
|
||||
<% elsif assigned_heading.present? %>
|
||||
<p>
|
||||
<%= sanitize(t("budgets.investments.index.sidebar.different_heading_assigned",
|
||||
heading_link: heading_link(assigned_heading, budget)
|
||||
)) %>
|
||||
heading_link: heading_link(assigned_heading, budget))) %>
|
||||
<br>
|
||||
<small>
|
||||
<%= sanitize(t("budgets.investments.index.sidebar.change_ballot",
|
||||
check_ballot: link_to(t("budgets.investments.index.sidebar.check_ballot_link"),
|
||||
budget_ballot_path(budget)))) %>
|
||||
check_ballot: link_to(t("budgets.investments.index.sidebar.check_ballot_link"),
|
||||
budget_ballot_path(budget)))) %>
|
||||
</small>
|
||||
</p>
|
||||
<% else %>
|
||||
@@ -26,7 +25,7 @@
|
||||
<p>
|
||||
<%= sanitize(ballot.change_vote_info(
|
||||
link: link_to(t("budgets.investments.index.sidebar.change_vote_link"),
|
||||
budget_ballot_path(budget)))) %>
|
||||
budget_ballot_path(budget)))) %>
|
||||
</p>
|
||||
|
||||
<ul class="ballot-list">
|
||||
@@ -39,6 +38,6 @@
|
||||
</ul>
|
||||
|
||||
<%= link_to t("budgets.investments.header.check_ballot"),
|
||||
budget_ballot_path(budget),
|
||||
class: "button hollow expanded" %>
|
||||
budget_ballot_path(budget),
|
||||
class: "button hollow expanded" %>
|
||||
</div>
|
||||
|
||||
@@ -13,22 +13,22 @@
|
||||
</div>
|
||||
<% if feature?(:remove_investments_supports) %>
|
||||
<%= button_to remove_support_path,
|
||||
class: "button button-remove-support expanded",
|
||||
method: "delete",
|
||||
remote: true,
|
||||
"aria-label": remove_support_aria_label do %>
|
||||
class: "button button-remove-support expanded",
|
||||
method: "delete",
|
||||
remote: true,
|
||||
"aria-label": remove_support_aria_label do %>
|
||||
<%= t("budgets.investments.votes.remove_support") %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= button_to t("budgets.investments.votes.support"), support_path,
|
||||
class: "button button-support expanded",
|
||||
title: t("budgets.investments.investment.support_title"),
|
||||
method: "post",
|
||||
remote: !display_support_alert?,
|
||||
data: ({ confirm: confirm_vote_message } if display_support_alert?),
|
||||
"aria-label": support_aria_label %>
|
||||
class: "button button-support expanded",
|
||||
title: t("budgets.investments.investment.support_title"),
|
||||
method: "post",
|
||||
remote: !display_support_alert?,
|
||||
data: ({ confirm: confirm_vote_message } if display_support_alert?),
|
||||
"aria-label": support_aria_label %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -38,11 +38,11 @@
|
||||
<% if user_voted_for? && setting["twitter_handle"] %>
|
||||
<div class="share-supported">
|
||||
<%= render "shared/social_share",
|
||||
title: investment.title,
|
||||
image_url: image_absolute_url(investment.image, :thumb),
|
||||
url: budget_investment_url(investment.budget, investment),
|
||||
description: investment.title,
|
||||
mobile: investment.title %>
|
||||
title: investment.title,
|
||||
image_url: image_absolute_url(investment.image, :thumb),
|
||||
url: budget_investment_url(investment.budget, investment),
|
||||
description: investment.title,
|
||||
mobile: investment.title %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
<% else %>
|
||||
<div class="callout warning">
|
||||
<%= sanitize(t("budgets.investments.index.sidebar.verified_only",
|
||||
verify: link_to_verify_account)) %>
|
||||
verify: link_to_verify_account)) %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div class="callout primary">
|
||||
<%= sanitize(t("budgets.investments.index.sidebar.not_logged_in",
|
||||
sign_in: link_to_signin, sign_up: link_to_signup)) %>
|
||||
sign_in: link_to_signin, sign_up: link_to_signup)) %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</header>
|
||||
|
||||
<p><%= t("budgets.supports_info.time",
|
||||
phase_end_date: l(budget.current_phase.ends_at.to_date, format: :long)) %></p>
|
||||
phase_end_date: l(budget.current_phase.ends_at.to_date, format: :long)) %></p>
|
||||
|
||||
<p><%= t("budgets.supports_info.share") %></p>
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
|
||||
<span class="in-favor">
|
||||
<%= button_to vote_comment_path(comment, value: "yes"),
|
||||
method: "post",
|
||||
remote: can?(:vote, comment),
|
||||
title: t("votes.agree") do %>
|
||||
method: "post",
|
||||
remote: can?(:vote, comment),
|
||||
title: t("votes.agree") do %>
|
||||
<span class="show-for-sr"><%= t("votes.agree") %></span>
|
||||
<% end %>
|
||||
<%= comment.total_likes %>
|
||||
@@ -14,9 +14,9 @@
|
||||
|
||||
<span class="against">
|
||||
<%= button_to vote_comment_path(comment, value: "no"),
|
||||
method: "post",
|
||||
remote: can?(:vote, comment),
|
||||
title: t("votes.disagree") do %>
|
||||
method: "post",
|
||||
remote: can?(:vote, comment),
|
||||
title: t("votes.disagree") do %>
|
||||
<span class="show-for-sr"><%= t("votes.disagree") %></span>
|
||||
<% end %>
|
||||
<%= comment.total_dislikes %>
|
||||
|
||||
@@ -9,15 +9,15 @@
|
||||
<%= f.translatable_fields do |translations_form| %>
|
||||
<div>
|
||||
<%= translations_form.text_field :title,
|
||||
maxlength: Debate.title_max_length,
|
||||
data: suggest_data(debate) %>
|
||||
maxlength: Debate.title_max_length,
|
||||
data: suggest_data(debate) %>
|
||||
</div>
|
||||
<div class="js-suggest" data-locale="<%= translations_form.locale %>"></div>
|
||||
|
||||
<div>
|
||||
<%= translations_form.text_area :description,
|
||||
maxlength: Debate.description_max_length,
|
||||
class: "html-area" %>
|
||||
maxlength: Debate.description_max_length,
|
||||
class: "html-area" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</fieldset>
|
||||
@@ -42,11 +42,11 @@
|
||||
<% if debate.new_record? %>
|
||||
<div>
|
||||
<%= f.check_box :terms_of_service,
|
||||
title: t("form.accept_terms_title"),
|
||||
label: t("form.accept_terms",
|
||||
policy: link_to(t("form.policy"), "/privacy", target: "blank"),
|
||||
conditions: link_to(t("form.conditions"), "/conditions", target: "blank")
|
||||
) %>
|
||||
title: t("form.accept_terms_title"),
|
||||
label: t("form.accept_terms",
|
||||
policy: link_to(t("form.policy"), "/privacy", target: "blank"),
|
||||
conditions: link_to(t("form.conditions"), "/conditions", target: "blank")
|
||||
) %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
<p class="info">
|
||||
<%= sanitize(t("layouts.footer.description",
|
||||
open_source: link_to(t("layouts.footer.open_source"), t("layouts.footer.open_source_url"), target: "blank", rel: "nofollow"),
|
||||
consul: link_to(t("layouts.footer.consul"), t("layouts.footer.consul_url"), target: "blank", rel: "nofollow"))) %>
|
||||
open_source: link_to(t("layouts.footer.open_source"), t("layouts.footer.open_source_url"), target: "blank", rel: "nofollow"),
|
||||
consul: link_to(t("layouts.footer.consul"), t("layouts.footer.consul_url"), target: "blank", rel: "nofollow"))) %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
<% if user %>
|
||||
<li>
|
||||
<%= layout_menu_link_to t("layouts.header.my_activity_link"),
|
||||
user_path(user),
|
||||
controller_name == "users",
|
||||
rel: "nofollow",
|
||||
title: t("shared.go_to_page") +
|
||||
t("layouts.header.my_activity_link") %>
|
||||
user_path(user),
|
||||
controller_name == "users",
|
||||
rel: "nofollow",
|
||||
title: t("shared.go_to_page") +
|
||||
t("layouts.header.my_activity_link") %>
|
||||
</li>
|
||||
<li>
|
||||
<%= layout_menu_link_to t("layouts.header.my_account_link"),
|
||||
account_path,
|
||||
controller_name == "account",
|
||||
rel: "nofollow",
|
||||
title: t("shared.go_to_page") +
|
||||
t("layouts.header.my_account_link") %>
|
||||
account_path,
|
||||
controller_name == "account",
|
||||
rel: "nofollow",
|
||||
title: t("shared.go_to_page") +
|
||||
t("layouts.header.my_account_link") %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to t("devise_views.menu.login_items.logout"),
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
<% if feature?(:polls) %>
|
||||
<li>
|
||||
<%= layout_menu_link_to t("layouts.header.poll_questions"),
|
||||
polls_path,
|
||||
controller_name == "polls" || (controller_name == "questions" && controller.class.module_parent == Polls),
|
||||
accesskey: "3" %>
|
||||
polls_path,
|
||||
controller_name == "polls" || (controller_name == "questions" && controller.class.module_parent == Polls),
|
||||
accesskey: "3" %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if feature?(:legislation) %>
|
||||
@@ -37,9 +37,9 @@
|
||||
<% if feature?(:budgets) %>
|
||||
<li>
|
||||
<%= layout_menu_link_to t("layouts.header.budgets"),
|
||||
budgets_path,
|
||||
controller_name == "budgets" || controller_name == "investments",
|
||||
accesskey: "5" %>
|
||||
budgets_path,
|
||||
controller_name == "budgets" || controller_name == "investments",
|
||||
accesskey: "5" %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if feature?(:sdg) %>
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
<% if current_user&.voted_as_when_voted_for(proposal) && setting["twitter_handle"] %>
|
||||
<div class="share-supported">
|
||||
<%= render "shared/social_share",
|
||||
title: proposal.title,
|
||||
url: proposal_url(proposal),
|
||||
description: proposal.summary,
|
||||
mobile: proposal.title %>
|
||||
title: proposal.title,
|
||||
url: proposal_url(proposal),
|
||||
description: proposal.summary,
|
||||
mobile: proposal.title %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<td><%= budget.current_phase.name %></td>
|
||||
<td align="right">
|
||||
<%= link_to t("management.budgets.print_investments"),
|
||||
print_management_budget_investments_path(budget) %>
|
||||
print_management_budget_investments_path(budget) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
<%= f.translatable_fields do |translations_form| %>
|
||||
<div>
|
||||
<%= translations_form.text_field :title,
|
||||
maxlength: Proposal.title_max_length,
|
||||
data: suggest_data(proposal) %>
|
||||
maxlength: Proposal.title_max_length,
|
||||
data: suggest_data(proposal) %>
|
||||
</div>
|
||||
<div class="js-suggest" data-locale="<%= translations_form.locale %>"></div>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<% if Geozone.any? %>
|
||||
<div>
|
||||
<%= f.select :geozone_id, geozone_select_options,
|
||||
include_blank: t("geozones.none") %>
|
||||
include_blank: t("geozones.none") %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
<% if current_user.unverified? %>
|
||||
<div>
|
||||
<%= f.text_field :responsible_name,
|
||||
hint: t("proposals.form.proposal_responsible_name_note") %>
|
||||
hint: t("proposals.form.proposal_responsible_name_note") %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -101,11 +101,11 @@
|
||||
<% if proposal.new_record? %>
|
||||
<div>
|
||||
<%= f.check_box :terms_of_service,
|
||||
title: t("form.accept_terms_title"),
|
||||
label: t("form.accept_terms",
|
||||
policy: link_to(t("form.policy"), "/privacy", target: "blank"),
|
||||
conditions: link_to(t("form.conditions"), "/conditions", target: "blank")
|
||||
) %>
|
||||
title: t("form.accept_terms_title"),
|
||||
label: t("form.accept_terms",
|
||||
policy: link_to(t("form.policy"), "/privacy", target: "blank"),
|
||||
conditions: link_to(t("form.conditions"), "/conditions", target: "blank")
|
||||
) %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
</div>
|
||||
<% else %>
|
||||
<%= button_to vote_url,
|
||||
class: "button button-support small expanded",
|
||||
title: t("proposals.proposal.support_title"),
|
||||
method: "post",
|
||||
remote: true,
|
||||
"aria-label": support_aria_label do %>
|
||||
class: "button button-support small expanded",
|
||||
title: t("proposals.proposal.support_title"),
|
||||
method: "post",
|
||||
remote: true,
|
||||
"aria-label": support_aria_label do %>
|
||||
<%= t("proposals.proposal.support") %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -12,15 +12,15 @@
|
||||
</fieldset>
|
||||
|
||||
<%= f.text_field :related_sdg_list,
|
||||
class: "input",
|
||||
hint: sanitize(t("sdg.related_list_selector.hint",
|
||||
class: "input",
|
||||
hint: sanitize(t("sdg.related_list_selector.hint",
|
||||
link: link_to(t("sdg.related_list_selector.help.text"),
|
||||
sdg_help_path,
|
||||
title: t("shared.target_blank"),
|
||||
target: "_blank")),
|
||||
attributes: %w[href title target]),
|
||||
data: { "suggestions-list": sdg_related_suggestions,
|
||||
"remove-tag-text": t("sdg.related_list_selector.remove_tag") } %>
|
||||
sdg_help_path,
|
||||
title: t("shared.target_blank"),
|
||||
target: "_blank")),
|
||||
attributes: %w[href title target]),
|
||||
data: { "suggestions-list": sdg_related_suggestions,
|
||||
"remove-tag-text": t("sdg.related_list_selector.remove_tag") } %>
|
||||
</div>
|
||||
|
||||
<div class="help-section callout primary hide">
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
<div class="filter">
|
||||
<label for="js-advanced-search-date-min"><%= t("shared.advanced_search.date") %></label>
|
||||
<%= select_tag("advanced_search[date_min]", date_range_options,
|
||||
include_blank: t("shared.advanced_search.date_range_blank"),
|
||||
id: "js-advanced-search-date-min") %>
|
||||
include_blank: t("shared.advanced_search.date_range_blank"),
|
||||
id: "js-advanced-search-date-min") %>
|
||||
</div>
|
||||
|
||||
<div id="js-custom-date" class="custom-date-filters" style="display: none">
|
||||
@@ -25,16 +25,16 @@
|
||||
<%= t("shared.advanced_search.from") %> (<%= t("shared.advanced_search.date_placeholder") %>)
|
||||
</label>
|
||||
<%= text_field_tag "advanced_search[date_min]",
|
||||
advanced_search[:date_min],
|
||||
class: "js-calendar" %>
|
||||
advanced_search[:date_min],
|
||||
class: "js-calendar" %>
|
||||
</div>
|
||||
<div class="filter">
|
||||
<label for="advanced_search_date_max">
|
||||
<%= t("shared.advanced_search.to") %> (<%= t("shared.advanced_search.date_placeholder") %>)
|
||||
</label>
|
||||
<%= text_field_tag "advanced_search[date_max]",
|
||||
advanced_search[:date_max],
|
||||
class: "js-calendar" %>
|
||||
advanced_search[:date_max],
|
||||
class: "js-calendar" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -43,12 +43,12 @@
|
||||
<div class="filter">
|
||||
<label for="advanced_search_goal"><%= t("shared.advanced_search.goal") %></label>
|
||||
<%= select_tag("advanced_search[goal]", goal_options,
|
||||
include_blank: t("shared.advanced_search.goal_blank")) %>
|
||||
include_blank: t("shared.advanced_search.goal_blank")) %>
|
||||
</div>
|
||||
<div class="filter">
|
||||
<label for="advanced_search_target"><%= t("shared.advanced_search.target") %></label>
|
||||
<%= select_tag("advanced_search[target]", target_options,
|
||||
include_blank: t("shared.advanced_search.target_blank")) %>
|
||||
include_blank: t("shared.advanced_search.target_blank")) %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<div class="in-favor-against">
|
||||
<div class="in-favor">
|
||||
<%= button_to polymorphic_path(votable, action: :vote, value: "yes"),
|
||||
class: "like #{voted_classes[:in_favor]}",
|
||||
title: t("votes.agree"),
|
||||
"aria-label": agree_aria_label,
|
||||
method: "post",
|
||||
remote: true do %>
|
||||
class: "like #{voted_classes[:in_favor]}",
|
||||
title: t("votes.agree"),
|
||||
"aria-label": agree_aria_label,
|
||||
method: "post",
|
||||
remote: true do %>
|
||||
<span class="show-for-sr"><%= t("votes.agree") %></span>
|
||||
<% end %>
|
||||
<span class="percentage"><%= votes_percentage("likes", votable) %></span>
|
||||
@@ -13,11 +13,11 @@
|
||||
|
||||
<div class="against">
|
||||
<%= button_to polymorphic_path(votable, action: :vote, value: "no"),
|
||||
class: "unlike #{voted_classes[:against]}",
|
||||
title: t("votes.disagree"),
|
||||
"aria-label": disagree_aria_label,
|
||||
method: "post",
|
||||
remote: true do %>
|
||||
class: "unlike #{voted_classes[:against]}",
|
||||
title: t("votes.disagree"),
|
||||
"aria-label": disagree_aria_label,
|
||||
method: "post",
|
||||
remote: true do %>
|
||||
<span class="show-for-sr"><%= t("votes.disagree") %></span>
|
||||
<% end %>
|
||||
<span class="percentage"><%= votes_percentage("dislikes", votable) %></span>
|
||||
|
||||
@@ -40,9 +40,9 @@ class Shared::MapLocationComponent < ApplicationComponent
|
||||
|
||||
def remove_marker
|
||||
button_tag remove_marker_label,
|
||||
id: remove_marker_id,
|
||||
class: "map-location-remove-marker",
|
||||
type: "button"
|
||||
id: remove_marker_id,
|
||||
class: "map-location-remove-marker",
|
||||
type: "button"
|
||||
end
|
||||
|
||||
def data
|
||||
|
||||
@@ -10,7 +10,7 @@ class Admin::LocalCensusRecordsController < Admin::BaseController
|
||||
@local_census_record = LocalCensusRecord.new(local_census_record_params)
|
||||
if @local_census_record.save
|
||||
redirect_to admin_local_census_records_path,
|
||||
notice: t("admin.local_census_records.create.notice")
|
||||
notice: t("admin.local_census_records.create.notice")
|
||||
else
|
||||
render :new
|
||||
end
|
||||
@@ -19,7 +19,7 @@ class Admin::LocalCensusRecordsController < Admin::BaseController
|
||||
def update
|
||||
if @local_census_record.update(local_census_record_params)
|
||||
redirect_to admin_local_census_records_path,
|
||||
notice: t("admin.local_census_records.update.notice")
|
||||
notice: t("admin.local_census_records.update.notice")
|
||||
else
|
||||
render :edit
|
||||
end
|
||||
@@ -28,7 +28,7 @@ class Admin::LocalCensusRecordsController < Admin::BaseController
|
||||
def destroy
|
||||
@local_census_record.destroy!
|
||||
redirect_to admin_local_census_records_path,
|
||||
notice: t("admin.local_census_records.destroy.notice")
|
||||
notice: t("admin.local_census_records.destroy.notice")
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -12,7 +12,7 @@ class Admin::Poll::Questions::Answers::DocumentsController < Admin::Poll::BaseCo
|
||||
|
||||
if @answer.save
|
||||
redirect_to admin_answer_documents_path(@answer),
|
||||
notice: t("admin.documents.create.success_notice")
|
||||
notice: t("admin.documents.create.success_notice")
|
||||
else
|
||||
render :index
|
||||
end
|
||||
|
||||
@@ -16,7 +16,7 @@ class Admin::Poll::Questions::Answers::ImagesController < Admin::Poll::BaseContr
|
||||
|
||||
if @answer.save
|
||||
redirect_to admin_answer_images_path(@answer),
|
||||
notice: t("flash.actions.create.poll_question_answer_image")
|
||||
notice: t("flash.actions.create.poll_question_answer_image")
|
||||
else
|
||||
render :new
|
||||
end
|
||||
|
||||
@@ -11,7 +11,7 @@ class Admin::Poll::Questions::Answers::VideosController < Admin::Poll::BaseContr
|
||||
def create
|
||||
if @video.save
|
||||
redirect_to admin_answer_videos_path(@answer),
|
||||
notice: t("flash.actions.create.poll_question_answer_video")
|
||||
notice: t("flash.actions.create.poll_question_answer_video")
|
||||
else
|
||||
render :new
|
||||
end
|
||||
|
||||
@@ -12,7 +12,7 @@ class Admin::Poll::Questions::AnswersController < Admin::Poll::BaseController
|
||||
def create
|
||||
if @answer.save
|
||||
redirect_to admin_question_path(@question),
|
||||
notice: t("flash.actions.create.poll_question_answer")
|
||||
notice: t("flash.actions.create.poll_question_answer")
|
||||
else
|
||||
render :new
|
||||
end
|
||||
@@ -24,7 +24,7 @@ class Admin::Poll::Questions::AnswersController < Admin::Poll::BaseController
|
||||
def update
|
||||
if @answer.update(answer_params)
|
||||
redirect_to admin_question_path(@question),
|
||||
notice: t("flash.actions.save_changes.notice")
|
||||
notice: t("flash.actions.save_changes.notice")
|
||||
else
|
||||
render :edit
|
||||
end
|
||||
|
||||
@@ -14,7 +14,7 @@ module Budgets
|
||||
respond_to do |format|
|
||||
format.html do
|
||||
redirect_to budget_investments_path(heading_id: @investment.heading.id),
|
||||
notice: t("flash.actions.create.support")
|
||||
notice: t("flash.actions.create.support")
|
||||
end
|
||||
|
||||
format.js { render :show }
|
||||
|
||||
@@ -12,7 +12,8 @@ class GraphqlController < ApplicationController
|
||||
begin
|
||||
raise GraphqlController::QueryStringError if query_string.nil?
|
||||
|
||||
result = ConsulSchema.execute(query_string,
|
||||
result = ConsulSchema.execute(
|
||||
query_string,
|
||||
variables: prepare_variables,
|
||||
context: {},
|
||||
operation_name: params[:operationName]
|
||||
|
||||
@@ -9,7 +9,7 @@ class Management::Budgets::Investments::VotesController < Management::BaseContro
|
||||
respond_to do |format|
|
||||
format.html do
|
||||
redirect_to management_budget_investments_path(heading_id: @investment.heading.id),
|
||||
notice: t("flash.actions.create.support")
|
||||
notice: t("flash.actions.create.support")
|
||||
end
|
||||
|
||||
format.js { render :show }
|
||||
|
||||
@@ -2,7 +2,7 @@ module LinksHelper
|
||||
def render_destroy_element_link(builder, element)
|
||||
link_to_remove_association element.new_record? ? t("links.form.cancel_button") :
|
||||
t("links.form.delete_button"),
|
||||
builder, class: "delete remove-element"
|
||||
builder, class: "delete remove-element"
|
||||
end
|
||||
|
||||
def link_to_signin(options = {})
|
||||
|
||||
@@ -60,10 +60,10 @@ module ProposalsDashboardHelper
|
||||
label = []
|
||||
|
||||
label << t("dashboard.resource.required_days",
|
||||
days: resource.day_offset) if resource.day_offset > 0
|
||||
days: resource.day_offset) if resource.day_offset > 0
|
||||
label << t("dashboard.resource.required_supports",
|
||||
supports: number_with_delimiter(resource.required_supports,
|
||||
delimiter: ".")) if resource.required_supports > 0
|
||||
supports: number_with_delimiter(resource.required_supports,
|
||||
delimiter: ".")) if resource.required_supports > 0
|
||||
|
||||
safe_join label, h(" #{t("dashboard.resource.and")})") + tag(:br)
|
||||
end
|
||||
|
||||
@@ -73,7 +73,7 @@ module Abilities
|
||||
can [:hide, :admin_update, :toggle_selection], Budget::Investment
|
||||
can [:valuate, :comment_valuation], Budget::Investment
|
||||
cannot [:admin_update, :toggle_selection, :valuate, :comment_valuation],
|
||||
Budget::Investment, budget: { phase: "finished" }
|
||||
Budget::Investment, budget: { phase: "finished" }
|
||||
|
||||
can :create, Budget::ValuatorAssignment
|
||||
|
||||
|
||||
@@ -96,9 +96,9 @@ module Abilities
|
||||
can :suggest, Budget::Investment, budget: { phase: "accepting" }
|
||||
can :destroy, Budget::Investment, budget: { phase: ["accepting", "reviewing"] }, author_id: user.id
|
||||
can [:create, :destroy], ActsAsVotable::Vote,
|
||||
voter_id: user.id,
|
||||
votable_type: "Budget::Investment",
|
||||
votable: { budget: { phase: "selecting" }}
|
||||
voter_id: user.id,
|
||||
votable_type: "Budget::Investment",
|
||||
votable: { budget: { phase: "selecting" }}
|
||||
|
||||
can [:show, :create], Budget::Ballot, budget: { phase: "balloting" }
|
||||
can [:create, :destroy], Budget::Ballot::Line, budget: { phase: "balloting" }
|
||||
|
||||
@@ -51,9 +51,9 @@ class Budget
|
||||
has_many :comments, -> { where(valuation: false) }, as: :commentable, inverse_of: :commentable
|
||||
has_one :summary_comment, as: :commentable, class_name: "MlSummaryComment", dependent: :destroy
|
||||
has_many :valuations, -> { where(valuation: true) },
|
||||
as: :commentable,
|
||||
inverse_of: :commentable,
|
||||
class_name: "Comment"
|
||||
as: :commentable,
|
||||
inverse_of: :commentable,
|
||||
class_name: "Comment"
|
||||
|
||||
validates_translation :title, presence: true, length: { in: 4..Budget::Investment.title_max_length }
|
||||
validates_translation :description, presence: true, length: { maximum: Budget::Investment.description_max_length }
|
||||
|
||||
@@ -27,8 +27,8 @@ class Budget::VotingStyles::Base
|
||||
|
||||
def voted_info(heading)
|
||||
I18n.t("budgets.investments.index.sidebar.voted_info.#{name}",
|
||||
count: investments(heading).count,
|
||||
amount_spent: budget.formatted_amount(investments_price(heading)))
|
||||
count: investments(heading).count,
|
||||
amount_spent: budget.formatted_amount(investments_price(heading)))
|
||||
end
|
||||
|
||||
def amount_available_info(heading)
|
||||
|
||||
@@ -6,25 +6,25 @@ module Attachable
|
||||
attr_accessor :cached_attachment
|
||||
|
||||
validates :attachment,
|
||||
presence: true,
|
||||
file_content_type: {
|
||||
allow: ->(record) { record.accepted_content_types },
|
||||
if: -> { association_class && attachment.attached? },
|
||||
message: ->(record, *) do
|
||||
I18n.t("#{record.model_name.plural}.errors.messages.wrong_content_type",
|
||||
content_type: record.attachment_content_type,
|
||||
accepted_content_types: record.class.humanized_accepted_content_types)
|
||||
end
|
||||
},
|
||||
file_size: {
|
||||
less_than_or_equal_to: ->(record) { record.max_file_size.megabytes },
|
||||
if: -> { association_class && attachment.attached? },
|
||||
message: ->(record, *) do
|
||||
I18n.t("#{record.model_name.plural}.errors.messages.in_between",
|
||||
min: "0 Bytes",
|
||||
max: "#{record.max_file_size} MB")
|
||||
end
|
||||
}
|
||||
presence: true,
|
||||
file_content_type: {
|
||||
allow: ->(record) { record.accepted_content_types },
|
||||
if: -> { association_class && attachment.attached? },
|
||||
message: ->(record, *) do
|
||||
I18n.t("#{record.model_name.plural}.errors.messages.wrong_content_type",
|
||||
content_type: record.attachment_content_type,
|
||||
accepted_content_types: record.class.humanized_accepted_content_types)
|
||||
end
|
||||
},
|
||||
file_size: {
|
||||
less_than_or_equal_to: ->(record) { record.max_file_size.megabytes },
|
||||
if: -> { association_class && attachment.attached? },
|
||||
message: ->(record, *) do
|
||||
I18n.t("#{record.model_name.plural}.errors.messages.in_between",
|
||||
min: "0 Bytes",
|
||||
max: "#{record.max_file_size} MB")
|
||||
end
|
||||
}
|
||||
|
||||
before_validation :set_attachment_from_cached_attachment, if: -> { cached_attachment.present? }
|
||||
end
|
||||
|
||||
@@ -3,9 +3,9 @@ module Relationable
|
||||
|
||||
included do
|
||||
has_many :related_contents,
|
||||
as: :parent_relationable,
|
||||
inverse_of: :parent_relationable,
|
||||
dependent: :destroy
|
||||
as: :parent_relationable,
|
||||
inverse_of: :parent_relationable,
|
||||
dependent: :destroy
|
||||
end
|
||||
|
||||
def find_related_content(relationable)
|
||||
|
||||
@@ -11,9 +11,9 @@ class Legislation::DraftVersion < ApplicationRecord
|
||||
|
||||
belongs_to :process, foreign_key: "legislation_process_id", inverse_of: :draft_versions
|
||||
has_many :annotations,
|
||||
foreign_key: "legislation_draft_version_id",
|
||||
inverse_of: :draft_version,
|
||||
dependent: :destroy
|
||||
foreign_key: "legislation_draft_version_id",
|
||||
inverse_of: :draft_version,
|
||||
dependent: :destroy
|
||||
|
||||
validates_translation :title, presence: true
|
||||
validates_translation :body, presence: true
|
||||
|
||||
@@ -27,21 +27,21 @@ class Legislation::Process < ApplicationRecord
|
||||
CSS_HEX_COLOR = /\A#?(?:[A-F0-9]{3}){1,2}\z/i
|
||||
|
||||
has_many :draft_versions, -> { order(:id) },
|
||||
foreign_key: "legislation_process_id",
|
||||
inverse_of: :process,
|
||||
dependent: :destroy
|
||||
foreign_key: "legislation_process_id",
|
||||
inverse_of: :process,
|
||||
dependent: :destroy
|
||||
has_one :final_draft_version, -> { where final_version: true, status: "published" },
|
||||
class_name: "Legislation::DraftVersion",
|
||||
foreign_key: "legislation_process_id",
|
||||
inverse_of: :process
|
||||
class_name: "Legislation::DraftVersion",
|
||||
foreign_key: "legislation_process_id",
|
||||
inverse_of: :process
|
||||
has_many :questions, -> { order(:id) },
|
||||
foreign_key: "legislation_process_id",
|
||||
inverse_of: :process,
|
||||
dependent: :destroy
|
||||
foreign_key: "legislation_process_id",
|
||||
inverse_of: :process,
|
||||
dependent: :destroy
|
||||
has_many :proposals, -> { order(:id) },
|
||||
foreign_key: "legislation_process_id",
|
||||
inverse_of: :process,
|
||||
dependent: :destroy
|
||||
foreign_key: "legislation_process_id",
|
||||
inverse_of: :process,
|
||||
dependent: :destroy
|
||||
|
||||
validates_translation :title, presence: true
|
||||
validates :start_date, presence: true
|
||||
|
||||
@@ -62,9 +62,11 @@ class Poll < ApplicationRecord
|
||||
end
|
||||
|
||||
def self.overlaping_with(poll)
|
||||
where("? < ends_at and ? >= starts_at", poll.starts_at.beginning_of_day,
|
||||
poll.ends_at.end_of_day).where.not(id: poll.id)
|
||||
.where(related: poll.related)
|
||||
where("? < ends_at and ? >= starts_at",
|
||||
poll.starts_at.beginning_of_day,
|
||||
poll.ends_at.end_of_day)
|
||||
.where.not(id: poll.id)
|
||||
.where(related: poll.related)
|
||||
end
|
||||
|
||||
def title
|
||||
|
||||
@@ -15,9 +15,9 @@ class Poll::Question < ApplicationRecord
|
||||
has_many :comments, as: :commentable, inverse_of: :commentable
|
||||
has_many :answers, class_name: "Poll::Answer"
|
||||
has_many :question_answers, -> { order "given_order asc" },
|
||||
class_name: "Poll::Question::Answer",
|
||||
inverse_of: :question,
|
||||
dependent: :destroy
|
||||
class_name: "Poll::Question::Answer",
|
||||
inverse_of: :question,
|
||||
dependent: :destroy
|
||||
has_many :partial_results
|
||||
belongs_to :proposal
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@ class Tenant < ApplicationRecord
|
||||
enum schema_type: %w[subdomain domain]
|
||||
|
||||
validates :schema,
|
||||
presence: true,
|
||||
uniqueness: true,
|
||||
exclusion: { in: ->(*) { excluded_subdomains }},
|
||||
format: { with: URI::DEFAULT_PARSER.regexp[:HOST] }
|
||||
presence: true,
|
||||
uniqueness: true,
|
||||
exclusion: { in: ->(*) { excluded_subdomains }},
|
||||
format: { with: URI::DEFAULT_PARSER.regexp[:HOST] }
|
||||
validates :name, presence: true, uniqueness: true
|
||||
|
||||
after_create :create_schema
|
||||
|
||||
@@ -26,55 +26,55 @@ class User < ApplicationRecord
|
||||
has_many :proposals, -> { with_hidden }, foreign_key: :author_id, inverse_of: :author
|
||||
has_many :activities
|
||||
has_many :budget_investments, -> { with_hidden },
|
||||
class_name: "Budget::Investment",
|
||||
foreign_key: :author_id,
|
||||
inverse_of: :author
|
||||
class_name: "Budget::Investment",
|
||||
foreign_key: :author_id,
|
||||
inverse_of: :author
|
||||
has_many :comments, -> { with_hidden }, inverse_of: :user
|
||||
has_many :failed_census_calls
|
||||
has_many :notifications
|
||||
has_many :direct_messages_sent,
|
||||
class_name: "DirectMessage",
|
||||
foreign_key: :sender_id,
|
||||
inverse_of: :sender
|
||||
class_name: "DirectMessage",
|
||||
foreign_key: :sender_id,
|
||||
inverse_of: :sender
|
||||
has_many :direct_messages_received,
|
||||
class_name: "DirectMessage",
|
||||
foreign_key: :receiver_id,
|
||||
inverse_of: :receiver
|
||||
class_name: "DirectMessage",
|
||||
foreign_key: :receiver_id,
|
||||
inverse_of: :receiver
|
||||
has_many :legislation_answers, class_name: "Legislation::Answer", dependent: :destroy, inverse_of: :user
|
||||
has_many :follows
|
||||
has_many :legislation_annotations,
|
||||
class_name: "Legislation::Annotation",
|
||||
foreign_key: :author_id,
|
||||
inverse_of: :author
|
||||
class_name: "Legislation::Annotation",
|
||||
foreign_key: :author_id,
|
||||
inverse_of: :author
|
||||
has_many :legislation_proposals,
|
||||
class_name: "Legislation::Proposal",
|
||||
foreign_key: :author_id,
|
||||
inverse_of: :author
|
||||
class_name: "Legislation::Proposal",
|
||||
foreign_key: :author_id,
|
||||
inverse_of: :author
|
||||
has_many :legislation_questions,
|
||||
class_name: "Legislation::Question",
|
||||
foreign_key: :author_id,
|
||||
inverse_of: :author
|
||||
class_name: "Legislation::Question",
|
||||
foreign_key: :author_id,
|
||||
inverse_of: :author
|
||||
has_many :polls, foreign_key: :author_id, inverse_of: :author
|
||||
has_many :poll_answers,
|
||||
class_name: "Poll::Answer",
|
||||
foreign_key: :author_id,
|
||||
inverse_of: :author
|
||||
class_name: "Poll::Answer",
|
||||
foreign_key: :author_id,
|
||||
inverse_of: :author
|
||||
has_many :poll_pair_answers,
|
||||
class_name: "Poll::PairAnswer",
|
||||
foreign_key: :author_id,
|
||||
inverse_of: :author
|
||||
class_name: "Poll::PairAnswer",
|
||||
foreign_key: :author_id,
|
||||
inverse_of: :author
|
||||
has_many :poll_partial_results,
|
||||
class_name: "Poll::PartialResult",
|
||||
foreign_key: :author_id,
|
||||
inverse_of: :author
|
||||
class_name: "Poll::PartialResult",
|
||||
foreign_key: :author_id,
|
||||
inverse_of: :author
|
||||
has_many :poll_questions,
|
||||
class_name: "Poll::Question",
|
||||
foreign_key: :author_id,
|
||||
inverse_of: :author
|
||||
class_name: "Poll::Question",
|
||||
foreign_key: :author_id,
|
||||
inverse_of: :author
|
||||
has_many :poll_recounts,
|
||||
class_name: "Poll::Recount",
|
||||
foreign_key: :author_id,
|
||||
inverse_of: :author
|
||||
class_name: "Poll::Recount",
|
||||
foreign_key: :author_id,
|
||||
inverse_of: :author
|
||||
has_many :related_contents, foreign_key: :author_id, inverse_of: :author, dependent: nil
|
||||
has_many :topics, foreign_key: :author_id, inverse_of: :author
|
||||
belongs_to :geozone
|
||||
|
||||
@@ -55,8 +55,8 @@ class Verification::Management::Email
|
||||
if document_number_mismatch?
|
||||
errors.add(:email,
|
||||
I18n.t("management.email_verifications.document_mismatch",
|
||||
document_type: ApplicationController.helpers.humanize_document_type(user.document_type),
|
||||
document_number: user.document_number))
|
||||
document_type: ApplicationController.helpers.humanize_document_type(user.document_type),
|
||||
document_number: user.document_number))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<h2 class="inline-block"><%= t("admin.admin_notifications.index.section_title") %></h2>
|
||||
<%= link_to t("admin.admin_notifications.index.new_notification"), new_admin_admin_notification_path,
|
||||
class: "button float-right" %>
|
||||
<%= link_to t("admin.admin_notifications.index.new_notification"),
|
||||
new_admin_admin_notification_path,
|
||||
class: "button float-right" %>
|
||||
|
||||
<% if @admin_notifications.any? %>
|
||||
<table id="admin_notifications">
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
<%= f.translatable_fields do |translations_form| %>
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= translations_form.text_field :title,
|
||||
data: { js_banner_title: "js_banner_title" } %>
|
||||
data: { js_banner_title: "js_banner_title" } %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= translations_form.text_field :description,
|
||||
data: { js_banner_description: "js_banner_description" } %>
|
||||
data: { js_banner_description: "js_banner_description" } %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<%= link_to t("admin.banners.index.create"),
|
||||
new_admin_banner_path, class: "button float-right" %>
|
||||
new_admin_banner_path,
|
||||
class: "button float-right" %>
|
||||
|
||||
<h2 class="inline-block"><%= t("admin.banners.index.title") %></h2>
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<% if params[:filter].present? && params[:advanced_filters].present? %>
|
||||
<p class="inline-block"><%= sanitize(t("#{i18n_namespace}.filters.two_filters",
|
||||
filter: t("#{i18n_namespace}.filters.#{params[:filter]}"),
|
||||
advanced_filters: budget_investments_advanced_filters(params[:advanced_filters]))) %></p>
|
||||
filter: t("#{i18n_namespace}.filters.#{params[:filter]}"),
|
||||
advanced_filters: budget_investments_advanced_filters(params[:advanced_filters]))) %></p>
|
||||
|
||||
<% elsif params[:filter].present? %>
|
||||
|
||||
<p class="inline-block"><%= sanitize(t("#{i18n_namespace}.filters.one_filter",
|
||||
filter: t("#{i18n_namespace}.filters.#{params[:filter]}"))) %></p>
|
||||
filter: t("#{i18n_namespace}.filters.#{params[:filter]}"))) %></p>
|
||||
|
||||
<% elsif params[:advanced_filters].present? %>
|
||||
|
||||
<p class="inline-block"><%= sanitize(t("#{i18n_namespace}.filters.one_filter",
|
||||
filter: budget_investments_advanced_filters(params[:advanced_filters]))) %></p>
|
||||
filter: budget_investments_advanced_filters(params[:advanced_filters]))) %></p>
|
||||
|
||||
<% end %>
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
<% if @investments.any? %>
|
||||
<h3 class="inline-block"><%= page_entries_info @investments %></h3>
|
||||
<%= render "admin/shared/columns_selector",
|
||||
cookie: "investments-columns", default: %w[id title supports admin valuator geozone feasibility price valuation_finished visible_to_valuators selected incompatible] %>
|
||||
cookie: "investments-columns",
|
||||
default: %w[id title supports admin valuator geozone feasibility price valuation_finished visible_to_valuators selected incompatible] %>
|
||||
<br>
|
||||
|
||||
<%= render "filters_description", i18n_namespace: "admin.budget_investments.index" %>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<div class="extra-info float-right">
|
||||
<%= t "admin.budget_investments.show.info",
|
||||
budget_name: @budget.name,
|
||||
group_name: @investment.group.name,
|
||||
id: @investment.id %>
|
||||
budget_name: @budget.name,
|
||||
group_name: @investment.group.name,
|
||||
id: @investment.id %>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
<%= f.translatable_fields do |translations_form| %>
|
||||
<div class="small-12 column">
|
||||
<%= translations_form.text_field :title,
|
||||
maxlength: Budget::Investment.title_max_length %>
|
||||
maxlength: Budget::Investment.title_max_length %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= translations_form.text_area :description,
|
||||
maxlength: Budget::Investment.description_max_length,
|
||||
class: "html-area" %>
|
||||
maxlength: Budget::Investment.description_max_length,
|
||||
class: "html-area" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -52,8 +52,8 @@
|
||||
|
||||
<div class="small-12 medium-6">
|
||||
<%= f.select(:administrator_id,
|
||||
@admins.map { |a| [a.description_or_name_and_email, a.id] },
|
||||
{ include_blank: t("admin.budget_investments.edit.undefined") }) %>
|
||||
@admins.map { |a| [a.description_or_name_and_email, a.id] },
|
||||
{ include_blank: t("admin.budget_investments.edit.undefined") }) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -65,10 +65,10 @@
|
||||
<% end %>
|
||||
</div>
|
||||
<%= f.text_field :valuation_tag_list,
|
||||
value: @investment.valuation_tag_list.sort.join(","),
|
||||
label: false,
|
||||
placeholder: t("admin.budget_investments.edit.tags_placeholder"),
|
||||
class: "js-tag-list" %>
|
||||
value: @investment.valuation_tag_list.sort.join(","),
|
||||
label: false,
|
||||
placeholder: t("admin.budget_investments.edit.tags_placeholder"),
|
||||
class: "js-tag-list" %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column margin-top">
|
||||
@@ -96,19 +96,19 @@
|
||||
<div class="small-12 medium-3 column">
|
||||
<h2 id="incompatible"><%= t("admin.budget_investments.edit.compatibility") %></h2>
|
||||
<%= f.check_box :incompatible,
|
||||
title: t("admin.budget_investments.edit.compatibility") %>
|
||||
title: t("admin.budget_investments.edit.compatibility") %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="small-12 medium-3 column float-left">
|
||||
<h2 id="selected"><%= t("admin.budget_investments.edit.selection") %></h2>
|
||||
<%= f.check_box :selected,
|
||||
title: t("admin.budget_investments.edit.selection") %>
|
||||
title: t("admin.budget_investments.edit.selection") %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= f.text_field :milestone_tag_list,
|
||||
value: @investment.milestone_tag_list.sort.join(", ") %>
|
||||
value: @investment.milestone_tag_list.sort.join(", ") %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column margin-top">
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
<%= f.label :action_type %>
|
||||
<% ::Dashboard::Action.action_types.keys.each do |action_type_value| %>
|
||||
<span class="margin-right">
|
||||
<%= f.radio_button :action_type, action_type_value,
|
||||
data: { toggle: "request_to_administrators short_description" } %>
|
||||
<%= f.radio_button :action_type,
|
||||
action_type_value,
|
||||
data: { toggle: "request_to_administrators short_description" } %>
|
||||
</span>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<%= link_to t("admin.dashboard.actions.index.create"),
|
||||
new_admin_dashboard_action_path, class: "button success float-right" %>
|
||||
new_admin_dashboard_action_path,
|
||||
class: "button success float-right" %>
|
||||
|
||||
<h2 class="inline-block">
|
||||
<%= t("admin.dashboard.actions.index.title") %>
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
</td>
|
||||
<td>
|
||||
<% unless task.executed_at? %>
|
||||
<%= render Admin::TableActionsComponent.new(task,
|
||||
<%= render Admin::TableActionsComponent.new(
|
||||
task,
|
||||
actions: [:edit],
|
||||
edit_text: t("admin.dashboard.administrator_tasks.index.solve")
|
||||
) %>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<%= select_tag :users_segment, options_for_select(user_segments_options) %>
|
||||
|
||||
<%= submit_tag t("admin.emails_download.index.download_emails_button"),
|
||||
class: "button",
|
||||
data: { disable_with: false } %>
|
||||
class: "button",
|
||||
data: { disable_with: false } %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
<div class="small-12 medium-8 column fullscreen-container">
|
||||
<div class="markdown-editor-header truncate">
|
||||
<%= sanitize(t("admin.legislation.draft_versions.form.title",
|
||||
draft_version_title: @draft_version.title,
|
||||
process_title: @process.title)) %>
|
||||
draft_version_title: @draft_version.title,
|
||||
process_title: @process.title)) %>
|
||||
</div>
|
||||
|
||||
<div class="markdown-editor-buttons">
|
||||
|
||||
@@ -29,7 +29,9 @@
|
||||
<div class="js-add-fields-container">
|
||||
<div class="small-12 medium-9 column">
|
||||
<%= link_to_add_association t("admin.legislation.questions.form.add_option"),
|
||||
f, :question_options, class: "button hollow" %>
|
||||
f,
|
||||
:question_options,
|
||||
class: "button hollow" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
<h3><%= t("admin.local_census_records.imports.show.subtitle") %></h3>
|
||||
|
||||
<%= render "local_census_records",
|
||||
title: t("admin.local_census_records.imports.show.errored"),
|
||||
id: "invalid-local-census-records",
|
||||
local_census_records: @import.invalid_records %>
|
||||
title: t("admin.local_census_records.imports.show.errored"),
|
||||
id: "invalid-local-census-records",
|
||||
local_census_records: @import.invalid_records %>
|
||||
|
||||
<%= render "local_census_records",
|
||||
title: t("admin.local_census_records.imports.show.created"),
|
||||
id: "created-local-census-records",
|
||||
local_census_records: @import.created_records %>
|
||||
title: t("admin.local_census_records.imports.show.created"),
|
||||
id: "created-local-census-records",
|
||||
local_census_records: @import.created_records %>
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 margin-bottom column">
|
||||
<%= f.select :status_id,
|
||||
@statuses.map { |s| [s.name, s.id] },
|
||||
{ include_blank: @statuses.any? ? "" : t("admin.milestones.form.no_statuses_defined") },
|
||||
{ disabled: @statuses.blank? } %>
|
||||
@statuses.map { |s| [s.name, s.id] },
|
||||
{ include_blank: @statuses.any? ? "" : t("admin.milestones.form.no_statuses_defined") },
|
||||
{ disabled: @statuses.blank? } %>
|
||||
<%= link_to t("admin.milestones.form.admin_statuses"),
|
||||
admin_milestone_statuses_path %>
|
||||
</div>
|
||||
|
||||
@@ -47,9 +47,9 @@
|
||||
<% if milestone.documents.present? %>
|
||||
<% milestone.documents.each do |document| %>
|
||||
<%= link_to document.title,
|
||||
document.attachment,
|
||||
target: "_blank",
|
||||
rel: "nofollow" %><br>
|
||||
document.attachment,
|
||||
target: "_blank",
|
||||
rel: "nofollow" %><br>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<h2 class="inline-block"><%= t("admin.newsletters.index.title") %></h2>
|
||||
<%= link_to t("admin.newsletters.index.new_newsletter"), new_admin_newsletter_path,
|
||||
class: "button float-right" %>
|
||||
<%= link_to t("admin.newsletters.index.new_newsletter"),
|
||||
new_admin_newsletter_path,
|
||||
class: "button float-right" %>
|
||||
|
||||
<% if @newsletters.any? %>
|
||||
<table id="newsletters">
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<h2><%= t("admin.newsletters.new.title") %></h2>
|
||||
<p>
|
||||
<%= sanitize(t("admin.newsletters.new.header_footer_help_text",
|
||||
link: link_to(t("admin.newsletters.new.image_link"),
|
||||
admin_site_customization_images_path))) %>
|
||||
link: link_to(t("admin.newsletters.new.image_link"),
|
||||
admin_site_customization_images_path))) %>
|
||||
</p>
|
||||
|
||||
<%= render "form" %>
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
</td>
|
||||
<td>
|
||||
<% unless @poll.expired? %>
|
||||
<%= render Admin::TableActionsComponent.new(booth_assignment,
|
||||
<%= render Admin::TableActionsComponent.new(
|
||||
booth_assignment,
|
||||
actions: [:destroy],
|
||||
destroy_text: t("admin.booth_assignments.manage.actions.unassign"),
|
||||
destroy_confirmation: (booth_assignment.shifts? ? t("admin.poll_booth_assignments.alert.shifts") : ""),
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
<td class="text-center"><%= poll.sdg_target_list %></td>
|
||||
<% end %>
|
||||
<td>
|
||||
<%= render Admin::TableActionsComponent.new(poll,
|
||||
<%= render Admin::TableActionsComponent.new(
|
||||
poll,
|
||||
destroy_confirmation: t("admin.polls.destroy.alert")
|
||||
) do |actions| %>
|
||||
<%= actions.action(:configure) %>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<%= render "shared/errors", resource: @answer %>
|
||||
|
||||
<%= f.hidden_field :given_order,
|
||||
value: @answer.persisted? ? @answer.given_order : @answer.class.last_position(@answer.question_id || @question.id) + 1 %>
|
||||
value: @answer.persisted? ? @answer.given_order : @answer.class.last_position(@answer.question_id || @question.id) + 1 %>
|
||||
|
||||
<div class="row">
|
||||
<%= f.translatable_fields do |translations_form| %>
|
||||
|
||||
@@ -14,29 +14,29 @@
|
||||
|
||||
<div class="small-12 medium-3 column">
|
||||
<%= f.select :task,
|
||||
Poll::Shift.tasks.map { |k, v| [t("admin.poll_shifts.#{k}"), k] },
|
||||
{ prompt: t("admin.poll_shifts.new.select_task") },
|
||||
class: "js-poll-shifts" %>
|
||||
Poll::Shift.tasks.map { |k, v| [t("admin.poll_shifts.#{k}"), k] },
|
||||
{ prompt: t("admin.poll_shifts.new.select_task") },
|
||||
class: "js-poll-shifts" %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-3 column">
|
||||
<label><%= t("admin.poll_shifts.new.date") %></label>
|
||||
<%= select "shift[date]", "vote_collection_date",
|
||||
options_for_select(shift_vote_collection_dates(@booth, @voting_polls)),
|
||||
{ prompt: @voting_polls.present? ? t("admin.poll_shifts.new.select_date") : t("admin.poll_shifts.new.no_voting_days") },
|
||||
class: "js-shift-vote-collection-dates" %>
|
||||
options_for_select(shift_vote_collection_dates(@booth, @voting_polls)),
|
||||
{ prompt: @voting_polls.present? ? t("admin.poll_shifts.new.select_date") : t("admin.poll_shifts.new.no_voting_days") },
|
||||
class: "js-shift-vote-collection-dates" %>
|
||||
<%= select "shift[date]", "recount_scrutiny_date",
|
||||
options_for_select(shift_recount_scrutiny_dates(@booth, @recount_polls)),
|
||||
{ prompt: t("admin.poll_shifts.new.select_date") },
|
||||
class: "js-shift-recount-scrutiny-dates",
|
||||
hidden: "hidden" %>
|
||||
options_for_select(shift_recount_scrutiny_dates(@booth, @recount_polls)),
|
||||
{ prompt: t("admin.poll_shifts.new.select_date") },
|
||||
class: "js-shift-recount-scrutiny-dates",
|
||||
hidden: "hidden" %>
|
||||
</div>
|
||||
|
||||
<%= f.hidden_field :booth_id, value: @booth.id %>
|
||||
|
||||
<div class="small-12 medium-3 column">
|
||||
<%= f.submit t("admin.poll_shifts.new.add_shift"),
|
||||
class: "button expanded margin-top" %>
|
||||
class: "button expanded margin-top" %>
|
||||
</div>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
method: :get, remote: true do |f| %>
|
||||
<div class="input-group">
|
||||
<%= text_field_tag :search,
|
||||
@search,
|
||||
placeholder: t("admin.poll_shifts.new.search_officer_placeholder"),
|
||||
id: "search-officers" %>
|
||||
@search,
|
||||
placeholder: t("admin.poll_shifts.new.search_officer_placeholder"),
|
||||
id: "search-officers" %>
|
||||
<div class="input-group-button">
|
||||
<%= submit_tag t("admin.poll_shifts.new.search_officer_button"),
|
||||
class: "button" %>
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
<td><%= shift.officer_email %></td>
|
||||
<td><%= t("admin.poll_shifts.#{shift.task}") %></td>
|
||||
<td>
|
||||
<%= render Admin::TableActionsComponent.new(shift,
|
||||
<%= render Admin::TableActionsComponent.new(
|
||||
shift,
|
||||
actions: [:destroy],
|
||||
destroy_text: t("admin.poll_shifts.new.remove_shift")
|
||||
) %>
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<% Setting.mime_types[group].each do |content_type, mime_type_value| %>
|
||||
<span class="content-type">
|
||||
<%= check_box_tag content_type,
|
||||
setting.value.split.include?(mime_type_value),
|
||||
setting.value.split.include?(mime_type_value) %>
|
||||
setting.value.split.include?(mime_type_value),
|
||||
setting.value.split.include?(mime_type_value) %>
|
||||
<%= label_tag content_type, content_type.upcase %>
|
||||
</span>
|
||||
<% end %>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
<div class="small-12 medium-6 large-4 margin-top">
|
||||
<%= submit_tag t("admin.settings.index.map.form.submit"),
|
||||
class: "button hollow expanded" %>
|
||||
class: "button hollow expanded" %>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<%= f.hidden_field :tab, id: dom_id(setting, :tab), value: tab if defined?(tab) %>
|
||||
<div class="small-12 medium-6 large-8 column">
|
||||
<%= f.text_area :value,
|
||||
label: false,
|
||||
id: dom_id(setting, :value),
|
||||
"aria-label": strip_tags(t("settings.#{setting.key}")),
|
||||
"aria-describedby": dom_id(setting, :description) %>
|
||||
label: false,
|
||||
id: dom_id(setting, :value),
|
||||
"aria-label": strip_tags(t("settings.#{setting.key}")),
|
||||
"aria-describedby": dom_id(setting, :description) %>
|
||||
</div>
|
||||
<div class="small-12 medium-6 large-4 column">
|
||||
<%= f.submit(t("admin.settings.index.update_setting"), class: "button hollow expanded") %>
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
</div>
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= select_tag :heading_id,
|
||||
options_for_select(budget_heading_select_options(@budget),
|
||||
params[:heading_id]),
|
||||
include_blank: true %>
|
||||
options_for_select(budget_heading_select_options(@budget),
|
||||
params[:heading_id]),
|
||||
include_blank: true %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<%= form_for [:admin, @signature_sheet] do |f| %>
|
||||
<%= render "shared/errors",
|
||||
resource: @signature_sheet %>
|
||||
resource: @signature_sheet %>
|
||||
|
||||
<div class="small-12 medium-6 large-4">
|
||||
<%= f.text_field :title %>
|
||||
|
||||
@@ -21,12 +21,12 @@
|
||||
<div id="verified_signatures" class="callout success">
|
||||
<strong>
|
||||
<%= t("admin.signature_sheets.show.verified",
|
||||
count: @signature_sheet.signatures.verified.count) %>
|
||||
count: @signature_sheet.signatures.verified.count) %>
|
||||
</strong>
|
||||
<br />
|
||||
<strong>
|
||||
<%= t("admin.signature_sheets.show.voted",
|
||||
count: @voted_signatures) %>
|
||||
count: @voted_signatures) %>
|
||||
</strong>
|
||||
|
||||
</div>
|
||||
@@ -35,7 +35,7 @@
|
||||
<p>
|
||||
<strong>
|
||||
<%= t("admin.signature_sheets.show.unverified",
|
||||
count: @signature_sheet.signatures.unverified.count) %>
|
||||
count: @signature_sheet.signatures.unverified.count) %>
|
||||
<%= t("admin.signature_sheets.show.unverified_error") %>
|
||||
</strong>
|
||||
</p>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%= render "shared/common_globalize_locales",
|
||||
resource: nil,
|
||||
display_style: lambda { |locale| site_customization_display_translation_style(locale) },
|
||||
manage_languages: defined?(manage_languages) ? manage_languages : true %>
|
||||
resource: nil,
|
||||
display_style: lambda { |locale| site_customization_display_translation_style(locale) },
|
||||
manage_languages: defined?(manage_languages) ? manage_languages : true %>
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
<%= link_to t("admin.stats.show.proposal_notifications"),
|
||||
proposal_notifications_admin_stats_path, class: "button hollow" %>
|
||||
<%= link_to t("admin.stats.show.incomplete_verifications"),
|
||||
admin_verifications_path, class: "button hollow" %>
|
||||
admin_verifications_path, class: "button hollow" %>
|
||||
<%= link_to t("admin.stats.show.sdg"),
|
||||
sdg_admin_stats_path, class: "button hollow" if feature?(:sdg) %>
|
||||
sdg_admin_stats_path, class: "button hollow" if feature?(:sdg) %>
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
@@ -31,10 +31,10 @@
|
||||
</div>
|
||||
|
||||
<%= link_to t("admin.system_emails.preview_pending.moderate_pending"),
|
||||
admin_system_email_moderate_pending_path(system_email_id: "proposal_notification_digest",
|
||||
id: preview.id),
|
||||
method: :put,
|
||||
class: "button hollow float-right" %>
|
||||
admin_system_email_moderate_pending_path(system_email_id: "proposal_notification_digest",
|
||||
id: preview.id),
|
||||
method: :put,
|
||||
class: "button hollow float-right" %>
|
||||
</div>
|
||||
<hr>
|
||||
<% end %>
|
||||
|
||||
@@ -22,11 +22,11 @@
|
||||
<tr>
|
||||
<td>
|
||||
<%= form_for(tag,
|
||||
url: admin_tag_path(tag),
|
||||
as: :tag,
|
||||
html: { id: "edit_tag_#{tag.id}" }) do |f| %>
|
||||
url: admin_tag_path(tag),
|
||||
as: :tag,
|
||||
html: { id: "edit_tag_#{tag.id}" }) do |f| %>
|
||||
|
||||
<strong><%= tag.name %></strong>
|
||||
<strong><%= tag.name %></strong>
|
||||
<% end %>
|
||||
</td>
|
||||
<td id="tag_<%= tag.id %>">
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<% content_for :meta_description do %><%= @budget.description_for_phase("finished") %><% end %>
|
||||
<% provide :social_media_meta_tags do %>
|
||||
<%= render "shared/social_media_meta_tags",
|
||||
social_url: budget_executions_url(@budget),
|
||||
social_title: @budget.name,
|
||||
social_description: @budget.description_for_phase("finished") %>
|
||||
social_url: budget_executions_url(@budget),
|
||||
social_title: @budget.name,
|
||||
social_description: @budget.description_for_phase("finished") %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :canonical do %>
|
||||
|
||||
@@ -37,12 +37,12 @@
|
||||
<div class="small-12 medium-9">
|
||||
<div class="callout warning margin-top">
|
||||
<%= sanitize(t("budgets.investments.header.different_heading_assigned",
|
||||
heading_link: heading_link(@assigned_heading, @budget))) %>
|
||||
heading_link: heading_link(@assigned_heading, @budget))) %>
|
||||
<br>
|
||||
<small>
|
||||
<%= sanitize(t("budgets.investments.header.change_ballot",
|
||||
check_ballot: link_to(t("budgets.investments.header.check_ballot_link"),
|
||||
budget_ballot_path(@budget)))) %>
|
||||
check_ballot: link_to(t("budgets.investments.header.check_ballot_link"),
|
||||
budget_ballot_path(@budget)))) %>
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<div class="supports">
|
||||
<span class="total-supports no-button">
|
||||
<%= t("budgets.investments.investment.supports",
|
||||
count: investment.total_votes) %>
|
||||
count: investment.total_votes) %>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -50,9 +50,9 @@
|
||||
<div id="<%= dom_id(investment) %>_ballot"
|
||||
class="small-12 medium-3 column text-center">
|
||||
<%= render "/budgets/investments/ballot",
|
||||
investment: investment,
|
||||
investment_ids: investment_ids,
|
||||
ballot: ballot %>
|
||||
investment: investment,
|
||||
investment_ids: investment_ids,
|
||||
ballot: ballot %>
|
||||
</div>
|
||||
<% elsif investment.should_show_price? %>
|
||||
<div id="<%= dom_id(investment) %>_price"
|
||||
|
||||
@@ -46,8 +46,8 @@
|
||||
|
||||
<% if feature?(:allow_attached_documents) %>
|
||||
<%= render "documents/documents",
|
||||
documents: investment.documents,
|
||||
max_documents_allowed: Budget::Investment.max_documents_allowed %>
|
||||
documents: investment.documents,
|
||||
max_documents_allowed: Budget::Investment.max_documents_allowed %>
|
||||
<% end %>
|
||||
|
||||
<%= render "shared/tags", taggable: investment %>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<% provide :social_media_meta_tags do %>
|
||||
<%= render "shared/social_media_meta_tags",
|
||||
social_url: budget_investments_path(investment),
|
||||
social_title: investment.title,
|
||||
social_description: investment.description,
|
||||
twitter_image_url: (investment.image.present? ? polymorphic_path(investment.image.variant(:thumb)) : nil),
|
||||
og_image_url: (investment.image.present? ? polymorphic_path(investment.image.variant(:thumb)) : nil) %>
|
||||
social_url: budget_investments_path(investment),
|
||||
social_title: investment.title,
|
||||
social_description: investment.description,
|
||||
twitter_image_url: (investment.image.present? ? polymorphic_path(investment.image.variant(:thumb)) : nil),
|
||||
og_image_url: (investment.image.present? ? polymorphic_path(investment.image.variant(:thumb)) : nil) %>
|
||||
<% end %>
|
||||
|
||||
<section class="budget-investment-show" id="<%= dom_id(investment) %>">
|
||||
@@ -39,7 +39,7 @@
|
||||
<span class="total-supports">
|
||||
<strong>
|
||||
<%= t("budgets.investments.investment.supports",
|
||||
count: investment.total_votes) %>
|
||||
count: investment.total_votes) %>
|
||||
</strong>
|
||||
</span>
|
||||
</div>
|
||||
@@ -49,9 +49,9 @@
|
||||
<div class="text-center">
|
||||
<div id="<%= dom_id(investment) %>_ballot">
|
||||
<%= render "ballot",
|
||||
investment: investment,
|
||||
investment_ids: investment_ids,
|
||||
ballot: ballot %>
|
||||
investment: investment,
|
||||
investment_ids: investment_ids,
|
||||
ballot: ballot %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -93,22 +93,23 @@
|
||||
<% if investment.should_show_price_explanation? %>
|
||||
<div class="text-center" data-magellan>
|
||||
<%= link_to t("budgets.investments.show.see_price_explanation"),
|
||||
"#price_explanation", class: "small" %>
|
||||
"#price_explanation",
|
||||
class: "small" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= render "shared/social_share",
|
||||
share_title: t("budgets.investments.show.share"),
|
||||
title: investment.title,
|
||||
image_url: image_absolute_url(investment.image, :thumb),
|
||||
url: budget_investment_url(investment.budget, investment),
|
||||
description: t("budgets.investments.share.message",
|
||||
title: investment.title,
|
||||
handle: setting["org_name"]),
|
||||
mobile: t("budgets.investments.share.message",
|
||||
title: investment.title,
|
||||
handle: setting["twitter_handle"]) %>
|
||||
share_title: t("budgets.investments.show.share"),
|
||||
title: investment.title,
|
||||
image_url: image_absolute_url(investment.image, :thumb),
|
||||
url: budget_investment_url(investment.budget, investment),
|
||||
description: t("budgets.investments.share.message",
|
||||
title: investment.title,
|
||||
handle: setting["org_name"]),
|
||||
mobile: t("budgets.investments.share.message",
|
||||
title: investment.title,
|
||||
handle: setting["twitter_handle"]) %>
|
||||
|
||||
<% if current_user %>
|
||||
<div class="sidebar-divider"></div>
|
||||
|
||||
@@ -3,11 +3,12 @@
|
||||
<% if can?(:create, Budget::Investment.new(budget: @budget)) %>
|
||||
<% if current_user && current_user.level_two_or_three_verified? %>
|
||||
<%= link_to t("budgets.investments.index.sidebar.create"),
|
||||
new_budget_investment_path(budget_id: @budget.id), class: "button budget expanded" %>
|
||||
new_budget_investment_path(budget_id: @budget.id),
|
||||
class: "button budget expanded" %>
|
||||
<% else %>
|
||||
<div class="callout warning">
|
||||
<%= sanitize(t("budgets.investments.index.sidebar.verified_only",
|
||||
verify: link_to_verify_account)) %>
|
||||
verify: link_to_verify_account)) %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
<% content_for :canonical do %>
|
||||
<% if @heading.present? %>
|
||||
<%= render "shared/canonical",
|
||||
href: budget_investments_url(@budget,
|
||||
heading_id: @heading.id,
|
||||
filter: @current_filter) %>
|
||||
href: budget_investments_url(@budget,
|
||||
heading_id: @heading.id,
|
||||
filter: @current_filter) %>
|
||||
<% else %>
|
||||
<%= render "shared/canonical", href: budget_investments_url(@budget) %>
|
||||
<% end %>
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
<% end %>
|
||||
|
||||
<%= render "/budgets/investments/investment_show",
|
||||
investment: @investment,
|
||||
investment_ids: @investment_ids,
|
||||
ballot: @ballot %>
|
||||
investment: @investment,
|
||||
investment_ids: @investment_ids,
|
||||
ballot: @ballot %>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<% content_for :meta_description do %><%= @budget.description_for_phase("finished") %><% end %>
|
||||
<% provide :social_media_meta_tags do %>
|
||||
<%= render "shared/social_media_meta_tags",
|
||||
social_url: budget_results_url(@budget),
|
||||
social_title: @budget.name,
|
||||
social_description: @budget.description_for_phase("finished") %>
|
||||
social_url: budget_results_url(@budget),
|
||||
social_title: @budget.name,
|
||||
social_description: @budget.description_for_phase("finished") %>
|
||||
<% end %>
|
||||
<% content_for :canonical do %>
|
||||
<%= render "shared/canonical", href: budget_results_url(@budget) %>
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
<% end %>
|
||||
<% provide :social_media_meta_tags do %>
|
||||
<%= render "shared/social_media_meta_tags",
|
||||
social_url: budget_stats_url(@budget),
|
||||
social_title: @budget.name,
|
||||
social_description: @budget.description_for_phase("finished") %>
|
||||
social_url: budget_stats_url(@budget),
|
||||
social_title: @budget.name,
|
||||
social_description: @budget.description_for_phase("finished") %>
|
||||
<% end %>
|
||||
|
||||
<div class="participation-stats budgets-stats">
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
<div id="js-comment-form-<%= css_id %>" class="comment-form">
|
||||
<%= form_for Comment.new, remote: true, html: { id: "new_comment_#{css_id}" } do |f| %>
|
||||
<%= f.text_area :body,
|
||||
id: "comment-body-#{css_id}",
|
||||
maxlength: Comment.body_max_length,
|
||||
label: leave_comment_text(commentable) %>
|
||||
id: "comment-body-#{css_id}",
|
||||
maxlength: Comment.body_max_length,
|
||||
label: leave_comment_text(commentable) %>
|
||||
|
||||
<%= f.hidden_field :commentable_type, value: commentable.class.name, id: "comment_commentable_type_#{css_id}" %>
|
||||
<%= f.hidden_field :commentable_id, value: commentable.id, id: "comment_commentable_id_#{css_id}" %>
|
||||
@@ -18,15 +18,15 @@
|
||||
<% if can? :comment_as_moderator, commentable %>
|
||||
<div class="float-right">
|
||||
<%= f.check_box :as_moderator,
|
||||
label: t("comments.form.comment_as_moderator"),
|
||||
id: "comment-as-moderator-#{css_id}" %>
|
||||
label: t("comments.form.comment_as_moderator"),
|
||||
id: "comment-as-moderator-#{css_id}" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if can? :comment_as_administrator, commentable %>
|
||||
<div class="float-right">
|
||||
<%= f.check_box :as_administrator,
|
||||
label: t("comments.form.comment_as_admin"),
|
||||
id: "comment-as-administrator-#{css_id}" %>
|
||||
label: t("comments.form.comment_as_admin"),
|
||||
id: "comment-as-administrator-#{css_id}" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
<p class="topic-info">
|
||||
<%= t("communities.poll.take_part",
|
||||
from: l(poll.starts_at.to_date), to: l(poll.ends_at.to_date)) %>
|
||||
from: l(poll.starts_at.to_date),
|
||||
to: l(poll.ends_at.to_date)) %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<div class="goal-supports">
|
||||
<strong>
|
||||
<%= t("dashboard.goal.target_supports",
|
||||
count: number_with_precision(goal.required_supports,
|
||||
delimiter: ".", precision: 0)) %>
|
||||
count: number_with_precision(goal.required_supports,
|
||||
delimiter: ".", precision: 0)) %>
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
<div class="small-12 column small-centered margin-top">
|
||||
<%= link_to t("dashboard.resource.view_resource"),
|
||||
new_proposal_dashboard_mailing_path(proposal.to_param),
|
||||
class: "button expanded" %>
|
||||
new_proposal_dashboard_mailing_path(proposal.to_param),
|
||||
class: "button expanded" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user