From b364e0ec38996ecc418a05528594ea3fd3bd614e Mon Sep 17 00:00:00 2001 From: decabeza Date: Thu, 15 Nov 2018 11:05:50 +0100 Subject: [PATCH 1/3] Improves pages markup --- app/views/pages/accessibility.html.erb | 161 ++++++++++++++----------- app/views/pages/conditions.html.erb | 8 +- app/views/pages/privacy.html.erb | 12 +- config/locales/en/pages.yml | 3 +- 4 files changed, 97 insertions(+), 87 deletions(-) diff --git a/app/views/pages/accessibility.html.erb b/app/views/pages/accessibility.html.erb index cf956e3e8..fe28dbc74 100644 --- a/app/views/pages/accessibility.html.erb +++ b/app/views/pages/accessibility.html.erb @@ -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 %>
-
+
-

<%= t('.title') %>

- <%= simple_format(t('.description')) %> +

<%= t("pages.accessibility.title") %>

+ <%= simple_format(t("pages.accessibility.description")) %> -
    - <% t('.examples').each do |example| %> -
  • <%= example %>
  • - <% end %> -
+
    + <% t("pages.accessibility.examples").each do |example| %> +
  • <%= example %>
  • + <% end %> +
-

<%= t('.keyboard_shortcuts.title') %>

+

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

-

<%= t('.keyboard_shortcuts.navigation_table.description') %>

+

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

-
- - - - - - - - - - <% t('.keyboard_shortcuts.navigation_table.rows').each do |row| %> +
+
<%= t('.keyboard_shortcuts.navigation_table.caption') %>
<%= t('.keyboard_shortcuts.navigation_table.key_header') %><%= t('.keyboard_shortcuts.navigation_table.page_header') %>
+ + - - + + - <% end %> - -
+ <%= t("pages.accessibility.keyboard_shortcuts.navigation_table.caption") %> +
<%= row[:key_column] %><%= row[:page_column] %> + <%= t("pages.accessibility.keyboard_shortcuts.navigation_table.key_header") %> + + <%= t("pages.accessibility.keyboard_shortcuts.navigation_table.page_header") %> +
-
+ + + <% t("pages.accessibility.keyboard_shortcuts.navigation_table.rows").each do |row| %> + + <%= row[:key_column] %> + <%= row[:page_column] %> + + <% end %> + + +
-

<%= t('.keyboard_shortcuts.browser_table.description') %>

+

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

-
- - - - - - - - - - <% t('.keyboard_shortcuts.browser_table.rows').each do |row| %> +
+
<%= t('.keyboard_shortcuts.browser_table.caption') %>
<%= t('.keyboard_shortcuts.browser_table.browser_header') %><%= t('.keyboard_shortcuts.browser_table.key_header') %>
+ + - - + + - <% end %> - -
+ <%= t("pages.accessibility.keyboard_shortcuts.browser_table.caption") %> +
<%= row[:browser_column] %><%= row[:key_column] %> + <%= t("pages.accessibility.keyboard_shortcuts.browser_table.browser_header") %> + + <%= t("pages.accessibility.keyboard_shortcuts.browser_table.key_header") %> +
-
+ + + <% t("pages.accessibility.keyboard_shortcuts.browser_table.rows").each do |row| %> + + <%= row[:browser_column] %> + <%= row[:key_column] %> + + <% end %> + + +
-

<%= t('.textsize.title') %>

-

<%= t('.textsize.browser_settings_table.description') %>

+

<%= t("pages.accessibility.textsize.title") %>

+

<%= t("pages.accessibility.textsize.browser_settings_table.description") %>

-
- - - - - - - - - <% t('.textsize.browser_settings_table.rows').each do |row| %> +
+
<%= t('.textsize.browser_settings_table.browser_header') %><%= t('.textsize.browser_settings_table.action_header') %>
+ - - + + - <% end %> - -
<%= row[:browser_column] %><%= row[:action_column] %> + <%= t("pages.accessibility.textsize.browser_settings_table.browser_header") %> + + <%= t("pages.accessibility.textsize.browser_settings_table.action_header") %> +
-
+ + + <% t("pages.accessibility.textsize.browser_settings_table.rows").each do |row| %> + + <%= row[:browser_column] %> + <%= row[:action_column] %> + + <% end %> + + +
-

<%= t('.textsize.browser_shortcuts_table.description') %>

+

<%= t("pages.accessibility.textsize.browser_shortcuts_table.description") %>

- + -

<%= t('.compatibility.title') %>

- -

<%= t('.compatibility.description_html') %>

+

<%= t("pages.accessibility.compatibility.title") %>

+

<%= t("pages.accessibility.compatibility.description_html") %>

diff --git a/app/views/pages/conditions.html.erb b/app/views/pages/conditions.html.erb index f85c61542..340513d1e 100644 --- a/app/views/pages/conditions.html.erb +++ b/app/views/pages/conditions.html.erb @@ -1,4 +1,4 @@ -<% 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 %> @@ -6,9 +6,9 @@
-

<%= t('.title') %>

-

<%= t('.subtitle') %>

-

<%= t('.description') %>

+

<%= t("pages.conditions.title") %>

+

<%= t("pages.conditions.subtitle") %>

+

<%= t("pages.conditions.description") %>

diff --git a/app/views/pages/privacy.html.erb b/app/views/pages/privacy.html.erb index f18e32bbc..3c76d3c18 100644 --- a/app/views/pages/privacy.html.erb +++ b/app/views/pages/privacy.html.erb @@ -1,4 +1,4 @@ -<% 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 %> @@ -6,12 +6,11 @@
- -

<%= t(".title") %>

-

<%= t('.subtitle') %>

+

<%= t("pages.privacy.title") %>

+

<%= t("pages.privacy.subtitle") %>

    - <% t('.info_items').each do |item| %> + <% t("pages.privacy.info_items").each do |item| %> <% if item.key? :text %>
  1. <%= item[:text] %>
  2. <% else %> @@ -26,12 +25,9 @@ <% end %> <% end %>
-
<%= render '/shared/print' %>
-
- diff --git a/config/locales/en/pages.yml b/config/locales/en/pages.yml index be7cad3ef..07de222f8 100644 --- a/config/locales/en/pages.yml +++ b/config/locales/en/pages.yml @@ -155,8 +155,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 Accessibility Guidelines or General Principles of Accessible Design established by the Working Group WAI belonging to W3C.' - + description_html: 'All pages of this website comply with the Accessibility Guidelines or General Principles of Accessible Design established by the Working Group WAI belonging to W3C.' titles: accessibility: Accessibility conditions: Terms of use From 46671fe447229c4871c2784efb977db8104f2d44 Mon Sep 17 00:00:00 2001 From: decabeza Date: Thu, 15 Nov 2018 11:52:57 +0100 Subject: [PATCH 2/3] Removes unnecessary pages --- app/views/pages/census_terms.html.erb | 11 ----------- app/views/pages/general_terms.html.erb | 11 ----------- config/locales/en/pages.yml | 1 - spec/controllers/pages_controller_spec.rb | 10 ---------- 4 files changed, 33 deletions(-) delete mode 100644 app/views/pages/census_terms.html.erb delete mode 100644 app/views/pages/general_terms.html.erb diff --git a/app/views/pages/census_terms.html.erb b/app/views/pages/census_terms.html.erb deleted file mode 100644 index df5797450..000000000 --- a/app/views/pages/census_terms.html.erb +++ /dev/null @@ -1,11 +0,0 @@ -<% content_for :canonical do %> - <%= render "shared/canonical", href: page_url("census_terms") %> -<% end %> - -
-
-
-

Terminos de acceso al PadrĂ³n

-
-
-
diff --git a/app/views/pages/general_terms.html.erb b/app/views/pages/general_terms.html.erb deleted file mode 100644 index 9404e6718..000000000 --- a/app/views/pages/general_terms.html.erb +++ /dev/null @@ -1,11 +0,0 @@ -<% content_for :canonical do %> - <%= render "shared/canonical", href: page_url("general_terms") %> -<% end %> - -
-
-
-

<%= t('pages.general_terms') %>

-
-
-
diff --git a/config/locales/en/pages.yml b/config/locales/en/pages.yml index 07de222f8..22312cd16 100644 --- a/config/locales/en/pages.yml +++ b/config/locales/en/pages.yml @@ -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." diff --git a/spec/controllers/pages_controller_spec.rb b/spec/controllers/pages_controller_spec.rb index e5c3cfd0a..239afb468 100644 --- a/spec/controllers/pages_controller_spec.rb +++ b/spec/controllers/pages_controller_spec.rb @@ -13,16 +13,6 @@ describe PagesController do expect(response).to be_ok end - it 'includes a general terms page' do - get :show, id: :general_terms - expect(response).to be_ok - end - - it 'includes a 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 From 952586d5ec2f9dcde02cf92713ec697a3a250702 Mon Sep 17 00:00:00 2001 From: decabeza Date: Thu, 15 Nov 2018 11:53:05 +0100 Subject: [PATCH 3/3] Removes custom texts --- config/locales/en/pages.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/config/locales/en/pages.yml b/config/locales/en/pages.yml index 22312cd16..b45f531bc 100644 --- a/config/locales/en/pages.yml +++ b/config/locales/en/pages.yml @@ -79,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: |-