Merge pull request #5396 from consuldemocracy/main_section
Add a link to skip to the main content
This commit is contained in:
22
app/assets/stylesheets/layout/skip_to_main_content.scss
Normal file
22
app/assets/stylesheets/layout/skip_to_main_content.scss
Normal file
@@ -0,0 +1,22 @@
|
||||
.skip-to-main-content {
|
||||
@include grid-column-gutter;
|
||||
|
||||
a {
|
||||
&:not(:focus) {
|
||||
@include element-invisible;
|
||||
width: 0 !important;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
@include body-colors;
|
||||
|
||||
$outline-size: $focus-inner-width + $focus-middle-width + $focus-outer-width;
|
||||
|
||||
padding: 0.4rem;
|
||||
position: absolute;
|
||||
$global-left: $outline-size;
|
||||
top: $outline-size;
|
||||
z-index: 1000;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,24 +1,24 @@
|
||||
<main class="admin-budgets-show">
|
||||
<%= back_link_to admin_budgets_path %>
|
||||
<% provide :main_class, "admin-budgets-show" %>
|
||||
|
||||
<%= header %>
|
||||
<%= back_link_to admin_budgets_path %>
|
||||
|
||||
<%= render Admin::Budgets::DraftingComponent.new(budget) %>
|
||||
<%= render Admin::Budgets::LinksComponent.new(budget) %>
|
||||
<%= header %>
|
||||
|
||||
<section class="groups-and-headings" aria-labelledby="groups_and_headings_header">
|
||||
<h3 id="groups_and_headings_header"><%= t("admin.budgets.show.groups_and_headings") %></h3>
|
||||
<%= render Admin::Budgets::GroupsAndHeadingsComponent.new(budget) %>
|
||||
</section>
|
||||
<%= render Admin::Budgets::DraftingComponent.new(budget) %>
|
||||
<%= render Admin::Budgets::LinksComponent.new(budget) %>
|
||||
|
||||
<section class="phases" aria-labelledby="phases_header">
|
||||
<h3 id="phases_header"><%= t("admin.budgets.edit.phases_caption") %></h3>
|
||||
<span class="help-text"><%= t("admin.budgets.edit.phases_table_help_text") %></span>
|
||||
<%= render Admin::BudgetPhases::PhasesComponent.new(budget) %>
|
||||
</section>
|
||||
<section class="groups-and-headings" aria-labelledby="groups_and_headings_header">
|
||||
<h3 id="groups_and_headings_header"><%= t("admin.budgets.show.groups_and_headings") %></h3>
|
||||
<%= render Admin::Budgets::GroupsAndHeadingsComponent.new(budget) %>
|
||||
</section>
|
||||
|
||||
<section aria-labelledby="actions_header">
|
||||
<h3 id="actions_header"><%= t("admin.budgets.edit.actions") %></h3>
|
||||
<%= render Admin::Budgets::ActionsComponent.new(budget) %>
|
||||
</section>
|
||||
</main>
|
||||
<section class="phases" aria-labelledby="phases_header">
|
||||
<h3 id="phases_header"><%= t("admin.budgets.edit.phases_caption") %></h3>
|
||||
<span class="help-text"><%= t("admin.budgets.edit.phases_table_help_text") %></span>
|
||||
<%= render Admin::BudgetPhases::PhasesComponent.new(budget) %>
|
||||
</section>
|
||||
|
||||
<section aria-labelledby="actions_header">
|
||||
<h3 id="actions_header"><%= t("admin.budgets.edit.actions") %></h3>
|
||||
<%= render Admin::Budgets::ActionsComponent.new(budget) %>
|
||||
</section>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<main class="admin-budgets-wizard-headings-index">
|
||||
<%= back_link_to admin_budgets_wizard_budget_groups_path(budget, url_params), back_link_text %>
|
||||
<% provide :main_class, "admin-budgets-wizard-headings-index" %>
|
||||
|
||||
<%= header %>
|
||||
<%= back_link_to admin_budgets_wizard_budget_groups_path(budget, url_params), back_link_text %>
|
||||
|
||||
<%= render Admin::Budgets::HelpComponent.new("headings") %>
|
||||
<%= render Admin::BudgetsWizard::CreationTimelineComponent.new("headings") %>
|
||||
<%= header %>
|
||||
|
||||
<% unless single_heading? %>
|
||||
<%= render Admin::BudgetsWizard::Headings::GroupSwitcherComponent.new(group) %>
|
||||
<%= render Admin::BudgetHeadings::HeadingsComponent.new(headings) %>
|
||||
<% end %>
|
||||
<%= render Admin::BudgetsWizard::Headings::CreationStepComponent.new(new_heading) %>
|
||||
</main>
|
||||
<%= render Admin::Budgets::HelpComponent.new("headings") %>
|
||||
<%= render Admin::BudgetsWizard::CreationTimelineComponent.new("headings") %>
|
||||
|
||||
<% unless single_heading? %>
|
||||
<%= render Admin::BudgetsWizard::Headings::GroupSwitcherComponent.new(group) %>
|
||||
<%= render Admin::BudgetHeadings::HeadingsComponent.new(headings) %>
|
||||
<% end %>
|
||||
<%= render Admin::BudgetsWizard::Headings::CreationStepComponent.new(new_heading) %>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<% provide :main_class, "budget-groups-index" %>
|
||||
|
||||
<% content_for :canonical do %>
|
||||
<%= render "shared/canonical", href: budget_groups_url %>
|
||||
<% end %>
|
||||
|
||||
<main class="budget-groups-index">
|
||||
<%= header(before: back_link_to(budget_path(budget))) %>
|
||||
<%= render Budgets::GroupsAndHeadingsComponent.new(budget) %>
|
||||
</main>
|
||||
<%= header(before: back_link_to(budget_path(budget))) %>
|
||||
<%= render Budgets::GroupsAndHeadingsComponent.new(budget) %>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<main class="budget-investment-new">
|
||||
<%= back_link_to budgets_path %>
|
||||
<% provide :main_class, "budget-investment-new" %>
|
||||
|
||||
<%= header %>
|
||||
<%= back_link_to budgets_path %>
|
||||
|
||||
<%= render "/budgets/investments/form", form_url: budget_investments_path(budget) %>
|
||||
</main>
|
||||
<%= header %>
|
||||
|
||||
<%= render "/budgets/investments/form", form_url: budget_investments_path(budget) %>
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
<main class="debate-new">
|
||||
<%= back_link_to debates_path, t("debates.index.section_header.title") %>
|
||||
<% provide :main_class, "debate-new" %>
|
||||
|
||||
<%= header do %>
|
||||
<%= new_window_link_to t("debates.new.more_info"), help_path(anchor: "debates") %>
|
||||
<% end %>
|
||||
<%= back_link_to debates_path, t("debates.index.section_header.title") %>
|
||||
|
||||
<aside>
|
||||
<h2><%= t("debates.new.recommendations_title") %></h2>
|
||||
<%= header do %>
|
||||
<%= new_window_link_to t("debates.new.more_info"), help_path(anchor: "debates") %>
|
||||
<% end %>
|
||||
|
||||
<ul class="recommendations">
|
||||
<li><%= t("debates.new.recommendation_one") %></li>
|
||||
<li><%= t("debates.new.recommendation_two") %></li>
|
||||
<li><%= t("debates.new.recommendation_three") %></li>
|
||||
<li><%= t("debates.new.recommendation_four") %></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<aside>
|
||||
<h2><%= t("debates.new.recommendations_title") %></h2>
|
||||
|
||||
<%= render Debates::FormComponent.new(debate) %>
|
||||
</main>
|
||||
<ul class="recommendations">
|
||||
<li><%= t("debates.new.recommendation_one") %></li>
|
||||
<li><%= t("debates.new.recommendation_two") %></li>
|
||||
<li><%= t("debates.new.recommendation_three") %></li>
|
||||
<li><%= t("debates.new.recommendation_four") %></li>
|
||||
</ul>
|
||||
</aside>
|
||||
|
||||
<%= render Debates::FormComponent.new(debate) %>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<div class="skip-to-main-content">
|
||||
<%= link_to t("layouts.skip_to_main_content"), "#main" %>
|
||||
</div>
|
||||
2
app/components/layout/skip_to_main_content_component.rb
Normal file
2
app/components/layout/skip_to_main_content_component.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
class Layout::SkipToMainContentComponent < ApplicationComponent
|
||||
end
|
||||
@@ -1,47 +1,47 @@
|
||||
<main class="moderation-users-index">
|
||||
<h2><%= t("moderation.users.index.title") %></h2>
|
||||
<% provide :main_class, "moderation-users-index" %>
|
||||
|
||||
<%= render Admin::SearchComponent.new(label: t("moderation.users.index.search_placeholder")) %>
|
||||
<h2><%= t("moderation.users.index.title") %></h2>
|
||||
|
||||
<% if users.present? %>
|
||||
<h3><%= page_entries_info users %></h3>
|
||||
<%= render Admin::SearchComponent.new(label: t("moderation.users.index.search_placeholder")) %>
|
||||
|
||||
<table id="moderation_users" class="moderation-users">
|
||||
<thead>
|
||||
<th><%= t("admin.hidden_users.index.user") %></th>
|
||||
<th><%= t("admin.actions.actions") %></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% users.each do |user| %>
|
||||
<tr>
|
||||
<td>
|
||||
<%= user.name %>
|
||||
</td>
|
||||
<td>
|
||||
<% if user.hidden? %>
|
||||
<%= status(user) %>
|
||||
<% else %>
|
||||
<%= render Admin::TableActionsComponent.new(user, actions: []) do |actions| %>
|
||||
<%= actions.action(
|
||||
:hide,
|
||||
text: t("moderation.users.index.hide"),
|
||||
confirm: ->(name) { t("moderation.users.index.confirm_hide", name: name) },
|
||||
method: :put
|
||||
) %>
|
||||
<%= actions.action(
|
||||
:block,
|
||||
text: t("moderation.users.index.block"),
|
||||
confirm: ->(name) { t("moderation.users.index.confirm_block", name: name) },
|
||||
method: :put
|
||||
) %>
|
||||
<% end %>
|
||||
<% if users.present? %>
|
||||
<h3><%= page_entries_info users %></h3>
|
||||
|
||||
<table id="moderation_users" class="moderation-users">
|
||||
<thead>
|
||||
<th><%= t("admin.hidden_users.index.user") %></th>
|
||||
<th><%= t("admin.actions.actions") %></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% users.each do |user| %>
|
||||
<tr>
|
||||
<td>
|
||||
<%= user.name %>
|
||||
</td>
|
||||
<td>
|
||||
<% if user.hidden? %>
|
||||
<%= status(user) %>
|
||||
<% else %>
|
||||
<%= render Admin::TableActionsComponent.new(user, actions: []) do |actions| %>
|
||||
<%= actions.action(
|
||||
:hide,
|
||||
text: t("moderation.users.index.hide"),
|
||||
confirm: ->(name) { t("moderation.users.index.confirm_hide", name: name) },
|
||||
method: :put
|
||||
) %>
|
||||
<%= actions.action(
|
||||
:block,
|
||||
text: t("moderation.users.index.block"),
|
||||
confirm: ->(name) { t("moderation.users.index.confirm_block", name: name) },
|
||||
method: :put
|
||||
) %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<%= paginate users %>
|
||||
<% end %>
|
||||
</main>
|
||||
<%= paginate users %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
<main class="proposal-new">
|
||||
<%= back_link_to proposals_path, t("proposals.index.section_header.title") %>
|
||||
<% provide :main_class, "proposal-new" %>
|
||||
|
||||
<%= header do %>
|
||||
<%= new_window_link_to t("proposals.new.more_info"), help_path(anchor: "proposals") %>
|
||||
<% end %>
|
||||
<%= back_link_to proposals_path, t("proposals.index.section_header.title") %>
|
||||
|
||||
<aside>
|
||||
<h2><%= t("proposals.new.recommendations_title") %></h2>
|
||||
<%= header do %>
|
||||
<%= new_window_link_to t("proposals.new.more_info"), help_path(anchor: "proposals") %>
|
||||
<% end %>
|
||||
|
||||
<ul class="recommendations">
|
||||
<li><%= t("proposals.new.recommendation_one") %></li>
|
||||
<li><%= t("proposals.new.recommendation_two") %></li>
|
||||
<li><%= t("proposals.new.recommendation_three") %></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<aside>
|
||||
<h2><%= t("proposals.new.recommendations_title") %></h2>
|
||||
|
||||
<%= render Proposals::FormComponent.new(proposal, url: proposals_path) %>
|
||||
</main>
|
||||
<ul class="recommendations">
|
||||
<li><%= t("proposals.new.recommendation_one") %></li>
|
||||
<li><%= t("proposals.new.recommendation_two") %></li>
|
||||
<li><%= t("proposals.new.recommendation_three") %></li>
|
||||
</ul>
|
||||
</aside>
|
||||
|
||||
<%= render Proposals::FormComponent.new(proposal, url: proposals_path) %>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% provide(:title) { t("sdg.goals.help.title") } %>
|
||||
<% provide :title, t("sdg.goals.help.title") %>
|
||||
|
||||
<% content_for :canonical do %>
|
||||
<%= render "shared/canonical", href: sdg_help_url %>
|
||||
|
||||
@@ -1,25 +1,24 @@
|
||||
<% provide(:title) { title } %>
|
||||
<% provide :title, title %>
|
||||
<% provide :main_class, "sdg-goals-index" %>
|
||||
|
||||
<main class="sdg-goals-index">
|
||||
<% if header.present? %>
|
||||
<%= render "shared/header", header: header %>
|
||||
<% else %>
|
||||
<header class="section-header">
|
||||
<h1><%= title %></h1>
|
||||
<% if header.present? %>
|
||||
<%= render "shared/header", header: header %>
|
||||
<% else %>
|
||||
<header class="section-header">
|
||||
<h1><%= title %></h1>
|
||||
</header>
|
||||
<% end %>
|
||||
|
||||
<%= render Shared::BannerComponent.new("sdg") %>
|
||||
|
||||
<%= link_list(*goal_links, class: "sdg-goal-list") %>
|
||||
|
||||
<% phases.each do |phase| %>
|
||||
<section class="sdg-phase" id="sdg_phase_<%= phase.kind %>">
|
||||
<header>
|
||||
<h2 class="title"><%= phase.title %></h2>
|
||||
</header>
|
||||
<% end %>
|
||||
|
||||
<%= render Shared::BannerComponent.new("sdg") %>
|
||||
|
||||
<%= link_list(*goal_links, class: "sdg-goal-list") %>
|
||||
|
||||
<% phases.each do |phase| %>
|
||||
<section class="sdg-phase" id="sdg_phase_<%= phase.kind %>">
|
||||
<header>
|
||||
<h2 class="title"><%= phase.title %></h2>
|
||||
</header>
|
||||
|
||||
<%= render "shared/cards", cards: phase.cards.sort_by_order %>
|
||||
</section>
|
||||
<% end %>
|
||||
</main>
|
||||
<%= render "shared/cards", cards: phase.cards.sort_by_order %>
|
||||
</section>
|
||||
<% end %>
|
||||
|
||||
@@ -1,39 +1,38 @@
|
||||
<% provide(:title) { goal.title } %>
|
||||
<% provide :title, goal.title %>
|
||||
<% provide :main_class, "sdg-goal-show" %>
|
||||
|
||||
<main class="sdg-goal-show">
|
||||
<%= back_link_to sdg_goals_path %>
|
||||
<%= back_link_to sdg_goals_path %>
|
||||
|
||||
<article class="sdg-goal sdg-goal-<%= code %>">
|
||||
<header>
|
||||
<h1><%= heading %></h1>
|
||||
</header>
|
||||
<div class="goal-description-content">
|
||||
<div id="description_goal_<%= goal.code %>" class="goal-description short" data-toggler="short">
|
||||
<%= long_description %>
|
||||
</div>
|
||||
<div class="read-more">
|
||||
<button type="button" id="read_more_goal_<%= goal.code %>"
|
||||
data-toggle="description_goal_<%= goal.code %> read_more_goal_<%= goal.code %> read_less_goal_<%= goal.code %>"
|
||||
data-toggler="hide">
|
||||
<%= t("sdg.goals.show.read_more", goal: goal.title) %>
|
||||
</button>
|
||||
<button type="button" id="read_less_goal_<%= goal.code %>"
|
||||
data-toggle="description_goal_<%= goal.code %> read_more_goal_<%= goal.code %> read_less_goal_<%= goal.code %>"
|
||||
data-toggler="hide"
|
||||
class="hide">
|
||||
<%= t("sdg.goals.show.read_less", goal: goal.title) %>
|
||||
</button>
|
||||
</div>
|
||||
<article class="sdg-goal sdg-goal-<%= code %>">
|
||||
<header>
|
||||
<h1><%= heading %></h1>
|
||||
</header>
|
||||
<div class="goal-description-content">
|
||||
<div id="description_goal_<%= goal.code %>" class="goal-description short" data-toggler="short">
|
||||
<%= long_description %>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<%= render ::Widget::Feeds::ParticipationComponent.new(feeds) %>
|
||||
|
||||
<% if processes_feed %>
|
||||
<div class="feeds-list">
|
||||
<%= render ::Widget::Feeds::FeedComponent.new(processes_feed) %>
|
||||
<div class="read-more">
|
||||
<button type="button" id="read_more_goal_<%= goal.code %>"
|
||||
data-toggle="description_goal_<%= goal.code %> read_more_goal_<%= goal.code %> read_less_goal_<%= goal.code %>"
|
||||
data-toggler="hide">
|
||||
<%= t("sdg.goals.show.read_more", goal: goal.title) %>
|
||||
</button>
|
||||
<button type="button" id="read_less_goal_<%= goal.code %>"
|
||||
data-toggle="description_goal_<%= goal.code %> read_more_goal_<%= goal.code %> read_less_goal_<%= goal.code %>"
|
||||
data-toggler="hide"
|
||||
class="hide">
|
||||
<%= t("sdg.goals.show.read_less", goal: goal.title) %>
|
||||
</button>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<%= render SDG::Goals::TargetsComponent.new(goal) %>
|
||||
</main>
|
||||
<%= render ::Widget::Feeds::ParticipationComponent.new(feeds) %>
|
||||
|
||||
<% if processes_feed %>
|
||||
<div class="feeds-list">
|
||||
<%= render ::Widget::Feeds::FeedComponent.new(processes_feed) %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render SDG::Goals::TargetsComponent.new(goal) %>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<main class="subscriptions-edit">
|
||||
<%= form_for user, url: subscriptions_path(token: user.subscriptions_token) do |f| %>
|
||||
<h2><%= t("account.show.notifications") %></h2>
|
||||
<% provide :main_class, "subscriptions-edit" %>
|
||||
|
||||
<div><%= f.check_box :email_on_comment %></div>
|
||||
<div><%= f.check_box :email_on_comment_reply %></div>
|
||||
<div><%= f.check_box :newsletter %></div>
|
||||
<div><%= f.check_box :email_digest %></div>
|
||||
<div><%= f.check_box :email_on_direct_message %></div>
|
||||
<%= form_for user, url: subscriptions_path(token: user.subscriptions_token) do |f| %>
|
||||
<h2><%= t("account.show.notifications") %></h2>
|
||||
|
||||
<%= f.submit t("account.show.save_changes_submit"), class: "button margin-top" %>
|
||||
<% end %>
|
||||
</main>
|
||||
<div><%= f.check_box :email_on_comment %></div>
|
||||
<div><%= f.check_box :email_on_comment_reply %></div>
|
||||
<div><%= f.check_box :newsletter %></div>
|
||||
<div><%= f.check_box :email_digest %></div>
|
||||
<div><%= f.check_box :email_on_direct_message %></div>
|
||||
|
||||
<%= f.submit t("account.show.save_changes_submit"), class: "button margin-top" %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
<% provide(:title) do %>
|
||||
<%= t("admin.audits.title") %>
|
||||
<% end %>
|
||||
<% provide :title, t("admin.audits.title") %>
|
||||
<%= back_link_to admin_polymorphic_path(@audit.associated || @audit.auditable) %>
|
||||
|
||||
<h2><%= t("admin.audits.title") %></h2>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
<main id="ballot" class="budget-ballot-show">
|
||||
<% provide :main_class, "budget-ballot-show" %>
|
||||
|
||||
<div id="ballot">
|
||||
<%= render "budgets/ballot/ballot" %>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
<main class="budget-group-show">
|
||||
<header>
|
||||
<%= back_link_to budget_path(@budget) %>
|
||||
<h1><%= t("budgets.groups.show.title") %></h1>
|
||||
</header>
|
||||
<% provide :main_class, "budget-group-show" %>
|
||||
|
||||
<div class="row margin">
|
||||
<div id="headings" class="small-12 medium-7 column select-district">
|
||||
<div class="row">
|
||||
<% @group.headings.sort_by_name.each_slice(7) do |slice| %>
|
||||
<div class="small-6 medium-4 column end">
|
||||
<% slice.each do |heading| %>
|
||||
<span id="<%= dom_id(heading) %>"
|
||||
class="<%= css_for_ballot_heading(heading) %>">
|
||||
<%= link_to heading.name, budget_investments_path(heading_id: heading.id) %>
|
||||
<br>
|
||||
</span>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<header>
|
||||
<%= back_link_to budget_path(@budget) %>
|
||||
<h1><%= t("budgets.groups.show.title") %></h1>
|
||||
</header>
|
||||
|
||||
<div class="medium-5 column show-for-medium text-center">
|
||||
<%= image_tag(image_path_for("map.jpg")) %>
|
||||
<div class="row margin">
|
||||
<div id="headings" class="small-12 medium-7 column select-district">
|
||||
<div class="row">
|
||||
<% @group.headings.sort_by_name.each_slice(7) do |slice| %>
|
||||
<div class="small-6 medium-4 column end">
|
||||
<% slice.each do |heading| %>
|
||||
<span id="<%= dom_id(heading) %>"
|
||||
class="<%= css_for_ballot_heading(heading) %>">
|
||||
<%= link_to heading.name, budget_investments_path(heading_id: heading.id) %>
|
||||
<br>
|
||||
</span>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div class="medium-5 column show-for-medium text-center">
|
||||
<%= image_tag(image_path_for("map.jpg")) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,31 +1,30 @@
|
||||
<%= render Shared::BannerComponent.new("budgets") %>
|
||||
<% provide :title, t("budgets.index.title") %>
|
||||
<% provide :main_class, "budgets-index" %>
|
||||
|
||||
<% provide :title do %><%= t("budgets.index.title") %><% end %>
|
||||
<%= render Shared::BannerComponent.new("budgets") %>
|
||||
|
||||
<% content_for :canonical do %>
|
||||
<%= render "shared/canonical", href: budgets_url %>
|
||||
<% end %>
|
||||
|
||||
<main class="budgets-index">
|
||||
<% if @budget.present? %>
|
||||
<%= render Budgets::BudgetComponent.new(@budget) %>
|
||||
<% if @budget.present? %>
|
||||
<%= render Budgets::BudgetComponent.new(@budget) %>
|
||||
|
||||
<% if @finished_budgets.present? %>
|
||||
<%= render "finished", budgets: @finished_budgets %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<header>
|
||||
<h1><%= t("budgets.index.title") %></h1>
|
||||
</header>
|
||||
<% if @finished_budgets.present? %>
|
||||
<%= render "finished", budgets: @finished_budgets %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<header>
|
||||
<h1><%= t("budgets.index.title") %></h1>
|
||||
</header>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<div class="callout primary">
|
||||
<%= t("budgets.index.empty_budgets") %>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<div class="callout primary">
|
||||
<%= t("budgets.index.empty_budgets") %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render Budgets::FooterComponent.new %>
|
||||
</main>
|
||||
<%= render Budgets::FooterComponent.new %>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% provide :title do %><%= t("budgets.investments.index.title") %><% end %>
|
||||
<% provide :title, t("budgets.investments.index.title") %>
|
||||
<% content_for :header_addon do %>
|
||||
<%= render "shared/search_form",
|
||||
search_path: budget_investments_path(budget_id: @budget.id, page: 1),
|
||||
@@ -15,76 +15,74 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<main id="budget-investments-main">
|
||||
<% if @search_terms || @advanced_search_terms %>
|
||||
<%= render Shared::SearchResultsSummaryComponent.new(
|
||||
results: @investments,
|
||||
search_terms: @search_terms,
|
||||
advanced_search_terms: @advanced_search_terms
|
||||
) %>
|
||||
<% else %>
|
||||
<%= render "/budgets/investments/header" %>
|
||||
<% end %>
|
||||
<% if @search_terms || @advanced_search_terms %>
|
||||
<%= render Shared::SearchResultsSummaryComponent.new(
|
||||
results: @investments,
|
||||
search_terms: @search_terms,
|
||||
advanced_search_terms: @advanced_search_terms
|
||||
) %>
|
||||
<% else %>
|
||||
<%= render "/budgets/investments/header" %>
|
||||
<% end %>
|
||||
|
||||
<div class="row">
|
||||
<div id="budget-investments" class="budget-investments-list small-12 medium-9 column">
|
||||
<div class="row">
|
||||
<div id="budget-investments" class="budget-investments-list small-12 medium-9 column">
|
||||
|
||||
<% if @current_filter == "unfeasible" %>
|
||||
<div class="small-12 margin-bottom">
|
||||
<h2><%= t("budgets.investments.index.unfeasible") %></h2>
|
||||
<div class="callout primary margin">
|
||||
<%= t("budgets.investments.index.unfeasible_text") %>
|
||||
</div>
|
||||
<% if @current_filter == "unfeasible" %>
|
||||
<div class="small-12 margin-bottom">
|
||||
<h2><%= t("budgets.investments.index.unfeasible") %></h2>
|
||||
<div class="callout primary margin">
|
||||
<%= t("budgets.investments.index.unfeasible_text") %>
|
||||
</div>
|
||||
<% elsif @heading.present? %>
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<%= render "view_mode" %>
|
||||
</div>
|
||||
</div>
|
||||
<% elsif @heading.present? %>
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<%= render "view_mode" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render Shared::AdvancedSearchComponent.new %>
|
||||
|
||||
<% if unfeasible_or_unselected_filter %>
|
||||
<ul class="no-bullet submenu">
|
||||
<li class="inline-block">
|
||||
<%= link_to current_path_with_query_params(order: "random", page: 1),
|
||||
class: "is-active" do %>
|
||||
<h2><%= t("budgets.investments.index.orders.random") %></h2>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
<% else %>
|
||||
<%= render("shared/order_links", i18n_namespace: "budgets.investments.index") %>
|
||||
<% end %>
|
||||
|
||||
<% if investments_default_view? %>
|
||||
|
||||
<% @investments.each do |investment| %>
|
||||
<%= render "/budgets/investments/investment",
|
||||
investment: investment,
|
||||
investment_ids: @investment_ids,
|
||||
ballot: @ballot %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
|
||||
<%= render Shared::AdvancedSearchComponent.new %>
|
||||
|
||||
<% if unfeasible_or_unselected_filter %>
|
||||
<ul class="no-bullet submenu">
|
||||
<li class="inline-block">
|
||||
<%= link_to current_path_with_query_params(order: "random", page: 1),
|
||||
class: "is-active" do %>
|
||||
<h2><%= t("budgets.investments.index.orders.random") %></h2>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
<% else %>
|
||||
<%= render("shared/order_links", i18n_namespace: "budgets.investments.index") %>
|
||||
<% @investments.each do |investment| %>
|
||||
<%= render "/budgets/investments/investment_minimal",
|
||||
investment: investment %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if investments_default_view? %>
|
||||
|
||||
<% @investments.each do |investment| %>
|
||||
<%= render "/budgets/investments/investment",
|
||||
investment: investment,
|
||||
investment_ids: @investment_ids,
|
||||
ballot: @ballot %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
|
||||
<% @investments.each do |investment| %>
|
||||
<%= render "/budgets/investments/investment_minimal",
|
||||
investment: investment %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= paginate @investments %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-3 column">
|
||||
<aside class="margin-bottom">
|
||||
<div id="sidebar" class="budget-investments-sidebar">
|
||||
<%= render "/budgets/investments/sidebar" %>
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
<%= paginate @investments %>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div class="small-12 medium-3 column">
|
||||
<aside class="margin-bottom">
|
||||
<div id="sidebar" class="budget-investments-sidebar">
|
||||
<%= render "/budgets/investments/sidebar" %>
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% provide :title do %><%= @investment.title %><% end %>
|
||||
<% provide :title, @investment.title %>
|
||||
<% content_for :canonical do %>
|
||||
<%= render "shared/canonical", href: budget_investment_url %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<% provide :title, @budget.name %>
|
||||
|
||||
<%= render Shared::BannerComponent.new("budgets") %>
|
||||
<% provide :title do %><%= @budget.name %><% end %>
|
||||
|
||||
<% content_for :canonical do %>
|
||||
<%= render "shared/canonical", href: budget_url(@budget, filter: @current_filter) %>
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
<% provide :title do %>
|
||||
<%= t("stats.budgets.page_title", budget: @budget.name) %>
|
||||
<% end %>
|
||||
<% provide :title, t("stats.budgets.page_title", budget: @budget.name) %>
|
||||
<% provide :social_media_meta_tags do %>
|
||||
<%= render "shared/social_media_meta_tags",
|
||||
social_url: budget_stats_url(@budget),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% provide :title do %><%= t("debates.index.title") %><% end %>
|
||||
<% provide :title, t("debates.index.title") %>
|
||||
<% content_for :header_addon do %>
|
||||
<%= render "shared/search_form",
|
||||
search_path: debates_path(page: 1),
|
||||
@@ -8,80 +8,77 @@
|
||||
<%= render "shared/canonical", href: debates_url %>
|
||||
<% end %>
|
||||
|
||||
<main>
|
||||
<% if @search_terms || @advanced_search_terms %>
|
||||
<%= render Shared::SearchResultsSummaryComponent.new(
|
||||
results: @debates,
|
||||
search_terms: @search_terms,
|
||||
advanced_search_terms: @advanced_search_terms
|
||||
) %>
|
||||
<% else %>
|
||||
<%= render "shared/section_header", i18n_namespace: "debates.index.section_header", image: "debates" %>
|
||||
<% end %>
|
||||
<% if @search_terms || @advanced_search_terms %>
|
||||
<%= render Shared::SearchResultsSummaryComponent.new(
|
||||
results: @debates,
|
||||
search_terms: @search_terms,
|
||||
advanced_search_terms: @advanced_search_terms
|
||||
) %>
|
||||
<% else %>
|
||||
<%= render "shared/section_header", i18n_namespace: "debates.index.section_header", image: "debates" %>
|
||||
<% end %>
|
||||
|
||||
<% if feature?("user.recommendations") && @recommended_debates.present? %>
|
||||
<%= render "shared/recommended_index", recommended: @recommended_debates,
|
||||
disable_recommendations_path: recommendations_disable_debates_path,
|
||||
namespace: "debates" %>
|
||||
<% end %>
|
||||
<% if feature?("user.recommendations") && @recommended_debates.present? %>
|
||||
<%= render "shared/recommended_index", recommended: @recommended_debates,
|
||||
disable_recommendations_path: recommendations_disable_debates_path,
|
||||
namespace: "debates" %>
|
||||
<% end %>
|
||||
|
||||
<div class="row">
|
||||
<div id="debates" class="debates-list small-12 medium-9 column">
|
||||
<div class="row">
|
||||
<div id="debates" class="debates-list small-12 medium-9 column">
|
||||
|
||||
<%= render Shared::BannerComponent.new("debates") %>
|
||||
<%= render Shared::BannerComponent.new("debates") %>
|
||||
|
||||
<% unless @search_terms || !has_featured? %>
|
||||
<%= render "featured_debates" %>
|
||||
<% end %>
|
||||
<% unless @search_terms || !has_featured? %>
|
||||
<%= render "featured_debates" %>
|
||||
<% end %>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<%= render "view_mode" %>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<%= render "view_mode" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render Shared::AdvancedSearchComponent.new %>
|
||||
<%= render Shared::AdvancedSearchComponent.new %>
|
||||
|
||||
<%= render "shared/order_links", i18n_namespace: "debates.index" %>
|
||||
<%= render "shared/order_links", i18n_namespace: "debates.index" %>
|
||||
|
||||
<div class="show-for-small-only">
|
||||
<%= link_to t("debates.index.start_debate"), new_debate_path, class: "button expanded" %>
|
||||
</div>
|
||||
<div class="show-for-small-only">
|
||||
<%= link_to t("debates.index.start_debate"), new_debate_path, class: "button expanded" %>
|
||||
</div>
|
||||
|
||||
<% if @debates.any? || current_user.blank? %>
|
||||
<% if debates_default_view? %>
|
||||
<%= render @debates %>
|
||||
<% else %>
|
||||
<% @debates.each do |debate| %>
|
||||
<%= render "debates/debate_minimal", debate: debate %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if @debates.any? || current_user.blank? %>
|
||||
<% if debates_default_view? %>
|
||||
<%= render @debates %>
|
||||
<% else %>
|
||||
<%= empty_recommended_debates_message_text(current_user) %>
|
||||
<% @debates.each do |debate| %>
|
||||
<%= render "debates/debate_minimal", debate: debate %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= paginate @debates %>
|
||||
|
||||
<% unless @search_terms || @advanced_search_terms %>
|
||||
<div id="section_help" class="margin" data-magellan-target="section_help">
|
||||
<p class="lead">
|
||||
<strong><%= t("debates.index.section_footer.title") %></strong>
|
||||
</p>
|
||||
<p><%= t("debates.index.section_footer.description") %></p>
|
||||
<p><%= t("debates.index.section_footer.help_text_1") %></p>
|
||||
<p><%= sanitize(t("debates.index.section_footer.help_text_2",
|
||||
org: link_to(setting["org_name"], new_user_registration_path))) %></p>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-3 column">
|
||||
|
||||
<aside class="margin-bottom">
|
||||
<%= link_to t("debates.index.start_debate"), new_debate_path, class: "button expanded" %>
|
||||
<%= render "shared/tag_cloud", taggable: "Debate" %>
|
||||
</aside>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= empty_recommended_debates_message_text(current_user) %>
|
||||
<% end %>
|
||||
<%= paginate @debates %>
|
||||
|
||||
<% unless @search_terms || @advanced_search_terms %>
|
||||
<div id="section_help" class="margin" data-magellan-target="section_help">
|
||||
<p class="lead">
|
||||
<strong><%= t("debates.index.section_footer.title") %></strong>
|
||||
</p>
|
||||
<p><%= t("debates.index.section_footer.description") %></p>
|
||||
<p><%= t("debates.index.section_footer.help_text_1") %></p>
|
||||
<p><%= sanitize(t("debates.index.section_footer.help_text_2",
|
||||
org: link_to(setting["org_name"], new_user_registration_path))) %></p>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div class="small-12 medium-3 column">
|
||||
|
||||
<aside class="margin-bottom">
|
||||
<%= link_to t("debates.index.start_debate"), new_debate_path, class: "button expanded" %>
|
||||
<%= render "shared/tag_cloud", taggable: "Debate" %>
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% provide :title do %><%= @debate.title %><% end %>
|
||||
<% provide :title, @debate.title %>
|
||||
<% content_for :canonical do %>
|
||||
<%= render "shared/canonical", href: debate_url(@debate) %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% provide :title do %><%= t("devise_views.confirmations.new.title") %><% end %>
|
||||
<% provide :title, t("devise_views.confirmations.new.title") %>
|
||||
<h2><%= t("devise_views.confirmations.new.title") %></h2>
|
||||
|
||||
<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% provide :title do %><%= t("devise_views.confirmations.show.title") %><% end %>
|
||||
<% provide :title, t("devise_views.confirmations.show.title") %>
|
||||
<h1 class="text-center"><%= t("devise_views.confirmations.show.title") %></h1>
|
||||
|
||||
<p><%= sanitize(t("devise_views.confirmations.show.instructions", email: resource.email)) %></p>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% provide :title do %><%= t("devise_views.passwords.new.title") %><% end %>
|
||||
<% provide :title, t("devise_views.passwords.new.title") %>
|
||||
<h2><%= t("devise_views.passwords.new.title") %></h2>
|
||||
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
|
||||
<%= render "shared/errors", resource: resource %>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% provide :title do %><%= t("devise_views.sessions.new.title") %><% end %>
|
||||
<% provide :title, t("devise_views.sessions.new.title") %>
|
||||
<h2><%= t("devise_views.sessions.new.title") %></h2>
|
||||
|
||||
<%= render "devise/omniauth_form", action: "sign_in" %>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
</head>
|
||||
|
||||
<body class="admin">
|
||||
<%= render Layout::SkipToMainContentComponent.new %>
|
||||
<%= render Layout::AdminHeaderComponent.new(current_user) %>
|
||||
|
||||
<div class="menu-and-content">
|
||||
@@ -22,7 +23,7 @@
|
||||
<% end %>
|
||||
</nav>
|
||||
|
||||
<div class="admin-content <%= yield(:main_class) %>">
|
||||
<main id="main" class="admin-content <%= yield(:main_class) %>">
|
||||
<%= label_tag :show_menu, t("admin.menu.admin"),
|
||||
"aria-hidden": true, class: "button hollow expanded" %>
|
||||
|
||||
|
||||
@@ -13,13 +13,16 @@
|
||||
<%= raw setting["html.per_page_code_head"] %>
|
||||
</head>
|
||||
<body class="<%= yield(:body_class) %> public">
|
||||
<%= render Layout::SkipToMainContentComponent.new %>
|
||||
<%= raw setting["html.per_page_code_body"] %>
|
||||
|
||||
<div class="wrapper <%= yield(:wrapper_class) %>">
|
||||
<%= render "layouts/header", with_subnavigation: true %>
|
||||
<%= render "layouts/flash" %>
|
||||
|
||||
<%= yield %>
|
||||
<main id="main" class="public-content <%= yield(:main_class) %>">
|
||||
<%= render "layouts/flash" %>
|
||||
<%= yield %>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<%= raw setting["per_page_code_head"] %>
|
||||
</head>
|
||||
<body class="proposal-dashboard">
|
||||
<%= render Layout::SkipToMainContentComponent.new %>
|
||||
<%= raw setting["per_page_code_body"] %>
|
||||
|
||||
<h1 class="show-for-sr"><%= setting["org_name"] %></h1>
|
||||
@@ -26,7 +27,7 @@
|
||||
<%= render "dashboard/menu" %>
|
||||
</nav>
|
||||
|
||||
<div class="admin-content">
|
||||
<main id="main" class="admin-content <%= yield(:main_class) %>">
|
||||
<%= label_tag :show_menu, t("admin.menu.admin"),
|
||||
"aria-hidden": true, class: "button hollow expanded" %>
|
||||
|
||||
@@ -34,7 +35,7 @@
|
||||
<%= render "layouts/dashboard/proposal_totals" %>
|
||||
<%= render "layouts/dashboard/proposal_header" %>
|
||||
<%= yield %>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
</head>
|
||||
|
||||
<body class="auth-page">
|
||||
<%= render Layout::SkipToMainContentComponent.new %>
|
||||
<%= raw setting["html.per_page_code_body"] %>
|
||||
<div class="wrapper">
|
||||
<div class="auth-image small-12 medium-3 column"
|
||||
@@ -21,11 +22,11 @@
|
||||
<div class="small-12 medium-9 column">
|
||||
<div class="row">
|
||||
<div class="small-12 medium-9 large-7 small-centered column">
|
||||
<div class="auth-form margin">
|
||||
<main id="main" class="auth-form margin <%= yield(:main_class) %>">
|
||||
<%= render "layouts/flash" %>
|
||||
|
||||
<%= yield %>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
</head>
|
||||
|
||||
<body class="admin">
|
||||
<%= render Layout::SkipToMainContentComponent.new %>
|
||||
<%= render Layout::AdminHeaderComponent.new(manager_logged_in) %>
|
||||
|
||||
<div class="menu-and-content">
|
||||
@@ -16,7 +17,7 @@
|
||||
<%= render "/management/menu" %>
|
||||
</nav>
|
||||
|
||||
<main class="admin-content">
|
||||
<main id="main" class="admin-content <%= yield(:main_class) %>">
|
||||
<%= label_tag :show_menu, t("admin.menu.admin"),
|
||||
"aria-hidden": true, class: "button hollow expanded" %>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% provide :title do %><%= "#{@draft_version.title} - #{@process.title}" %><% end %>
|
||||
<% provide :title, "#{@draft_version.title} - #{@process.title}" %>
|
||||
|
||||
<%= render "legislation/processes/header", process: @process, header: :small %>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% provide :title do %><%= @process.title %><% end %>
|
||||
<% provide :title, @process.title %>
|
||||
|
||||
<%= render "legislation/processes/header", process: @process, header: :full %>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% provide(:title) { @process.title } %>
|
||||
<% provide :title, @process.title %>
|
||||
|
||||
<%= render "legislation/processes/header", process: @process, header: :full %>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% provide :title do %><%= @process.title %><% end %>
|
||||
<% provide :title, @process.title %>
|
||||
|
||||
<%= render "legislation/processes/header", process: @process, header: :full %>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% provide :title do %><%= @process.title %><% end %>
|
||||
<% provide :title, @process.title %>
|
||||
|
||||
<%= render "legislation/processes/header", process: @process, header: :full %>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% provide :title do %><%= @process.title %><% end %>
|
||||
<% provide :title, @process.title %>
|
||||
|
||||
<%= render "legislation/processes/header", process: @process, header: :full %>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% provide :title do %><%= @process.title %><% end %>
|
||||
<% provide :title, @process.title %>
|
||||
|
||||
<%= render "legislation/processes/header", process: @process, header: :full %>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% provide(:title) { @process.title } %>
|
||||
<% provide :title, @process.title %>
|
||||
|
||||
<%= render "legislation/processes/header", process: @process, header: :full %>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% provide :title do %><%= @proposal.title %><% end %>
|
||||
<% provide :title, @proposal.title %>
|
||||
<% content_for :meta_description do %><%= @proposal.summary %><% end %>
|
||||
<% provide :social_media_meta_tags do %>
|
||||
<%= render "shared/social_media_meta_tags",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% provide :title do %><%= @question.title %><% end %>
|
||||
<% provide :title, @question.title %>
|
||||
|
||||
<section class="debate-questions">
|
||||
<div class="quiz-header row small-collapse">
|
||||
|
||||
@@ -1,30 +1,28 @@
|
||||
<main>
|
||||
<span class="not-print">
|
||||
<%= render "admin/shared/budget_investment_search", url: management_budget_investments_path(@budget) %>
|
||||
</span>
|
||||
<span class="not-print">
|
||||
<%= render "admin/shared/budget_investment_search", url: management_budget_investments_path(@budget) %>
|
||||
</span>
|
||||
|
||||
<div class="wrap row">
|
||||
<div id="budget-investments" class="budget-investments-list small-12 column">
|
||||
<div class="wrap row">
|
||||
<div id="budget-investments" class="budget-investments-list small-12 column">
|
||||
|
||||
<div class="small-12 search-results">
|
||||
<%= tag.h2 t("management.budget_investments.filters.unfeasible") if params[:unfeasible].present? %>
|
||||
<%= tag.h2 t("management.budget_investments.filters.heading", heading: @heading.name) if @heading.present? %>
|
||||
<% if params[:search].present? %>
|
||||
<h2>
|
||||
<%= page_entries_info @investments %>
|
||||
<%= t("management.budget_investments.search_results", count: @investments.size, search_term: params[:search]) %>
|
||||
</h2>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% @investments.each do |investment| %>
|
||||
<%= render "/budgets/investments/investment",
|
||||
investment: investment,
|
||||
investment_ids: @investment_ids,
|
||||
ballot: @ballot %>
|
||||
<div class="small-12 search-results">
|
||||
<%= tag.h2 t("management.budget_investments.filters.unfeasible") if params[:unfeasible].present? %>
|
||||
<%= tag.h2 t("management.budget_investments.filters.heading", heading: @heading.name) if @heading.present? %>
|
||||
<% if params[:search].present? %>
|
||||
<h2>
|
||||
<%= page_entries_info @investments %>
|
||||
<%= t("management.budget_investments.search_results", count: @investments.size, search_term: params[:search]) %>
|
||||
</h2>
|
||||
<% end %>
|
||||
|
||||
<%= paginate @investments %>
|
||||
</div>
|
||||
|
||||
<% @investments.each do |investment| %>
|
||||
<%= render "/budgets/investments/investment",
|
||||
investment: investment,
|
||||
investment_ids: @investment_ids,
|
||||
ballot: @ballot %>
|
||||
<% end %>
|
||||
|
||||
<%= paginate @investments %>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
@@ -1,37 +1,35 @@
|
||||
<main>
|
||||
<span class="not-print">
|
||||
<%= render "admin/shared/budget_investment_search", url: print_management_budget_investments_path(@budget) %>
|
||||
</span>
|
||||
<span class="not-print">
|
||||
<%= render "admin/shared/budget_investment_search", url: print_management_budget_investments_path(@budget) %>
|
||||
</span>
|
||||
|
||||
<div class="wrap row">
|
||||
<div id="budget-investments" class="budget-investments-list small-12 column">
|
||||
<div class="wrap row">
|
||||
<div id="budget-investments" class="budget-investments-list small-12 column">
|
||||
|
||||
<div class="not-print">
|
||||
<a id="print_link" href="javascript:window.print();" class="button warning float-right">
|
||||
<%= t("management.budget_investments.print.print_button") %>
|
||||
</a>
|
||||
</div>
|
||||
<div class="not-print">
|
||||
<a id="print_link" href="javascript:window.print();" class="button warning float-right">
|
||||
<%= t("management.budget_investments.print.print_button") %>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="small-12 search-results">
|
||||
<% if params[:unfeasible].present? %>
|
||||
<h2 class="inline-block"><%= t("management.budget_investments.filters.unfeasible") %></h2>
|
||||
<% end %>
|
||||
<% if @heading.present? %>
|
||||
<h2 class="inline-block"><%= t("management.budget_investments.filters.heading", heading_name: @heading.name) %></h2>
|
||||
<% end %>
|
||||
<h2 class="inline-block"><%= t("management.budget_investments.search_results", count: @investments.count, search_term: params[:search]) %></h2>
|
||||
</div>
|
||||
|
||||
<% @investments.each do |investment| %>
|
||||
<%= render "/budgets/investments/investment",
|
||||
investment: investment,
|
||||
investment_ids: @investment_ids,
|
||||
ballot: @ballot %>
|
||||
<div class="small-12 search-results">
|
||||
<% if params[:unfeasible].present? %>
|
||||
<h2 class="inline-block"><%= t("management.budget_investments.filters.unfeasible") %></h2>
|
||||
<% end %>
|
||||
<% if @heading.present? %>
|
||||
<h2 class="inline-block"><%= t("management.budget_investments.filters.heading", heading_name: @heading.name) %></h2>
|
||||
<% end %>
|
||||
<h2 class="inline-block"><%= t("management.budget_investments.search_results", count: @investments.count, search_term: params[:search]) %></h2>
|
||||
</div>
|
||||
|
||||
<div class="for-print-only">
|
||||
<p><strong><%= t("management.print.budget_investments_info") %></strong></p>
|
||||
</div>
|
||||
<% @investments.each do |investment| %>
|
||||
<%= render "/budgets/investments/investment",
|
||||
investment: investment,
|
||||
investment_ids: @investment_ids,
|
||||
ballot: @ballot %>
|
||||
<% end %>
|
||||
|
||||
<div class="for-print-only">
|
||||
<p><strong><%= t("management.print.budget_investments_info") %></strong></p>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% provide :title do %><%= @investment.title %><% end %>
|
||||
<% provide :title, @investment.title %>
|
||||
|
||||
<%= render "/shared/print" %>
|
||||
|
||||
|
||||
@@ -1,24 +1,22 @@
|
||||
<main>
|
||||
<h2><%= t("management.proposals.index.title") %></h2>
|
||||
<h2><%= t("management.proposals.index.title") %></h2>
|
||||
|
||||
<%= render Admin::SearchComponent.new(label: t("admin.shared.search.label.proposals")) %>
|
||||
<%= render Admin::SearchComponent.new(label: t("admin.shared.search.label.proposals")) %>
|
||||
|
||||
<div class="management-list">
|
||||
<div class="proposals-list">
|
||||
<div class="management-list">
|
||||
<div class="proposals-list">
|
||||
|
||||
<div class="filters">
|
||||
<% if @search_terms %>
|
||||
<h3>
|
||||
<%= page_entries_info @proposals %>
|
||||
<%= sanitize(t("proposals.index.search_results",
|
||||
count: @proposals.size,
|
||||
search_term: strip_tags(@search_terms))) %>
|
||||
</h3>
|
||||
<% end %>
|
||||
<div class="filters">
|
||||
<% if @search_terms %>
|
||||
<h3>
|
||||
<%= page_entries_info @proposals %>
|
||||
<%= sanitize(t("proposals.index.search_results",
|
||||
count: @proposals.size,
|
||||
search_term: strip_tags(@search_terms))) %>
|
||||
</h3>
|
||||
<% end %>
|
||||
|
||||
<%= render @proposals %>
|
||||
<%= paginate @proposals %>
|
||||
</div>
|
||||
<%= render @proposals %>
|
||||
<%= paginate @proposals %>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
@@ -1,29 +1,27 @@
|
||||
<main>
|
||||
<div class="row">
|
||||
<div class="proposals-list">
|
||||
<a id="print_link" href="javascript:window.print();" class="button warning float-right">
|
||||
<%= t("management.proposals.print.print_button") %>
|
||||
</a>
|
||||
<div class="row">
|
||||
<div class="proposals-list">
|
||||
<a id="print_link" href="javascript:window.print();" class="button warning float-right">
|
||||
<%= t("management.proposals.print.print_button") %>
|
||||
</a>
|
||||
|
||||
<%= image_tag "header_print_proposals.jpg", class: "for-print-only" %>
|
||||
<%= image_tag "header_print_proposals.jpg", class: "for-print-only" %>
|
||||
|
||||
<div class="filters">
|
||||
<span class="for-print-only date-for-print"><%= l Date.current, format: :long %></span>
|
||||
<div class="filters">
|
||||
<span class="for-print-only date-for-print"><%= l Date.current, format: :long %></span>
|
||||
|
||||
<h2 class="inline-block">
|
||||
<span class="not-print"><%= t("proposals.index.select_order_long") %></span>
|
||||
<span class="for-print-only"><%= t("management.print.proposals_title") %></span>
|
||||
</h2>
|
||||
<div class="not-print">
|
||||
<%= render "shared/order_links", i18n_namespace: "proposals.index" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render @proposals %>
|
||||
|
||||
<div class="for-print-only">
|
||||
<p><strong><%= t("management.print.proposals_info") %></strong></p>
|
||||
<h2 class="inline-block">
|
||||
<span class="not-print"><%= t("proposals.index.select_order_long") %></span>
|
||||
<span class="for-print-only"><%= t("management.print.proposals_title") %></span>
|
||||
</h2>
|
||||
<div class="not-print">
|
||||
<%= render "shared/order_links", i18n_namespace: "proposals.index" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render @proposals %>
|
||||
|
||||
<div class="for-print-only">
|
||||
<p><strong><%= t("management.print.proposals_info") %></strong></p>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% provide :title do %><%= t("devise_views.organizations.registrations.new.title") %><% end %>
|
||||
<% provide :title, t("devise_views.organizations.registrations.new.title") %>
|
||||
<h2><%= t("devise_views.organizations.registrations.new.title") %></h2>
|
||||
|
||||
<%= form_for(resource, as: :user, url: organization_registration_path) do |f| %>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<% provide :title, @custom_page.title %>
|
||||
<%= content_for :body_class, "custom-page" %>
|
||||
<% provide :title do %><%= @custom_page.title %><% end %>
|
||||
|
||||
<div class="row margin-top">
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% provide :title do %><%= t("pages.titles.help", org: setting["org_name"]) %><% end %>
|
||||
<% provide :title, t("pages.titles.help", org: setting["org_name"]) %>
|
||||
<% content_for :canonical do %>
|
||||
<%= render "shared/canonical", href: help_url %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% provide :title do %><%= t("polls.index.title") %><% end %>
|
||||
<% provide :title, t("polls.index.title") %>
|
||||
|
||||
<%= render_custom_partial "meta_description" %>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% provide :title do %><%= @poll.name %><% end %>
|
||||
<% provide :title, @poll.name %>
|
||||
|
||||
<div class="polls-results-stats">
|
||||
<%= render "poll_header" %>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% provide :title do %><%= @poll.name %><% end %>
|
||||
<% provide :title, @poll.name %>
|
||||
|
||||
<div class="participation-stats polls-results-stats">
|
||||
<%= render "poll_header" %>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% provide :title do %><%= t("proposals.index.title") %><% end %>
|
||||
<% provide :title, t("proposals.index.title") %>
|
||||
<% content_for :header_addon do %>
|
||||
<%= render "shared/search_form",
|
||||
search_path: proposals_path(page: 1),
|
||||
@@ -8,123 +8,120 @@
|
||||
<%= render "shared/canonical", href: proposals_url %>
|
||||
<% end %>
|
||||
|
||||
<main>
|
||||
<% if [
|
||||
@search_terms,
|
||||
@advanced_search_terms,
|
||||
params[:retired].present?,
|
||||
params[:selected].present?
|
||||
].any? %>
|
||||
<%= render Shared::SearchResultsSummaryComponent.new(
|
||||
results: @proposals,
|
||||
search_terms: @search_terms,
|
||||
advanced_search_terms: @advanced_search_terms
|
||||
) do %>
|
||||
<% if params[:retired].present? %>
|
||||
<h2><%= t("proposals.index.retired_proposals") %></h2>
|
||||
<% elsif params[:selected].present? %>
|
||||
<h2><%= t("proposals.index.selected_proposals") %></h2>
|
||||
<% end %>
|
||||
<% if [
|
||||
@search_terms,
|
||||
@advanced_search_terms,
|
||||
params[:retired].present?,
|
||||
params[:selected].present?
|
||||
].any? %>
|
||||
<%= render Shared::SearchResultsSummaryComponent.new(
|
||||
results: @proposals,
|
||||
search_terms: @search_terms,
|
||||
advanced_search_terms: @advanced_search_terms
|
||||
) do %>
|
||||
<% if params[:retired].present? %>
|
||||
<h2><%= t("proposals.index.retired_proposals") %></h2>
|
||||
<% elsif params[:selected].present? %>
|
||||
<h2><%= t("proposals.index.selected_proposals") %></h2>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= render "shared/section_header", i18n_namespace: "proposals.index.section_header", image: "proposals" %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= render "shared/section_header", i18n_namespace: "proposals.index.section_header", image: "proposals" %>
|
||||
<% end %>
|
||||
|
||||
<% if show_recommended_proposals? %>
|
||||
<%= render "shared/recommended_index", recommended: @recommended_proposals,
|
||||
disable_recommendations_path: recommendations_disable_proposals_path,
|
||||
namespace: "proposals" %>
|
||||
<% end %>
|
||||
<% if show_recommended_proposals? %>
|
||||
<%= render "shared/recommended_index", recommended: @recommended_proposals,
|
||||
disable_recommendations_path: recommendations_disable_proposals_path,
|
||||
namespace: "proposals" %>
|
||||
<% end %>
|
||||
|
||||
<div class="row">
|
||||
<div id="proposals" class="proposals-list small-12 medium-9 column">
|
||||
<div class="row">
|
||||
<div id="proposals" class="proposals-list small-12 medium-9 column">
|
||||
|
||||
<%= render Shared::BannerComponent.new("proposals") %>
|
||||
<%= render Shared::BannerComponent.new("proposals") %>
|
||||
|
||||
<% if show_featured_proposals? %>
|
||||
<div id="featured-proposals" class="row featured-proposals">
|
||||
<div class="small-12 column">
|
||||
<h2>
|
||||
<%= t("proposals.index.featured_proposals") %>
|
||||
</h2>
|
||||
</div>
|
||||
<% @featured_proposals.each do |featured_proposal| %>
|
||||
<%= render "featured_proposal", proposal: featured_proposal %>
|
||||
<% end %>
|
||||
<% if show_featured_proposals? %>
|
||||
<div id="featured-proposals" class="row featured-proposals">
|
||||
<div class="small-12 column">
|
||||
<h2>
|
||||
<%= t("proposals.index.featured_proposals") %>
|
||||
</h2>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% unless params[:selected].present? %>
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<%= render "view_mode" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% unless params[:retired].present? || params[:selected].present? %>
|
||||
<%= render Shared::AdvancedSearchComponent.new %>
|
||||
<% end %>
|
||||
|
||||
<% unless params[:selected].present? %>
|
||||
<%= render "shared/order_links", i18n_namespace: "proposals.index" %>
|
||||
<% end %>
|
||||
|
||||
<% if @proposals.any? %>
|
||||
<div class="show-for-small-only">
|
||||
<%= link_to t("proposals.index.start_proposal"),
|
||||
new_proposal_path,
|
||||
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 %>
|
||||
<% else %>
|
||||
<% @proposals.each do |proposal| %>
|
||||
<%= render "/proposals/proposal_minimal", proposal: proposal %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= empty_recommended_proposals_message_text(current_user) %>
|
||||
<% end %>
|
||||
<%= paginate @proposals %>
|
||||
|
||||
<% unless @search_terms || @advanced_search_terms %>
|
||||
<div id="section_help" class="margin" data-magellan-target="section_help">
|
||||
<p class="lead">
|
||||
<strong><%= t("proposals.index.section_footer.title") %></strong>
|
||||
</p>
|
||||
<p><%= t("proposals.index.section_footer.description") %></p>
|
||||
</div>
|
||||
<% @featured_proposals.each do |featured_proposal| %>
|
||||
<%= render "featured_proposal", proposal: featured_proposal %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="small-12 medium-3 column">
|
||||
<aside class="margin-bottom">
|
||||
<% unless params[:selected].present? %>
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<%= render "view_mode" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% unless params[:retired].present? || params[:selected].present? %>
|
||||
<%= render Shared::AdvancedSearchComponent.new %>
|
||||
<% end %>
|
||||
|
||||
<% unless params[:selected].present? %>
|
||||
<%= render "shared/order_links", i18n_namespace: "proposals.index" %>
|
||||
<% end %>
|
||||
|
||||
<% if @proposals.any? %>
|
||||
<div class="show-for-small-only">
|
||||
<%= link_to t("proposals.index.start_proposal"),
|
||||
new_proposal_path,
|
||||
class: "button expanded" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="sidebar-divider"></div>
|
||||
<h2 class="sidebar-title"><%= t("proposals.index.selected_proposals") %></h2>
|
||||
<br>
|
||||
<p class="small">
|
||||
<%= link_to t("proposals.index.selected_proposals_link"), proposals_path(selected: "all") %>
|
||||
</p>
|
||||
|
||||
<% if params[:retired].blank? %>
|
||||
<%= render "categories" %>
|
||||
<%= render "shared/tag_cloud", taggable: "Proposal" %>
|
||||
<%= render Proposals::GeozonesComponent.new %>
|
||||
<div id="proposals-list">
|
||||
<% if @proposals.any? || current_user.blank? %>
|
||||
<% if proposals_default_view? %>
|
||||
<%= render partial: "proposals/proposal", collection: @proposals %>
|
||||
<% else %>
|
||||
<% @proposals.each do |proposal| %>
|
||||
<%= render "/proposals/proposal_minimal", proposal: proposal %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= render "retired" %>
|
||||
<%= render "proposals_lists" %>
|
||||
</aside>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= empty_recommended_proposals_message_text(current_user) %>
|
||||
<% end %>
|
||||
<%= paginate @proposals %>
|
||||
|
||||
<% unless @search_terms || @advanced_search_terms %>
|
||||
<div id="section_help" class="margin" data-magellan-target="section_help">
|
||||
<p class="lead">
|
||||
<strong><%= t("proposals.index.section_footer.title") %></strong>
|
||||
</p>
|
||||
<p><%= t("proposals.index.section_footer.description") %></p>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div class="small-12 medium-3 column">
|
||||
<aside class="margin-bottom">
|
||||
<%= link_to t("proposals.index.start_proposal"),
|
||||
new_proposal_path,
|
||||
class: "button expanded" %>
|
||||
|
||||
<div class="sidebar-divider"></div>
|
||||
<h2 class="sidebar-title"><%= t("proposals.index.selected_proposals") %></h2>
|
||||
<br>
|
||||
<p class="small">
|
||||
<%= link_to t("proposals.index.selected_proposals_link"), proposals_path(selected: "all") %>
|
||||
</p>
|
||||
|
||||
<% if params[:retired].blank? %>
|
||||
<%= render "categories" %>
|
||||
<%= render "shared/tag_cloud", taggable: "Proposal" %>
|
||||
<%= render Proposals::GeozonesComponent.new %>
|
||||
<% end %>
|
||||
<%= render "retired" %>
|
||||
<%= render "proposals_lists" %>
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% provide :title do %><%= @proposal.title %><% end %>
|
||||
<% provide :title, @proposal.title %>
|
||||
<% provide :social_media_meta_tags do %>
|
||||
<%= render "shared/social_media_meta_tags",
|
||||
social_url: proposal_url(@proposal),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<% provide :title, @proposal.title %>
|
||||
<% preview = false unless local_assigns.has_key? :preview %>
|
||||
<% provide :title do %><%= @proposal.title %><% end %>
|
||||
<% content_for :meta_description do %><%= @proposal.summary %><% end %>
|
||||
<% provide :social_media_meta_tags do %>
|
||||
<%= render "shared/social_media_meta_tags",
|
||||
|
||||
@@ -1,53 +1,51 @@
|
||||
<main>
|
||||
<div class="row proposals-summary">
|
||||
<div id="proposals" class="proposals-list small-12 medium-9 column">
|
||||
<%= back_link_to %>
|
||||
<div class="row proposals-summary">
|
||||
<div id="proposals" class="proposals-list small-12 medium-9 column">
|
||||
<%= back_link_to %>
|
||||
|
||||
<% @proposals.each do |group_name, proposals| %>
|
||||
<div id="<%= group_name.parameterize %>">
|
||||
<h2 class="margin-top"><%= group_name %></h2>
|
||||
<% @proposals.each do |group_name, proposals| %>
|
||||
<div id="<%= group_name.parameterize %>">
|
||||
<h2 class="margin-top"><%= group_name %></h2>
|
||||
|
||||
<% proposals[0..2].each do |proposal| %>
|
||||
<div class="proposal clear">
|
||||
<div class="panel">
|
||||
<div class="row">
|
||||
<div class="small-12 medium-9 column">
|
||||
<div class="proposal-contenta">
|
||||
<h3><%= link_to proposal.title, namespaced_proposal_path(proposal) %></h3>
|
||||
<% proposals[0..2].each do |proposal| %>
|
||||
<div class="proposal clear">
|
||||
<div class="panel">
|
||||
<div class="row">
|
||||
<div class="small-12 medium-9 column">
|
||||
<div class="proposal-contenta">
|
||||
<h3><%= link_to proposal.title, namespaced_proposal_path(proposal) %></h3>
|
||||
|
||||
<p class="proposal-info">
|
||||
<% if proposal.author.hidden? || proposal.author.erased? %>
|
||||
<span class="author"><%= t("proposals.show.author_deleted") %></span>
|
||||
<% else %>
|
||||
<span class="author"><%= proposal.author.name %></span>
|
||||
<% if proposal.author.display_official_position_badge? %>
|
||||
<span class="label round level-<%= proposal.author.official_level %>">
|
||||
<%= proposal.author.official_position %>
|
||||
</span>
|
||||
<% end %>
|
||||
<p class="proposal-info">
|
||||
<% if proposal.author.hidden? || proposal.author.erased? %>
|
||||
<span class="author"><%= t("proposals.show.author_deleted") %></span>
|
||||
<% else %>
|
||||
<span class="author"><%= proposal.author.name %></span>
|
||||
<% if proposal.author.display_official_position_badge? %>
|
||||
<span class="label round level-<%= proposal.author.official_level %>">
|
||||
<%= proposal.author.official_position %>
|
||||
</span>
|
||||
<% end %>
|
||||
</p>
|
||||
<% end %>
|
||||
</p>
|
||||
|
||||
<div class="proposal-description">
|
||||
<p><%= proposal.summary %></p>
|
||||
</div>
|
||||
<div class="proposal-description">
|
||||
<p><%= proposal.summary %></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<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 Proposals::GeozonesComponent.new %>
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<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 Proposals::GeozonesComponent.new %>
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<main class="topic-edit">
|
||||
<%= back_link_to community_path(@community) %>
|
||||
<% provide :main_class, "topic-edit" %>
|
||||
|
||||
<h1><%= t("community.topic.edit") %></h1>
|
||||
<%= back_link_to community_path(@community) %>
|
||||
|
||||
<%= render "form" %>
|
||||
</main>
|
||||
<h1><%= t("community.topic.edit") %></h1>
|
||||
|
||||
<%= render "form" %>
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<main class="topic-new">
|
||||
<%= back_link_to community_path(@community) %>
|
||||
<% provide :main_class, "topic-new" %>
|
||||
|
||||
<h1><%= t("community.topic.create") %></h1>
|
||||
<%= back_link_to community_path(@community) %>
|
||||
|
||||
<aside>
|
||||
<h2><%= t("community.topic.sidebar.recommendations_title") %></h2>
|
||||
<h1><%= t("community.topic.create") %></h1>
|
||||
|
||||
<ul class="recommendations">
|
||||
<li><%= t("community.topic.sidebar.recommendation_one") %></li>
|
||||
<li><%= t("community.topic.sidebar.recommendation_two") %></li>
|
||||
<li><%= t("community.topic.sidebar.recommendation_three") %></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<aside>
|
||||
<h2><%= t("community.topic.sidebar.recommendations_title") %></h2>
|
||||
|
||||
<%= render "form" %>
|
||||
</main>
|
||||
<ul class="recommendations">
|
||||
<li><%= t("community.topic.sidebar.recommendation_one") %></li>
|
||||
<li><%= t("community.topic.sidebar.recommendation_two") %></li>
|
||||
<li><%= t("community.topic.sidebar.recommendation_three") %></li>
|
||||
</ul>
|
||||
</aside>
|
||||
|
||||
<%= render "form" %>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% provide :title do %><%= t("devise_views.users.registrations.new.title") %><% end %>
|
||||
<% provide :title, t("devise_views.users.registrations.new.title") %>
|
||||
<h2><%= t("devise_views.users.registrations.new.title") %></h2>
|
||||
|
||||
<%= render "devise/omniauth_form", action: "sign_up" %>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% provide(:title) { t("devise_views.users.registrations.success.title") } %>
|
||||
<% provide :title, t("devise_views.users.registrations.success.title") %>
|
||||
<h2><%= t("devise_views.users.registrations.success.title") %></h2>
|
||||
<p><%= sanitize(t("devise_views.users.registrations.success.thank_you")) %></p>
|
||||
<p><%= sanitize(t("devise_views.users.registrations.success.instructions_1")) %></p>
|
||||
|
||||
@@ -1,28 +1,26 @@
|
||||
<main>
|
||||
<div class="activity row margin-top">
|
||||
<div class="small-12 column">
|
||||
<div class="activity row margin-top">
|
||||
<div class="small-12 column">
|
||||
|
||||
<% if @user != current_user %>
|
||||
<% if @user.email_on_direct_message? %>
|
||||
<%= link_to t("users.show.send_private_message"),
|
||||
new_user_direct_message_path(@user),
|
||||
class: "button hollow float-right" %>
|
||||
<% else %>
|
||||
<div class="callout primary float-right">
|
||||
<%= t("users.show.no_private_messages") %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @user != current_user %>
|
||||
<% if @user.email_on_direct_message? %>
|
||||
<%= link_to t("users.show.send_private_message"),
|
||||
new_user_direct_message_path(@user),
|
||||
class: "button hollow float-right" %>
|
||||
<% else %>
|
||||
<div class="callout primary float-right">
|
||||
<%= t("users.show.no_private_messages") %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<h2 class="inline-block">
|
||||
<%= render Shared::AvatarComponent.new(@user, size: 60) %>
|
||||
<%= @user.name %>
|
||||
<% if current_user&.administrator? %>
|
||||
<small><%= @user.email %></small>
|
||||
<% end %>
|
||||
</h2>
|
||||
<h2 class="inline-block">
|
||||
<%= render Shared::AvatarComponent.new(@user, size: 60) %>
|
||||
<%= @user.name %>
|
||||
<% if current_user&.administrator? %>
|
||||
<small><%= @user.email %></small>
|
||||
<% end %>
|
||||
</h2>
|
||||
|
||||
<%= render Users::PublicActivityComponent.new(@user) %>
|
||||
</div>
|
||||
<%= render Users::PublicActivityComponent.new(@user) %>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
@@ -13,28 +13,26 @@
|
||||
|
||||
<%= render "shared/header", header: @header %>
|
||||
|
||||
<main>
|
||||
<%= render "feeds" %>
|
||||
<%= render "feeds" %>
|
||||
|
||||
<div class="row">
|
||||
<% if @cards.any? %>
|
||||
<div class="small-12 column <%= "large-8" if feed_processes_enabled? %>">
|
||||
<h2 class="title"><%= t("welcome.cards.title") %></h2>
|
||||
<div class="row">
|
||||
<% if @cards.any? %>
|
||||
<div class="small-12 column <%= "large-8" if feed_processes_enabled? %>">
|
||||
<h2 class="title"><%= t("welcome.cards.title") %></h2>
|
||||
|
||||
<%= render "shared/cards", cards: @cards %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if feed_processes_enabled? %>
|
||||
<div class="small-12 large-4 column">
|
||||
<%= render "processes" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% if feature?("user.recommendations") && (@recommended_debates.present? || @recommended_proposals.present?) %>
|
||||
<%= render "recommended",
|
||||
recommended_debates: @recommended_debates,
|
||||
recommended_proposals: @recommended_proposals %>
|
||||
<%= render "shared/cards", cards: @cards %>
|
||||
</div>
|
||||
<% end %>
|
||||
</main>
|
||||
|
||||
<% if feed_processes_enabled? %>
|
||||
<div class="small-12 large-4 column">
|
||||
<%= render "processes" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% if feature?("user.recommendations") && (@recommended_debates.present? || @recommended_proposals.present?) %>
|
||||
<%= render "recommended",
|
||||
recommended_debates: @recommended_debates,
|
||||
recommended_proposals: @recommended_proposals %>
|
||||
<% end %>
|
||||
|
||||
@@ -228,6 +228,7 @@ en:
|
||||
zero: "You don't have new notifications"
|
||||
notifications: Notifications
|
||||
sdg: "SDG"
|
||||
skip_to_main_content: "Skip to main content"
|
||||
notifications:
|
||||
index:
|
||||
empty_notifications: You don't have new notifications.
|
||||
|
||||
@@ -228,6 +228,7 @@ es:
|
||||
zero: "No tienes notificaciones nuevas"
|
||||
notifications: Notificaciones
|
||||
sdg: "ODS"
|
||||
skip_to_main_content: "Saltar al contenido principal"
|
||||
notifications:
|
||||
index:
|
||||
empty_notifications: No tienes notificaciones nuevas.
|
||||
|
||||
@@ -33,9 +33,9 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="error">
|
||||
<main id="main" class="error">
|
||||
<h1>403</h1>
|
||||
<h2>Access to this page has been disabled by the administrators.</h2>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -33,9 +33,9 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="error">
|
||||
<main id="main" class="error">
|
||||
<h1>404</h1>
|
||||
<h2>Not found.</h2>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -33,9 +33,9 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="error">
|
||||
<main id="main" class="error">
|
||||
<h1>422</h1>
|
||||
<h2>The change you wanted was rejected.</h2>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -33,9 +33,9 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="error">
|
||||
<main id="main" class="error">
|
||||
<h1>500</h1>
|
||||
<h2>Internal server error.</h2>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -15,7 +15,7 @@ FactoryBot.define do
|
||||
end
|
||||
|
||||
trait :with_html_coordinates do
|
||||
html_map_coordinates { "30,139,45,153,77,148,107,165" }
|
||||
html_map_coordinates { "30,139,45,153,77,148,107,125" }
|
||||
end
|
||||
|
||||
trait :with_geojson do
|
||||
|
||||
@@ -53,6 +53,22 @@ end
|
||||
|
||||
FactoryBot.use_parent_strategy = false
|
||||
|
||||
module Capybara
|
||||
module DSL
|
||||
alias_method :original_visit, :visit
|
||||
|
||||
def visit(url, ...)
|
||||
original_visit(url, ...)
|
||||
|
||||
unless url.match?("robots.txt") || url.match?("active_storage/representations")
|
||||
expect(page).to have_css "main", count: 1
|
||||
expect(page).to have_css "#main", count: 1
|
||||
expect(page).to have_css "main#main"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Capybara.register_driver :headless_chrome do |app|
|
||||
options = Selenium::WebDriver::Chrome::Options.new.tap do |opts|
|
||||
opts.add_argument "--headless"
|
||||
|
||||
@@ -183,4 +183,20 @@ describe "Home" do
|
||||
within(".header-card") { expect(page).not_to have_link }
|
||||
end
|
||||
end
|
||||
|
||||
describe "Link to skip to main content" do
|
||||
it "is visible on focus" do
|
||||
visit root_path
|
||||
|
||||
expect(page).to have_link "Skip to main content", visible: :hidden
|
||||
expect(page).to have_css "main"
|
||||
expect(page).not_to have_css "main:target"
|
||||
|
||||
page.execute_script("$('.skip-to-main-content a').focus()")
|
||||
sleep 0.01 until page.has_link?("Skip to main content", visible: :visible)
|
||||
click_link "Skip to main content"
|
||||
|
||||
expect(page).to have_css "main:target"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1353,8 +1353,8 @@ describe "Proposals" do
|
||||
|
||||
context "Filter" do
|
||||
context "By geozone" do
|
||||
let(:california) { Geozone.create(name: "California") }
|
||||
let(:new_york) { Geozone.create(name: "New York") }
|
||||
let(:california) { create(:geozone, :with_html_coordinates, name: "California") }
|
||||
let(:new_york) { create(:geozone, name: "New York") }
|
||||
|
||||
before do
|
||||
create(:proposal, geozone: california, title: "Bigger sequoias")
|
||||
@@ -1362,14 +1362,11 @@ describe "Proposals" do
|
||||
create(:proposal, geozone: new_york, title: "Sully monument")
|
||||
end
|
||||
|
||||
scenario "From map", :no_js do
|
||||
scenario "From map" do
|
||||
visit proposals_path
|
||||
|
||||
click_link "map"
|
||||
within("#html_map") do
|
||||
url = find("area[title='California']")[:href]
|
||||
visit url
|
||||
end
|
||||
within("#html_map") { find("area[title='California']").click }
|
||||
|
||||
within("#proposals") do
|
||||
expect(page).to have_css(".proposal", count: 2)
|
||||
|
||||
Reference in New Issue
Block a user