Add census terms page by default
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
en:
|
||||
pages:
|
||||
census_terms:
|
||||
title: "Terms and conditions of access of the Census"
|
||||
description: "Information page on the terms and conditions of access of the Census."
|
||||
conditions:
|
||||
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
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
es:
|
||||
pages:
|
||||
census_terms:
|
||||
title: "Términos y condiciones de acceso al Padrón"
|
||||
description: "Página de información sobre los términos y condiciones de acceso al Padrón."
|
||||
conditions:
|
||||
title: Condiciones de uso
|
||||
subtitle: AVISO LEGAL SOBRE LAS CONDICIONES DE USO, PRIVACIDAD Y PROTECCIÓN DE DATOS PERSONALES DEL PORTAL DE GOBIERNO ABIERTO
|
||||
@@ -88,22 +91,22 @@ es:
|
||||
key_header: Tecla
|
||||
page_header: Página
|
||||
rows:
|
||||
-
|
||||
-
|
||||
key_column: 0
|
||||
page_column: Inicio
|
||||
-
|
||||
-
|
||||
key_column: 1
|
||||
page_column: Debates
|
||||
-
|
||||
-
|
||||
key_column: 2
|
||||
page_column: Propuestas
|
||||
-
|
||||
-
|
||||
key_column: 3
|
||||
page_column: Votaciones
|
||||
-
|
||||
-
|
||||
key_column: 4
|
||||
page_column: Presupuestos participativos
|
||||
-
|
||||
-
|
||||
key_column: 5
|
||||
page_column: Legislación colaborativa
|
||||
browser_table:
|
||||
@@ -112,19 +115,19 @@ es:
|
||||
browser_header: Navegador
|
||||
key_header: Combinación de teclas
|
||||
rows:
|
||||
-
|
||||
-
|
||||
browser_column: Explorer
|
||||
key_column: ALT + atajo y luego ENTER
|
||||
-
|
||||
-
|
||||
browser_column: Firefox
|
||||
key_column: ALT + MAYÚSCULAS + atajo
|
||||
-
|
||||
-
|
||||
browser_column: Chrome
|
||||
key_column: ALT + atajo (si es un MAC, CTRL + ALT + atajo)
|
||||
-
|
||||
-
|
||||
browser_column: Safari
|
||||
key_column: ALT + atajo (si es un MAC, CMD + atajo)
|
||||
-
|
||||
-
|
||||
browser_column: Opera
|
||||
key_column: MAYÚSCULAS + ESC + atajo
|
||||
textsize:
|
||||
@@ -134,28 +137,28 @@ es:
|
||||
browser_header: Navegador
|
||||
action_header: Acción a realizar
|
||||
rows:
|
||||
-
|
||||
-
|
||||
browser_column: Explorer
|
||||
action_column: Ver > Tamaño del texto
|
||||
-
|
||||
-
|
||||
browser_column: Firefox
|
||||
action_column: Ver > Tamaño
|
||||
-
|
||||
-
|
||||
browser_column: Chrome
|
||||
action_column: Ajustes (icono) > Opciones > Avanzada > Contenido web > Tamaño fuente
|
||||
-
|
||||
-
|
||||
browser_column: Safari
|
||||
action_column: Visualización > ampliar/reducir
|
||||
-
|
||||
-
|
||||
browser_column: Opera
|
||||
action_column: Ver > escala
|
||||
browser_shortcuts_table:
|
||||
description: "Otra forma de modificar el tamaño de texto es utilizar los atajos de teclado definidos en los navegadores, en particular la combinación de teclas:"
|
||||
rows:
|
||||
-
|
||||
-
|
||||
shortcut_column: CTRL y + (CMD y + en MAC)
|
||||
description_column: para aumentar el tamaño del texto
|
||||
-
|
||||
-
|
||||
shortcut_column: CTRL y - (CMD y - en MAC)
|
||||
description_column: para reducir el tamaño del texto
|
||||
compatibility:
|
||||
|
||||
@@ -5,3 +5,4 @@ load Rails.root.join("db", "pages", "accessibility.rb")
|
||||
load Rails.root.join("db", "pages", "conditions.rb")
|
||||
load Rails.root.join("db", "pages", "privacy.rb")
|
||||
load Rails.root.join("db", "pages", "faq.rb")
|
||||
load Rails.root.join("db", "pages", "census_terms.rb")
|
||||
|
||||
13
db/pages/census_terms.rb
Normal file
13
db/pages/census_terms.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
def generate_content(page)
|
||||
page.title = I18n.t("pages.census_terms.title")
|
||||
page.content = "<p>#{I18n.t("pages.census_terms.description")}</p>"
|
||||
page.save!
|
||||
end
|
||||
|
||||
if SiteCustomization::Page.find_by(slug: "census_terms").nil?
|
||||
page = SiteCustomization::Page.new(slug: "census_terms", status: "published")
|
||||
page.print_content_flag = true
|
||||
I18n.available_locales.each do |locale|
|
||||
I18n.with_locale(locale) { generate_content(page) }
|
||||
end
|
||||
end
|
||||
@@ -11,17 +11,17 @@ describe "Admin custom pages", :admin do
|
||||
end
|
||||
|
||||
scenario "should contain all default custom pages published populated by db:seeds" do
|
||||
slugs = %w[accessibility conditions faq privacy welcome_not_verified
|
||||
slugs = %w[accessibility census_terms conditions faq privacy welcome_not_verified
|
||||
welcome_level_two_verified welcome_level_three_verified]
|
||||
|
||||
expect(SiteCustomization::Page.count).to be 7
|
||||
expect(SiteCustomization::Page.count).to be 8
|
||||
slugs.each do |slug|
|
||||
expect(SiteCustomization::Page.find_by(slug: slug).status).to eq "published"
|
||||
end
|
||||
|
||||
visit admin_site_customization_pages_path
|
||||
|
||||
expect(all("[id^='site_customization_page_']").count).to be 7
|
||||
expect(all("[id^='site_customization_page_']").count).to be 8
|
||||
slugs.each do |slug|
|
||||
expect(page).to have_content slug
|
||||
end
|
||||
|
||||
@@ -159,4 +159,13 @@ describe "Residence" do
|
||||
expect(page).to have_content "You have reached the maximum number of attempts. Please try again later."
|
||||
expect(page).to have_current_path(account_path)
|
||||
end
|
||||
|
||||
scenario "Terms and conditions link" do
|
||||
login_as(create(:user))
|
||||
|
||||
visit new_residence_path
|
||||
click_link "the terms and conditions of access"
|
||||
|
||||
expect(page).to have_content "Terms and conditions of access of the Census"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user