Skip to content

Commit

Permalink
Merge pull request #1723 from AyuntamientoMadrid/pages-texts
Browse files Browse the repository at this point in the history
[Upstream] Pages texts
  • Loading branch information
decabeza committed Nov 26, 2018
2 parents 30173b5 + f368246 commit 0881c32
Show file tree
Hide file tree
Showing 10 changed files with 100 additions and 113 deletions.
File renamed without changes.
161 changes: 88 additions & 73 deletions app/views/pages/accessibility.html.erb
Original file line number Diff line number Diff line change
@@ -1,99 +1,114 @@
<% provide :title do %><%= t('pages.titles.accessibility') %><% end %>
<% provide :title do %><%= t("pages.titles.accessibility") %><% end %>
<% content_for :canonical do %>
<%= render "shared/canonical", href: page_url("accessibility") %>
<% end %>

<div class="row">
<div class="small-12 column">
<div class="small-12 column">

<h1><%= t('.title') %></h1>
<%= simple_format(t('.description')) %>
<h1><%= t("pages.accessibility.title") %></h1>
<%= simple_format(t("pages.accessibility.description")) %>

<ul>
<% t('.examples').each do |example| %>
<li><%= example %></li>
<% end %>
</ul>
<ul>
<% t("pages.accessibility.examples").each do |example| %>
<li><%= example %></li>
<% end %>
</ul>

<h2><%= t('.keyboard_shortcuts.title') %></h2>
<h2><%= t("pages.accessibility.keyboard_shortcuts.title") %></h2>

<p><%= t('.keyboard_shortcuts.navigation_table.description') %></p>
<p><%= t("pages.accessibility.keyboard_shortcuts.navigation_table.description") %></p>

<div class="small-12 medium-6">
<table>
<caption class="show-for-sr"><%= t('.keyboard_shortcuts.navigation_table.caption') %></caption>
<thead>
<tr>
<th scope="col" class="text-center"><%= t('.keyboard_shortcuts.navigation_table.key_header') %></th>
<th scope="col"><%= t('.keyboard_shortcuts.navigation_table.page_header') %></th>
</tr>
</thead>
<tbody>
<% t('.keyboard_shortcuts.navigation_table.rows').each do |row| %>
<div class="small-12 medium-6">
<table>
<caption class="show-for-sr">
<%= t("pages.accessibility.keyboard_shortcuts.navigation_table.caption") %>
</caption>
<thead>
<tr>
<td class="text-center"><%= row[:key_column] %></td>
<td><%= row[:page_column] %></td>
<th scope="col" class="text-center">
<%= t("pages.accessibility.keyboard_shortcuts.navigation_table.key_header") %>
</th>
<th scope="col">
<%= t("pages.accessibility.keyboard_shortcuts.navigation_table.page_header") %>
</th>
</tr>
<% end %>
</tbody>
</table>
</div>
</thead>
<tbody>
<% t("pages.accessibility.keyboard_shortcuts.navigation_table.rows").each do |row| %>
<tr>
<td class="text-center"><%= row[:key_column] %></td>
<td><%= row[:page_column] %></td>
</tr>
<% end %>
</tbody>
</table>
</div>

<p><%= t('.keyboard_shortcuts.browser_table.description') %></p>
<p><%= t("pages.accessibility.keyboard_shortcuts.browser_table.description") %></p>

<div class="small-12 medium-6">
<table>
<caption class="show-for-sr"><%= t('.keyboard_shortcuts.browser_table.caption') %></caption>
<thead>
<tr>
<th scope="col"><%= t('.keyboard_shortcuts.browser_table.browser_header') %></th>
<th scope="col"><%= t('.keyboard_shortcuts.browser_table.key_header') %></th>
</tr>
</thead>
<tbody>
<% t('.keyboard_shortcuts.browser_table.rows').each do |row| %>
<div class="small-12 medium-6">
<table>
<caption class="show-for-sr">
<%= t("pages.accessibility.keyboard_shortcuts.browser_table.caption") %>
</caption>
<thead>
<tr>
<td><%= row[:browser_column] %></td>
<td><%= row[:key_column] %></td>
<th scope="col">
<%= t("pages.accessibility.keyboard_shortcuts.browser_table.browser_header") %>
</th>
<th scope="col">
<%= t("pages.accessibility.keyboard_shortcuts.browser_table.key_header") %>
</th>
</tr>
<% end %>
</tbody>
</table>
</div>
</thead>
<tbody>
<% t("pages.accessibility.keyboard_shortcuts.browser_table.rows").each do |row| %>
<tr>
<td><%= row[:browser_column] %></td>
<td><%= row[:key_column] %></td>
</tr>
<% end %>
</tbody>
</table>
</div>

<h2><%= t('.textsize.title') %></h2>
<p><%= t('.textsize.browser_settings_table.description') %></p>
<h2><%= t("pages.accessibility.textsize.title") %></h2>
<p><%= t("pages.accessibility.textsize.browser_settings_table.description") %></p>

<div class="small-12 medium-6">
<table>
<thead>
<tr>
<th scope="col"><%= t('.textsize.browser_settings_table.browser_header') %></th>
<th scope="col"><%= t('.textsize.browser_settings_table.action_header') %></th>
</tr>
</thead>
<tbody>
<% t('.textsize.browser_settings_table.rows').each do |row| %>
<div class="small-12 medium-6">
<table>
<thead>
<tr>
<td><%= row[:browser_column] %></td>
<td><%= row[:action_column] %></td>
<th scope="col">
<%= t("pages.accessibility.textsize.browser_settings_table.browser_header") %>
</th>
<th scope="col">
<%= t("pages.accessibility.textsize.browser_settings_table.action_header") %>
</th>
</tr>
<% end %>
</tbody>
</table>
</div>

<p><%= t('.textsize.browser_shortcuts_table.description') %></p>
</thead>
<tbody>
<% t("pages.accessibility.textsize.browser_settings_table.rows").each do |row| %>
<tr>
<td><%= row[:browser_column] %></td>
<td><%= row[:action_column] %></td>
</tr>
<% end %>
</tbody>
</table>
</div>

<ul>
<% t('.textsize.browser_shortcuts_table.rows').each do |row| %>
<li><code><%= row[:shortcut_column] %></code> <%= row[:description_column] %></li>
<% end %>
</ul>
<p><%= t("pages.accessibility.textsize.browser_shortcuts_table.description") %></p>

<h2><%= t('.compatibility.title') %></h2>
<ul>
<% t("pages.accessibility.textsize.browser_shortcuts_table.rows").each do |row| %>
<li><code><%= row[:shortcut_column] %></code> <%= row[:description_column] %></li>
<% end %>
</ul>

<p><%= t('.compatibility.description_html') %></p>
<h2><%= t("pages.accessibility.compatibility.title") %></h2>

<p><%= t("pages.accessibility.compatibility.description_html") %></p>
</div>
</div>
8 changes: 4 additions & 4 deletions app/views/pages/conditions.html.erb
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<% provide :title do %><%= t('pages.titles.conditions') %><% end %>
<% provide :title do %><%= t("pages.titles.conditions") %><% end %>
<% content_for :canonical do %>
<%= render "shared/canonical", href: page_url("conditions") %>
<% end %>

<div class="row margin-top">

<div class="small-12 medium-9 column">
<h1><%= t('.title') %></h1>
<h2><%= t('.subtitle') %></h2>
<p><%= t('.description') %></p>
<h1><%= t("pages.conditions.title") %></h1>
<h2><%= t("pages.conditions.subtitle") %></h2>
<p><%= t("pages.conditions.description") %></p>
</div>

<div class="small-12 medium-3 column">
Expand Down
9 changes: 0 additions & 9 deletions app/views/pages/general_terms.html.erb

This file was deleted.

11 changes: 4 additions & 7 deletions app/views/pages/privacy.html.erb
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
<% provide :title do %><%= t('pages.titles.privacy') %><% end %>
<% provide :title do %><%= t("pages.titles.privacy") %><% end %>
<% content_for :canonical do %>
<%= render "shared/canonical", href: page_url("privacy") %>
<% end %>

<div class="row margin-top">

<div class="small-12 medium-9 column">

<h1><%= t(".title") %></h1>
<h2><%= t('.subtitle') %></h2>
<h1><%= t("pages.privacy.title") %></h1>
<h2><%= t("pages.privacy.subtitle") %></h2>

<ol>
<% t('.info_items').each do |item| %>
<% t("pages.privacy.info_items").each do |item| %>
<% if item.key? :text %>
<li><%= item[:text] %></li>
<% else %>
Expand All @@ -26,11 +25,9 @@
<% end %>
<% end %>
</ol>

</div>

<div class="small-12 medium-3 column">
<%= render '/shared/print' %>
</div>

</div>
6 changes: 1 addition & 5 deletions config/locales/en/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ en:
title: Terms and conditions of use
subtitle: LEGAL NOTICE ON THE CONDITIONS OF USE, PRIVACY AND PROTECTION OF PERSONAL DATA OF THE OPEN GOVERNMENT PORTAL
description: Information page on the conditions of use, privacy and protection of personal data.
general_terms: Terms and Conditions
help:
title: "%{org} is a platform for citizen participation"
guide: "This guide explains what each of the %{org} sections are for and how they work."
Expand Down Expand Up @@ -80,8 +79,6 @@ en:
description: Managing participatory processes to control the qualification of the people participating in them and merely numerical and statistical recount of the results derived from citizen participation processes.
- field: 'Institution in charge of the file:'
description: INSTITUTION IN CHARGE OF THE FILE
- text: The interested party may exercise the rights of access, rectification, cancellation and opposition, before the responsible body indicated, all of which is reported in compliance with article 5 of the Organic Law 15/1999, of December 13, on the Protection of Data of Character Personal.
- text: As a general principle, this website does not share or disclose information obtained, except when it has been authorized by the user, or the information is required by the judicial authority, prosecutor's office or the judicial police, or any of the cases regulated in the Article 11 of the Organic Law 15/1999, of December 13, on the Protection of Personal Data.
accessibility:
title: Accessibility
description: |-
Expand Down Expand Up @@ -155,8 +152,7 @@ en:
description_column: Decreases text size
compatibility:
title: Compatibility with standards and visual design
description_html: 'All pages of this website comply with the <strong> Accessibility Guidelines </strong> or General Principles of Accessible Design established by the Working Group <abbr title = "Web Accessibility Initiative" lang = "en"> WAI </ abbr> belonging to W3C.'

description_html: 'All pages of this website comply with the <strong>Accessibility Guidelines</strong> or General Principles of Accessible Design established by the Working Group <abbr title="Web Accessibility Initiative" lang="en">WAI</abbr> belonging to W3C.'
titles:
accessibility: Accessibility
conditions: Terms of use
Expand Down
1 change: 0 additions & 1 deletion config/locales/es/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ es:
title: Condiciones de uso
subtitle: AVISO LEGAL SOBRE LAS CONDICIONES DE USO, PRIVACIDAD Y PROTECCIÓN DE DATOS PERSONALES DEL PORTAL DE GOBIERNO ABIERTO
description: Página de información sobre las condiciones de uso, privacidad y protección de datos personales.
general_terms: Términos y Condiciones
help:
title: "%{org} es una plataforma de participación ciudadana"
guide: "Esta guía explica para qué sirven y cómo funcionan cada una de las secciones de %{org}."
Expand Down
5 changes: 0 additions & 5 deletions config/sitemap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ def gzip(stream, data); stream.write(data); stream.close end

# sitemap generator
SitemapGenerator::Sitemap.create do
pages = ["general_terms"]
pages.each do |page|
add page_path(id: page)
end

add debates_path, priority: 0.7, changefreq: "daily"
Debate.find_each do |debate|
add debate_path(debate), lastmod: debate.updated_at
Expand Down
11 changes: 3 additions & 8 deletions spec/controllers/pages_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,15 @@
expect(response).to be_ok
end

it 'includes a general terms page' do
get :show, id: :general_terms
it 'includes a accessibility page' do
get :show, id: :accessibility
expect(response).to be_ok
end

it 'includes a terms page' do
it 'includes a custom census terms page' do
get :show, id: :census_terms
expect(response).to be_ok
end

it 'includes a accessibility page' do
get :show, id: :accessibility
expect(response).to be_ok
end
end

describe 'More info pages' do
Expand Down
1 change: 0 additions & 1 deletion spec/lib/tasks/sitemap_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
expect(sitemap).to include(faq_path)
expect(sitemap).to include(help_path)
expect(sitemap).to include(how_to_use_path)
expect(sitemap).to include(page_path(id: 'general_terms'))

# Dynamic URLs
expect(sitemap).to include(polls_path)
Expand Down

0 comments on commit 0881c32

Please sign in to comment.