Move HTML settings to content blocks settings page
- Rename html settings keys - Show html settings next to content blocks page - Hide html settings from configuration tab
This commit is contained in:
@@ -9,6 +9,8 @@ class Admin::SiteCustomization::ContentBlocksController < Admin::SiteCustomizati
|
||||
def index
|
||||
@content_blocks = SiteCustomization::ContentBlock.order(:name, :locale)
|
||||
@headings_content_blocks = Budget::ContentBlock.all
|
||||
all_settings = Setting.all.group_by { |setting| setting.type }
|
||||
@html_settings = all_settings["html"]
|
||||
end
|
||||
|
||||
def create
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
<h2 class="inline-block"><%= t("admin.site_customization.content_blocks.index.title") %></h2>
|
||||
|
||||
<%= render "admin/settings/settings_table", settings: @html_settings %>
|
||||
|
||||
<h3><%= t("admin.site_customization.content_blocks.information") %></h3>
|
||||
|
||||
<p><%= t("admin.site_customization.content_blocks.about") %></p>
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
type: "image/png" %>
|
||||
<%= content_for :social_media_meta_tags %>
|
||||
|
||||
<%= setting["per_page_code_head"].try(:html_safe) %>
|
||||
<%= setting["html.per_page_code_head"].try(:html_safe) %>
|
||||
</head>
|
||||
<body class="<%= yield (:body_class) %>">
|
||||
<%= setting["per_page_code_body"].try(:html_safe) %>
|
||||
<%= setting["html.per_page_code_body"].try(:html_safe) %>
|
||||
|
||||
<h1 class="show-for-sr"><%= setting["org_name"] %></h1>
|
||||
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
<head>
|
||||
<%= render "layouts/common_head", default_title: "Gobierno abierto" %>
|
||||
<%= render "layouts/meta_tags" %>
|
||||
<%= setting["html.per_page_code_head"].try(:html_safe) %>
|
||||
</head>
|
||||
|
||||
<body class="auth-page">
|
||||
<%= setting["html.per_page_code_body"].try(:html_safe) %>
|
||||
<div class="wrapper">
|
||||
<div class="auth-image small-12 medium-3 column">
|
||||
<h1 class="logo margin">
|
||||
|
||||
@@ -28,10 +28,6 @@ en:
|
||||
months_to_archive_proposals_description: "After this number of months the Proposals will be archived and will no longer be able to receive supports"
|
||||
email_domain_for_officials: "Email domain for public officials"
|
||||
email_domain_for_officials_description: "All users registered with this domain will have their account verified at registration"
|
||||
per_page_code_head: "Code to be included on every page (<head>)"
|
||||
per_page_code_head_description: "This code will appear inside the <head> label. Useful for entering custom scripts, analytics..."
|
||||
per_page_code_body: "Code to be included on every page (<body>)"
|
||||
per_page_code_body_description: "This code will appear inside the <body> label. Useful for entering custom scripts, analytics..."
|
||||
twitter_handle: "Twitter handle"
|
||||
twitter_handle_description: "If filled in it will appear in the footer"
|
||||
twitter_hashtag: "Twitter hashtag"
|
||||
@@ -126,3 +122,8 @@ en:
|
||||
budgets_description: "With participatory budgets, citizens decide which projects presented by their neighbours will receive a part of the budget"
|
||||
legislation: "Legislation"
|
||||
legislation_description: "In participatory processes, citizens are offered the opportunity to participate in the drafting and modification of regulations that affect the society and to give their opinion on certain actions that are planned to be carried out"
|
||||
html:
|
||||
per_page_code_head: "Code to be included on every page (<head>)"
|
||||
per_page_code_head_description: "This code will appear inside the <head> label. Useful for entering custom scripts, analytics..."
|
||||
per_page_code_body: "Code to be included on every page (<body>)"
|
||||
per_page_code_body_description: "This code will appear inside the <body> label. Useful for entering custom scripts, analytics..."
|
||||
|
||||
@@ -28,10 +28,6 @@ es:
|
||||
months_to_archive_proposals_description: "Pasado este número de meses las Propuestas se archivarán y ya no podrán recoger apoyos"
|
||||
email_domain_for_officials: "Dominio de email para cargos públicos"
|
||||
email_domain_for_officials_description: "Todos los usuarios registrados con este dominio tendrán su cuenta verificada al registrarse"
|
||||
per_page_code_head: "Código a incluir en cada página (<head>)"
|
||||
per_page_code_head_description: "Esté código aparecerá dentro de la etiqueta <head>. Útil para introducir scripts personalizados, analitycs..."
|
||||
per_page_code_body: "Código a incluir en cada página (<body>)"
|
||||
per_page_code_body_description: "Esté código aparecerá dentro de la etiqueta <body>. Útil para introducir scripts personalizados, analitycs..."
|
||||
twitter_handle: "Usuario de Twitter"
|
||||
twitter_handle_description: "Si está rellenado aparecerá en el pie de página"
|
||||
twitter_hashtag: "Hashtag para Twitter"
|
||||
@@ -126,3 +122,8 @@ es:
|
||||
budgets_description: "Con los presupuestos participativos la ciudadanía decide a qué proyectos presentados por los vecinos y vecinas va destinada una parte del presupuesto"
|
||||
legislation: "Legislación"
|
||||
legislation_description: "En los procesos participativos se ofrece a la ciudadanía la oportunidad de participar en la elaboración y modificación de normativa que afecta a la sociedad y de dar su opinión sobre ciertas actuaciones que se tiene previsto llevar a cabo"
|
||||
html:
|
||||
per_page_code_head: "Código a incluir en cada página (<head>)"
|
||||
per_page_code_head_description: "Esté código aparecerá dentro de la etiqueta <head>. Útil para introducir scripts personalizados, analitycs..."
|
||||
per_page_code_body: "Código a incluir en cada página (<body>)"
|
||||
per_page_code_body_description: "Esté código aparecerá dentro de la etiqueta <body>. Útil para introducir scripts personalizados, analitycs..."
|
||||
|
||||
@@ -51,8 +51,9 @@ section "Creating Settings" do
|
||||
Setting.create(key: "feature.public_stats", value: "true")
|
||||
Setting.create(key: "feature.help_page", value: "true")
|
||||
|
||||
Setting.create(key: "per_page_code_head", value: "")
|
||||
Setting.create(key: "per_page_code_body", value: "")
|
||||
Setting.create(key: "html.per_page_code_head", value: "")
|
||||
Setting.create(key: "html.per_page_code_body", value: "")
|
||||
|
||||
Setting.create(key: "comments_body_max_length", value: "1000")
|
||||
Setting.create(key: "mailer_from_name", value: "CONSUL")
|
||||
Setting.create(key: "mailer_from_address", value: "noreply@consul.dev")
|
||||
|
||||
@@ -41,10 +41,10 @@ Setting["months_to_archive_proposals"] = 12
|
||||
Setting["email_domain_for_officials"] = ""
|
||||
|
||||
# Code to be included at the top (inside <head>) of every page (useful for tracking)
|
||||
Setting["per_page_code_head"] = ""
|
||||
Setting["html.per_page_code_head"] = ""
|
||||
|
||||
# Code to be included at the top (inside <body>) of every page
|
||||
Setting["per_page_code_body"] = ""
|
||||
Setting["html.per_page_code_body"] = ""
|
||||
|
||||
# Social settings
|
||||
Setting["twitter_handle"] = nil
|
||||
|
||||
Reference in New Issue
Block a user