Merge pull request #1807 from consul/help-headers

Help headers and footers
This commit is contained in:
BertoCQ
2017-09-01 14:53:25 +02:00
committed by GitHub
21 changed files with 211 additions and 38 deletions

View File

@@ -1,14 +1,9 @@
<% provide :title do %><%= t('budgets.index.title') %><% end %>
<% content_for :canonical do %>
<%= render "shared/canonical", href: budgets_url %>
<% end %>
<div class="expanded budget no-margin-top padding">
<div class="row">
<div class="small-12 column">
<h1><%= t('budgets.index.title') %></h1>
</div>
</div>
</div>
<%= render "shared/section_header", i18n_namespace: "budgets.index.section_header", image: "budgets" %>
<div class="row margin-top">
<div class="small-12 medium-9 column">
@@ -32,5 +27,16 @@
<% end %>
</tbody>
</table>
<div id="section_help" class="margin" data-magellan-target="section_help">
<p class="lead">
<strong><%= t("budgets.index.section_footer.title") %></strong>
</p>
<p><%= t("budgets.index.section_footer.help_text_1") %></p>
<p><%= t("budgets.index.section_footer.help_text_2") %></p>
<p><%= t("budgets.index.section_footer.help_text_3",
org: link_to(setting['org_name'], new_user_registration_path)).html_safe %></p>
<p><%= t("budgets.index.section_footer.help_text_4") %></p>
</div>
</div>
</div>

View File

@@ -9,8 +9,6 @@
<% end %>
<main>
<h1 class="show-for-sr"><%= t("shared.outline.debates") %></h1>
<% if @search_terms || @advanced_search_terms || @tag_filter %>
<div class="highlight no-margin-top padding margin-bottom">
<div class="row">
@@ -33,6 +31,8 @@
</div>
</div>
</div>
<% else %>
<%= render "shared/section_header", i18n_namespace: "debates.index.section_header", image: "debates" %>
<% end %>
<div class="row">
@@ -56,6 +56,21 @@
<%= render @debates %>
<%= paginate @debates %>
<% unless @search_terms || @advanced_search_terms || @tag_filter %>
<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.help_text_1") %></p>
<p><%= t("debates.index.section_footer.help_text_2",
org: link_to(setting['org_name'], new_user_registration_path)).html_safe %></p>
<p><%= t("debates.index.section_footer.help_text_3",
proposal: link_to(t("debates.index.section_footer.proposals_link"), proposals_path),
budget: link_to(t("debates.index.section_footer.budget_link"), budgets_path)).html_safe %>
</p>
</div>
<% end %>
</div>
<div class="small-12 medium-3 column">

View File

@@ -2,12 +2,13 @@
<%= t("layouts.header.collaborative_legislation") %> - <%= t("legislation.processes.index.filters.#{@current_filter}") %>
<% end %>
<div class="row">
<div class="legislation-categories small-12 medium-3 column">
<%= render 'shared/filter_subnav', i18n_namespace: "legislation.processes.index" %>
</div>
<%= render "shared/section_header", i18n_namespace: "legislation.processes.index.section_header", image: "legislation_processes" %>
<div class="row">
<div id="legislation" class="legislation-list small-12 medium-9 column">
<%= render 'shared/filter_subnav', i18n_namespace: "legislation.processes.index" %>
<div id="legislation-list">
<% if @processes.any? %>
<%= render @processes %>
@@ -17,6 +18,16 @@
<%= t(".no_#{@current_filter}_processes") %>
</div>
<% end %>
<div id="section_help" class="margin" data-magellan-target="section_help">
<p class="lead">
<strong><%= t("legislation.processes.index.section_footer.title") %></strong>
</p>
<p><%= t("legislation.processes.index.section_footer.help_text_1") %></p>
<p><%= t("legislation.processes.index.section_footer.help_text_2",
org: setting['org_name']) %></p>
<p><%= t("legislation.processes.index.section_footer.help_text_3") %></p>
</div>
</div>
</div>
</div>

View File

@@ -1,23 +1,14 @@
<% provide :title do %><%= t("polls.index.title") %><% end %>
<% content_for :wrapper_class, "light" %>
<% content_for :canonical do %>
<%= render "shared/canonical", href: polls_url %>
<% end %>
<div class="expanded no-margin-top dark-heading">
<div class="row">
<div class="small-12 medium-6 column padding">
<h1><%= t("polls.index.title") %></h1>
</div>
</div>
</div>
<%= render "shared/section_header", i18n_namespace: "polls.index.section_header", image: "polls" %>
<div class="row">
<div class="small-12 medium-3 column">
<%= render 'shared/filter_subnav_vertical', i18n_namespace: "polls.index" %>
</div>
<div class="small-12 medium-9 column">
<%= render 'shared/filter_subnav', i18n_namespace: "polls.index" %>
<div class="small-12 medium-9 column margin-top">
<% polls_by_geozone_restriction = @polls.group_by(&:geozone_restricted) %>
<% if polls_by_geozone_restriction[false].present? %>
@@ -31,5 +22,15 @@
<% end %>
<%= paginate @polls %>
<div id="section_help" class="margin" data-magellan-target="section_help">
<p class="lead">
<strong><%= t("polls.index.section_footer.title") %></strong>
</p>
<p><%= t("polls.index.section_footer.help_text_1") %></p>
<p><%= t("polls.index.section_footer.help_text_2",
org: link_to(setting['org_name'], new_user_registration_path)).html_safe %></p>
</p>
</div>
</div>
</div>

View File

@@ -1,5 +1,4 @@
<% provide :title do %><%= @poll.name %><% end %>
<% content_for :wrapper_class, "light" %>
<div class="polls-show">
<div class="expanded no-margin-top dark-heading polls-show-header">

View File

@@ -9,8 +9,6 @@
<% end %>
<main>
<h1 class="show-for-sr"><%= t("shared.outline.proposals") %></h1>
<% if @search_terms || @advanced_search_terms || @tag_filter || params[:retired].present? %>
<div class="highlight no-margin-top padding margin-bottom">
<div class="row">
@@ -35,6 +33,8 @@
</div>
</div>
</div>
<% else %>
<%= render "shared/section_header", i18n_namespace: "proposals.index.section_header", image: "proposals" %>
<% end %>
<div class="row">
@@ -70,6 +70,18 @@
<div id="proposals-list">
<%= render partial: 'proposals/proposal', collection: @proposals %>
<%= paginate @proposals %>
<% unless @search_terms || @advanced_search_terms || @tag_filter %>
<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.help_text_1") %></p>
<p><%= t("proposals.index.section_footer.help_text_2",
org: link_to(setting['org_name'], new_user_registration_path)).html_safe %></p>
<p><%= t("proposals.index.section_footer.help_text_3") %></p>
</div>
<% end %>
</div>
</div>

View File

@@ -0,0 +1,10 @@
<div class="highlight jumbo">
<div class="row">
<div class="small-12 medium-9 column" data-magellan>
<%= image_tag "help/help_icon_#{image}.png", alt: t("#{i18n_namespace}.icon_alt"), class: "align-top" %>
<h1 class="inline-block"><%= t("#{i18n_namespace}.title") %></h1>
<p class="lead"><%= t("#{i18n_namespace}.description") %></p>
<%= link_to t("#{i18n_namespace}.help"), "#section_help", class: "help-link" %>
</div>
</div>
</div>