Use double quotes in app/views/proposals

This commit is contained in:
Julian Herrero
2019-03-14 17:14:10 +01:00
parent 129a258f19
commit 7fe6285fe3
23 changed files with 85 additions and 85 deletions

View File

@@ -1,15 +1,15 @@
<% if can? :hide, (notification || notification.author) %>
<div class="reply">
<span class='js-moderation-actions'>
<span class="js-moderation-actions">
<% if can? :hide, notification %>
<%= link_to t("admin.actions.hide").capitalize, hide_moderation_proposal_notification_path(notification),
method: :put, remote: true, data: { confirm: t('admin.actions.confirm') } %>
method: :put, remote: true, data: { confirm: t("admin.actions.confirm") } %>
<% end %>
<% if can? :hide, notification.author %>
<span class="divider">&nbsp;&bull;&nbsp;</span>
<%= link_to t("admin.actions.hide_author").capitalize, hide_moderation_user_path(notification.author_id),
method: :put, data: { confirm: t('admin.actions.confirm') } %>
method: :put, data: { confirm: t("admin.actions.confirm") } %>
<% end %>
</span>
</div>

View File

@@ -1,10 +1,10 @@
<% if can? :hide, proposal %>
<%= link_to t("admin.actions.hide").capitalize, hide_moderation_proposal_path(proposal),
method: :put, remote: true, data: { confirm: t('admin.actions.confirm') } %>
method: :put, remote: true, data: { confirm: t("admin.actions.confirm") } %>
<% end %>
<% if can? :hide, proposal.author %>
&nbsp;|&nbsp;
<%= link_to t("admin.actions.hide_author").capitalize, hide_moderation_user_path(proposal.author_id),
method: :put, data: { confirm: t('admin.actions.confirm') } %>
method: :put, data: { confirm: t("admin.actions.confirm") } %>
<% end %>

View File

@@ -5,7 +5,7 @@
<ul id="categories" class="no-bullet categories">
<% @categories.each do |category| %>
<li class="inline-block">
<% css_class = { class: 'is-active' } if params[:search] == category.name %>
<% css_class = { class: "is-active" } if params[:search] == category.name %>
<%= link_to category.name, proposals_path(search: category.name), css_class || {} %>
</li>
<% end %>

View File

@@ -1,10 +1,10 @@
<% cache [locale_and_user_status, @current_order, commentable_cache_key(@proposal), @comment_tree.comments, @comment_tree.comment_authors, @proposal.comments_count, @comment_flags] do %>
<div class="row comments">
<div id="comments" class="small-12 column">
<%= render 'shared/wide_order_selector', i18n_namespace: "comments" %>
<%= render "shared/wide_order_selector", i18n_namespace: "comments" %>
<% if user_signed_in? %>
<%= render 'comments/form', {commentable: @proposal, parent_id: nil, toggeable: false} %>
<%= render "comments/form", {commentable: @proposal, parent_id: nil, toggeable: false} %>
<% else %>
<br>
@@ -16,7 +16,7 @@
<% end %>
<% @comment_tree.root_comments.each do |comment| %>
<%= render 'comments/comment', comment: comment %>
<%= render "comments/comment", comment: comment %>
<% end %>
<%= paginate @comment_tree.root_comments %>
</div>

View File

@@ -22,6 +22,6 @@
</div>
<div id="<%= dom_id(proposal) %>_votes" class="small-12 medium-3 column">
<%= render 'featured_votes', proposal: proposal %>
<%= render "featured_votes", proposal: proposal %>
</div>
</div>

View File

@@ -5,29 +5,29 @@
<%= t("proposals.proposal.already_supported") %>
</div>
<% else %>
<%= link_to vote_featured_proposal_path(proposal, value: 'yes'),
<%= link_to vote_featured_proposal_path(proposal, value: "yes"),
class: "button button-support small expanded",
title: t('proposals.proposal.support_title'), method: "post", remote: true do %>
title: t("proposals.proposal.support_title"), method: "post", remote: true do %>
<%= t("proposals.proposal.support") %>
<% end %>
<% end %>
</div>
<% if user_signed_in? && current_user.organization? %>
<div class="participation-not-allowed" style='display:none' aria-hidden="false">
<div class="participation-not-allowed" style="display:none" aria-hidden="false">
<p>
<%= t("votes.organizations") %>
</p>
</div>
<% elsif user_signed_in? && !proposal.votable_by?(current_user)%>
<div class="participation-not-allowed" style='display:none' aria-hidden="false">
<div class="participation-not-allowed" style="display:none" aria-hidden="false">
<p>
<%= t("votes.verified_only",
verify_account: link_to(t("votes.verify_account"), verification_path )).html_safe %>
</p>
</div>
<% elsif !user_signed_in? %>
<div class="participation-not-allowed" style='display:none' aria-hidden="false">
<div class="participation-not-allowed" style="display:none" aria-hidden="false">
<%= t("votes.unauthenticated",
signin: link_to(t("votes.signin"), new_user_session_path),
signup: link_to(t("votes.signup"), new_user_registration_path)).html_safe %>
@@ -35,9 +35,9 @@
<% end %>
<% if voted_for?(@featured_proposals_votes, proposal) %>
<% if setting['twitter_handle'] %>
<% if setting["twitter_handle"] %>
<div class="share-supported">
<%= render partial: 'shared/social_share', locals: {
<%= render partial: "shared/social_share", locals: {
title: proposal.title,
url: proposal_url(proposal),
description: proposal.summary,

View File

@@ -4,7 +4,7 @@
<span class="icon-flag flag-disable"></span>
</a>
<span class="dropdown-pane" id="flag-drop-proposal-<%= proposal.id %>" data-dropdown data-auto-focus="true">
<%= link_to t('shared.flag'), flag_proposal_path(proposal), method: :put, remote: true, id: "flag-proposal-#{ proposal.id }" %>
<%= link_to t("shared.flag"), flag_proposal_path(proposal), method: :put, remote: true, id: "flag-proposal-#{ proposal.id }" %>
</span>
<% end %>
@@ -13,7 +13,7 @@
<span class="icon-flag flag-active"></span>
</a>
<span class="dropdown-pane" id="unflag-drop-proposal-<%= proposal.id %>" data-dropdown data-auto-focus="true">
<%= link_to t('shared.unflag'), unflag_proposal_path(proposal), method: :put, remote: true, id: "unflag-proposal-#{ proposal.id }" %>
<%= link_to t("shared.unflag"), unflag_proposal_path(proposal), method: :put, remote: true, id: "unflag-proposal-#{ proposal.id }" %>
</span>
<% end %>
</span>

View File

@@ -1,5 +1,5 @@
<%= form_for(@proposal, url: form_url) do |f| %>
<%= render 'shared/errors', resource: @proposal %>
<%= render "shared/errors", resource: @proposal %>
<div class="row">
<div class="small-12 column">
@@ -25,7 +25,7 @@
<%= f.label :summary, t("proposals.form.proposal_summary") %>
<p class="help-text" id="summary-help-text"><%= t("proposals.form.proposal_summary_note") %></p>
<%= f.text_area :summary, rows: 4, maxlength: 200, label: false,
placeholder: t('proposals.form.proposal_summary'),
placeholder: t("proposals.form.proposal_summary"),
aria: {describedby: "summary-help-text"} %>
</div>
@@ -48,13 +48,13 @@
<% if feature?(:allow_images) %>
<div class="images small-12 column">
<%= render 'images/nested_image', imageable: @proposal, f: f %>
<%= render "images/nested_image", imageable: @proposal, f: f %>
</div>
<% end %>
<% if feature?(:allow_attached_documents) %>
<div class="documents small-12 column">
<%= render 'documents/nested_documents', documentable: @proposal, f: f %>
<%= render "documents/nested_documents", documentable: @proposal, f: f %>
</div>
<% end %>
@@ -66,7 +66,7 @@
<% if feature?(:map) %>
<div class="small-12 column">
<%= render 'map_locations/form_fields',
<%= render "map_locations/form_fields",
form: f,
map_location: @proposal.map_location || MapLocation.new,
label: t("proposals.form.map_location"),
@@ -93,7 +93,7 @@
<%= f.text_field :tag_list, value: @proposal.tag_list.to_s,
label: false,
placeholder: t("proposals.form.tags_placeholder"),
class: 'js-tag-list tag-autocomplete',
class: "js-tag-list tag-autocomplete",
aria: {describedby: "tag-list-help-text"},
data: {js_url: suggest_tags_path} %>
</div>
@@ -110,7 +110,7 @@
<div class="small-12 column">
<% if @proposal.new_record? %>
<%= f.label :terms_of_service do %>
<%= f.check_box :terms_of_service, title: t('form.accept_terms_title'), label: false %>
<%= f.check_box :terms_of_service, title: t("form.accept_terms_title"), label: false %>
<span class="checkbox">
<%= t("form.accept_terms",
policy: link_to(t("form.policy"), "/privacy", target: "blank"),

View File

@@ -1,6 +1,6 @@
<div class="sidebar-divider"></div>
<h2 class="sidebar-title"><%= t("shared.tags_cloud.districts") %></h2>
<br>
<%= link_to map_proposals_path, id: 'map', title: t("shared.tags_cloud.districts_list") do %>
<%= link_to map_proposals_path, id: "map", title: t("shared.tags_cloud.districts_list") do %>
<%= image_tag(image_path_for("map.jpg"), alt: t("shared.tags_cloud.districts_list")) %>
<% end %>

View File

@@ -1,5 +1,5 @@
<div class="proposal-info">
<%= render '/shared/author_info', resource: @proposal %>
<%= render "/shared/author_info", resource: @proposal %>
<span class="bullet">&nbsp;&bull;&nbsp;</span>
<%= l @proposal.created_at.to_date %>
@@ -10,7 +10,7 @@
<% if current_user %>
<span class="bullet">&nbsp;&bull;&nbsp;</span>
<span class="js-flag-actions">
<%= render 'proposals/flag_actions', proposal: @proposal %>
<%= render "proposals/flag_actions", proposal: @proposal %>
</span>
<% end %>
@@ -46,7 +46,7 @@
<div class="document-link">
<p>
<span class="icon-document"></span>&nbsp;
<strong><%= t('proposals.show.title_external_url') %></strong>
<strong><%= t("proposals.show.title_external_url") %></strong>
</p>
<%= text_with_links @proposal.external_url %>
</div>
@@ -56,7 +56,7 @@
<div class="video-link">
<p>
<span class="icon-video"></span>&nbsp;
<strong><%= t('proposals.show.title_video_url') %></strong>
<strong><%= t("proposals.show.title_video_url") %></strong>
</p>
<%= text_with_links @proposal.video_url %>
</div>
@@ -70,16 +70,16 @@
<div id="retired_explanation" class="callout">
<h2>
<%= t("proposals.show.retired") %>:
<%= t("proposals.retire_options.#{@proposal.retired_reason}") unless @proposal.retired_reason == 'other' %>
<%= t("proposals.retire_options.#{@proposal.retired_reason}") unless @proposal.retired_reason == "other" %>
</h2>
<%= simple_format text_with_links(@proposal.retired_explanation), {}, sanitize: false %>
</div>
<% end %>
<% if feature?(:allow_attached_documents) %>
<%= render 'documents/documents',
<%= render "documents/documents",
documents: @proposal.documents,
max_documents_allowed: Proposal.max_documents_allowed %>
<% end %>
<%= render 'shared/tags', taggable: @proposal %>
<%= render "shared/tags", taggable: @proposal %>

View File

@@ -3,7 +3,7 @@
<div id="proposal_notifications" class="small-12 column notification-body">
<% if @notifications.blank? %>
<div class="callout primary text-center">
<%= t('proposals.show.no_notifications') %>
<%= t("proposals.show.no_notifications") %>
</div>
<% end %>
@@ -14,7 +14,7 @@
<%= simple_format text_with_links(notification.body), {}, sanitize: false %>
<span class="js-flag-actions">
<%= render 'proposal_notifications/actions', notification: notification %>
<%= render "proposal_notifications/actions", notification: notification %>
</span>
</div>
<% end %>

View File

@@ -18,7 +18,7 @@
<div class="small-12 medium-9 column">
<% end %>
<div class="proposal-content">
<% cache [locale_and_user_status(proposal), 'index', proposal, proposal.author] do %>
<% cache [locale_and_user_status(proposal), "index", proposal, proposal.author] do %>
<h3><%= link_to proposal.title, namespaced_proposal_path(proposal) %></h3>
<p class="proposal-info">
<span class="icon-comments"></span>&nbsp;
@@ -76,8 +76,8 @@
<p><%= t("proposals.proposal.archived") %></p>
</div>
<% else %>
<%= render 'votes',
{ proposal: proposal, vote_url: vote_proposal_path(proposal, value: 'yes') } %>
<%= render "votes",
{ proposal: proposal, vote_url: vote_proposal_path(proposal, value: "yes") } %>
<% end %>
</div>
</div>

View File

@@ -4,7 +4,7 @@
<div class="small-12 column">
<div class="proposal-content">
<% cache [locale_and_user_status(proposal),
'index_minimal', proposal, proposal.author] do %>
"index_minimal", proposal, proposal.author] do %>
<h3><%= link_to proposal.title, namespaced_proposal_path(proposal) %></h3>
<% end %>
</div>

View File

@@ -2,10 +2,10 @@
<h2 class="sidebar-title"><%= t("proposals.index.retired_proposals") %></h2>
<% if params[:retired].blank? %>
<p><%= link_to t("proposals.index.retired_proposals_link"), proposals_path(retired: 'all'), class: "small" %></p>
<p><%= link_to t("proposals.index.retired_proposals_link"), proposals_path(retired: "all"), class: "small" %></p>
<% else %>
<div class="sidebar-links">
<%= link_to t("proposals.index.retired_links.all"), proposals_path(retired: 'all') %>
<%= link_to t("proposals.index.retired_links.all"), proposals_path(retired: "all") %>
<% Proposal::RETIRE_OPTIONS.each do |option| %>
<%= link_to t("proposals.index.retired_links.#{option}"), proposals_path(retired: option) %>
<% end %>

View File

@@ -1,10 +1,10 @@
<%= render 'shared/social_share',
<%= render "shared/social_share",
share_title: share_title,
title: proposal.title,
url: proposal_url(proposal),
description: t("proposals.share.message",
title: proposal.title,
handle: setting['org_name']),
handle: setting["org_name"]),
mobile: t("proposals.share.message",
title: proposal.title,
handle: setting['twitter_handle']) %>
handle: setting["twitter_handle"]) %>

View File

@@ -24,7 +24,7 @@
<% elsif user_signed_in? && proposal.votable_by?(current_user) %>
<%= link_to vote_url,
class: "button button-support small expanded",
title: t('proposals.proposal.support_title'), method: "post", remote: true do %>
title: t("proposals.proposal.support_title"), method: "post", remote: true do %>
<%= t("proposals.proposal.support") %>
<% end %>
<% else %>
@@ -35,14 +35,14 @@
</div>
<% if user_signed_in? && current_user.organization? %>
<div class="participation-not-allowed" style='display:none' aria-hidden="false">
<div class="participation-not-allowed" style="display:none" aria-hidden="false">
<p>
<%= t("votes.organizations") %>
</p>
</div>
<% elsif user_signed_in? && !proposal.votable_by?(current_user) %>
<div tabindex="0">
<div class="participation-not-allowed" style='display:none' aria-hidden="false">
<div class="participation-not-allowed" style="display:none" aria-hidden="false">
<p>
<%= t("votes.verified_only",
verify_account: link_to(t("votes.verify_account"), verification_path )).html_safe %>
@@ -51,7 +51,7 @@
</div>
<% elsif !user_signed_in? %>
<div tabindex="0">
<div class="participation-not-allowed" style='display:none' aria-hidden="false">
<div class="participation-not-allowed" style="display:none" aria-hidden="false">
<%= t("votes.unauthenticated",
signin: link_to(t("votes.signin"), new_user_session_path),
signup: link_to(t("votes.signup"), new_user_registration_path)).html_safe %>
@@ -59,9 +59,9 @@
</div>
<% end %>
<% if voted_for?(@proposal_votes, proposal) && setting['twitter_handle'] %>
<% if voted_for?(@proposal_votes, proposal) && setting["twitter_handle"] %>
<div class="share-supported">
<%= render 'proposals/social_share', proposal: proposal, share_title: false %>
<%= render "proposals/social_share", proposal: proposal, share_title: false %>
</div>
<% end %>
</div>

View File

@@ -37,7 +37,7 @@
<%= render "shared/section_header", i18n_namespace: "proposals.index.section_header", image: "proposals" %>
<% end %>
<% if feature?('user.recommendations') && @recommended_proposals.present? %>
<% if feature?("user.recommendations") && @recommended_proposals.present? %>
<%= render "shared/recommended_index", recommended: @recommended_proposals,
disable_recommendations_path: recommendations_disable_proposals_path,
namespace: "proposals" %>
@@ -71,23 +71,23 @@
<%= render("shared/advanced_search", search_path: proposals_path(page: 1)) unless params[:retired].present? %>
<%= render 'shared/order_links', i18n_namespace: "proposals.index" %>
<%= render "shared/order_links", i18n_namespace: "proposals.index" %>
<% if @proposals.any? %>
<div class="show-for-small-only">
<%= link_to t("proposals.index.start_proposal"),
new_proposal_path,
class: 'button expanded' %>
class: "button expanded" %>
</div>
<% end %>
<div id="proposals-list">
<% if @proposals.any? || current_user.blank? %>
<% if proposals_default_view? %>
<%= render partial: 'proposals/proposal', collection: @proposals %>
<%= render partial: "proposals/proposal", collection: @proposals %>
<% else %>
<% @proposals.each do |proposal| %>
<%= render partial: '/proposals/proposal_minimal', locals: { proposal: proposal } %>
<%= render partial: "/proposals/proposal_minimal", locals: { proposal: proposal } %>
<% end %>
<% end %>
<% else %>
@@ -110,14 +110,14 @@
<aside class="margin-bottom">
<%= link_to t("proposals.index.start_proposal"),
new_proposal_path,
class: 'button expanded' %>
class: "button expanded" %>
<% if params[:retired].blank? %>
<%= render 'categories' %>
<%= render "shared/tag_cloud", taggable: 'proposal' %>
<%= render 'geozones' %>
<%= render 'popular' %>
<%= render "categories" %>
<%= render "shared/tag_cloud", taggable: "proposal" %>
<%= render "geozones" %>
<%= render "popular" %>
<% end %>
<%= render 'retired' %>
<%= render "retired" %>
</aside>
</div>

View File

@@ -1 +1 @@
<%= render 'shared/map', new_url_path: new_proposal_path %>
<%= render "shared/map", new_url_path: new_proposal_path %>

View File

@@ -5,7 +5,7 @@
<h1><%= t("proposals.new.start_new") %></h1>
<div data-alert class="callout primary">
<%= link_to help_path(anchor: "proposals"), title: t('shared.target_blank_html'), target: "_blank" do %>
<%= link_to help_path(anchor: "proposals"), title: t("shared.target_blank_html"), target: "_blank" do %>
<%= t("proposals.new.more_info")%>
<% end %>
</div>

View File

@@ -11,7 +11,7 @@
</div>
<%= form_for(@proposal, url: retire_proposal_path(@proposal)) do |f| %>
<%= render 'shared/errors', resource: @proposal %>
<%= render "shared/errors", resource: @proposal %>
<div class="row">
<div class="small-12 medium-6 large-4 column">
<%= f.label :retired_reason, t("proposals.retire_form.retired_reason_label") %>
@@ -23,7 +23,7 @@
<div class="small-12 medium-9 column">
<%= f.label :retired_explanation, t("proposals.retire_form.retired_explanation_label") %>
<%= f.text_area :retired_explanation, rows: 4, maxlength: 500, label: false,
placeholder: t('proposals.retire_form.retired_explanation_placeholder') %>
placeholder: t("proposals.retire_form.retired_explanation_placeholder") %>
</div>
</div>
@@ -35,4 +35,4 @@
<% end %>
</div>
</div>
</div>

View File

@@ -21,7 +21,7 @@
<%= t("proposals.proposal.share.edit") %>
</p>
<%= render partial: 'shared/social_share', locals: {
<%= render partial: "shared/social_share", locals: {
title: @proposal.title,
url: proposal_url(@proposal),
description: @proposal.summary,

View File

@@ -38,11 +38,11 @@
<% end %>
<%= render "proposals/info", proposal: @proposal %>
<%= render 'shared/geozone', geozonable: @proposal %>
<%= render 'relationable/related_content', relationable: @proposal %>
<%= render "shared/geozone", geozonable: @proposal %>
<%= render "relationable/related_content", relationable: @proposal %>
<div class="js-moderator-proposal-actions margin">
<%= render 'proposals/actions', proposal: @proposal %>
<%= render "proposals/actions", proposal: @proposal %>
</div>
</div>
@@ -53,7 +53,7 @@
<div class="show-actions-menu">
<% if current_editable?(@proposal) %>
<%= link_to edit_proposal_path(@proposal), class: 'button hollow expanded' do %>
<%= link_to edit_proposal_path(@proposal), class: "button hollow expanded" do %>
<span class="icon-edit"></span>
<%= t("proposals.show.edit_proposal_link") %>
<% end %>
@@ -61,7 +61,7 @@
<% if author_of_proposal?(@proposal) %>
<%= link_to new_proposal_notification_path(proposal_id: @proposal.id),
class: 'button hollow expanded' do %>
class: "button hollow expanded" do %>
<span class="icon-no-notification"></span>
<%= t("proposals.show.send_notification") %>
<% end %>
@@ -70,8 +70,8 @@
<% if can_destroy_image?(@proposal) %>
<%= link_to image_path(@proposal.image, from: request.url),
method: :delete,
class: 'button hollow alert expanded',
data: { confirm: t('images.actions.destroy.confirm') } do %>
class: "button hollow alert expanded",
data: { confirm: t("images.actions.destroy.confirm") } do %>
<span class="icon-image"></span>
<%= t("images.remove_image") %>
<% end %>
@@ -96,21 +96,21 @@
<p><%= t("proposals.proposal.archived") %></p>
</div>
<% else %>
<%= render 'votes',
{ proposal: @proposal, vote_url: vote_proposal_path(@proposal, value: 'yes') } %>
<%= render "votes",
{ proposal: @proposal, vote_url: vote_proposal_path(@proposal, value: "yes") } %>
<% end %>
</div>
<%= render 'proposals/social_share', proposal: @proposal, share_title: t("proposals.show.share") %>
<%= render "proposals/social_share", proposal: @proposal, share_title: t("proposals.show.share") %>
<% if current_user %>
<div class="sidebar-divider"></div>
<p class="sidebar-title"><%= t("shared.follow") %></p>
<%= render 'follows/follow_button', follow: find_or_build_follow(current_user, @proposal) %>
<%= render "follows/follow_button", follow: find_or_build_follow(current_user, @proposal) %>
<% end %>
<%= render 'communities/access_button', community: @proposal.community %>
<%= render "communities/access_button", community: @proposal.community %>
</aside>
</div>

View File

@@ -43,11 +43,11 @@
<div class="small-12 medium-3 column">
<aside class="sidebar">
<%= link_to t("proposals.index.start_proposal"), new_proposal_path, class: 'button radius expand' %>
<%= render "shared/tag_cloud", taggable: 'proposal' %>
<%= render 'categories' %>
<%= render 'geozones' %>
<%= link_to t("proposals.index.start_proposal"), new_proposal_path, class: "button radius expand" %>
<%= render "shared/tag_cloud", taggable: "proposal" %>
<%= render "categories" %>
<%= render "geozones" %>
</aside>
</div>
</div>
</main>
</main>