Make it possible to add banners to the SDG section

This commit is contained in:
Javi Martín
2021-01-14 16:42:58 +01:00
parent a7bbdb1bd0
commit 5a42d65d5f
5 changed files with 6 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
<% provide(:title) { title } %>
<%= render Shared::BannerComponent.new("sdg") %>
<div class="sdg-goals-index">
<%= link_list(*goal_links, class: "sdg-goal-list") %>

View File

@@ -35,6 +35,7 @@ en:
proposals: Proposals
budgets: Participatory budgeting
help_page: Help page
sdg: SDG
edit:
editing: Edit banner
form:

View File

@@ -35,6 +35,7 @@ es:
proposals: Propuestas
budgets: Presupuestos participativos
help_page: Página de ayuda
sdg: ODS
edit:
editing: Editar el banner
form:

View File

@@ -1,3 +1,3 @@
%w[homepage debates proposals budgets help_page].each do |section|
%w[homepage debates proposals budgets help_page sdg].each do |section|
WebSection.where(name: section).first_or_create!
end

View File

@@ -9,6 +9,7 @@ namespace :db do
task load_sdg: :environment do
ApplicationLogger.new.info "Adding Sustainable Development Goals content"
load(Rails.root.join("db", "sdg.rb"))
WebSection.where(name: "sdg").first_or_create!
end
desc "Calculates the TSV column for all polls and legislation processes"