diff --git a/app/cells/concerns/decidim/newsletter_agenda/theme_methods.rb b/app/cells/concerns/decidim/newsletter_templates/theme_methods.rb
similarity index 98%
rename from app/cells/concerns/decidim/newsletter_agenda/theme_methods.rb
rename to app/cells/concerns/decidim/newsletter_templates/theme_methods.rb
index 2871097..76afb93 100644
--- a/app/cells/concerns/decidim/newsletter_agenda/theme_methods.rb
+++ b/app/cells/concerns/decidim/newsletter_templates/theme_methods.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module Decidim
- module NewsletterAgenda
+ module NewsletterTemplates
module ThemeMethods
extend ActiveSupport::Concern
diff --git a/app/cells/decidim/newsletter_agenda/agenda_events/show.erb b/app/cells/decidim/newsletter_templates/agenda_events/show.erb
similarity index 100%
rename from app/cells/decidim/newsletter_agenda/agenda_events/show.erb
rename to app/cells/decidim/newsletter_templates/agenda_events/show.erb
diff --git a/app/cells/decidim/newsletter_agenda/agenda_events/themes/canodrom.erb b/app/cells/decidim/newsletter_templates/agenda_events/themes/canodrom.erb
similarity index 100%
rename from app/cells/decidim/newsletter_agenda/agenda_events/themes/canodrom.erb
rename to app/cells/decidim/newsletter_templates/agenda_events/themes/canodrom.erb
diff --git a/app/cells/decidim/newsletter_agenda/agenda_events/themes/capitalitat.erb b/app/cells/decidim/newsletter_templates/agenda_events/themes/capitalitat.erb
similarity index 100%
rename from app/cells/decidim/newsletter_agenda/agenda_events/themes/capitalitat.erb
rename to app/cells/decidim/newsletter_templates/agenda_events/themes/capitalitat.erb
diff --git a/app/cells/decidim/newsletter_agenda/agenda_events_cell.rb b/app/cells/decidim/newsletter_templates/agenda_events_cell.rb
similarity index 94%
rename from app/cells/decidim/newsletter_agenda/agenda_events_cell.rb
rename to app/cells/decidim/newsletter_templates/agenda_events_cell.rb
index 7a11831..0bdeed4 100644
--- a/app/cells/decidim/newsletter_agenda/agenda_events_cell.rb
+++ b/app/cells/decidim/newsletter_templates/agenda_events_cell.rb
@@ -3,8 +3,8 @@
require "cell/partial"
module Decidim
- module NewsletterAgenda
- class AgendaEventsCell < NewsletterTemplates::BaseCell
+ module NewsletterTemplates
+ class AgendaEventsCell < BaseCell
include Decidim::LayoutHelper
include ThemeMethods
@@ -79,7 +79,7 @@ def social_links
path = "images/#{network}.png" unless File.exist?(File.join(Decidim::NewsletterAgenda::Engine.root, "app/packs/#{path}"))
ico = tag.img(src: asset_pack_url("media/#{path}", **host_options), alt: network.capitalize, class: "footer-social__icon",
- title: t("decidim.newsletter_agenda.agenda_events_settings_form.#{network}"))
+ title: t("decidim.newsletter_templates.agenda_events_settings_form.#{network}"))
links << link_to(ico, network_url(v, network), target: "_blank", rel: "noopener", class: "footer-social__icon")
end
diff --git a/app/cells/decidim/newsletter_agenda/agenda_events_settings_form/show.erb b/app/cells/decidim/newsletter_templates/agenda_events_settings_form/show.erb
similarity index 100%
rename from app/cells/decidim/newsletter_agenda/agenda_events_settings_form/show.erb
rename to app/cells/decidim/newsletter_templates/agenda_events_settings_form/show.erb
diff --git a/app/cells/decidim/newsletter_agenda/agenda_events_settings_form_cell.rb b/app/cells/decidim/newsletter_templates/agenda_events_settings_form_cell.rb
similarity index 96%
rename from app/cells/decidim/newsletter_agenda/agenda_events_settings_form_cell.rb
rename to app/cells/decidim/newsletter_templates/agenda_events_settings_form_cell.rb
index d460f06..b1d894b 100644
--- a/app/cells/decidim/newsletter_agenda/agenda_events_settings_form_cell.rb
+++ b/app/cells/decidim/newsletter_templates/agenda_events_settings_form_cell.rb
@@ -1,8 +1,8 @@
# frozen_string_literal: true
module Decidim
- module NewsletterAgenda
- class AgendaEventsSettingsFormCell < NewsletterTemplates::BaseSettingsFormCell
+ module NewsletterTemplates
+ class AgendaEventsSettingsFormCell < BaseSettingsFormCell
include ThemeMethods
# rubocop:disable Metrics/CyclomaticComplexity
diff --git a/app/cells/decidim/newsletter_templates/capitalitat_agenda_events_cell.rb b/app/cells/decidim/newsletter_templates/capitalitat_agenda_events_cell.rb
new file mode 100644
index 0000000..e91297d
--- /dev/null
+++ b/app/cells/decidim/newsletter_templates/capitalitat_agenda_events_cell.rb
@@ -0,0 +1,8 @@
+# frozen_string_literal: true
+
+module Decidim
+ module NewsletterTemplates
+ class CapitalitatAgendaEventsCell < AgendaEventsCell
+ end
+ end
+end
diff --git a/config/i18n-tasks.yml b/config/i18n-tasks.yml
index 5005b91..fbbe7e5 100644
--- a/config/i18n-tasks.yml
+++ b/config/i18n-tasks.yml
@@ -9,7 +9,7 @@ data:
ignore_unused:
ignore_missing:
- - decidim.newsletter_agenda.agenda_events_settings_form.*
+ - decidim.newsletter_templates.agenda_events_settings_form.*
search:
relative_roots:
diff --git a/config/locales/ca.yml b/config/locales/ca.yml
index 1c97775..88a98fb 100644
--- a/config/locales/ca.yml
+++ b/config/locales/ca.yml
@@ -19,7 +19,7 @@ ca:
same_years: "%{from_day} %{from_month} - %{until_day} %{until_month}"
year: "%Y"
decidim:
- newsletter_agenda:
+ newsletter_templates:
agenda_events_settings_form:
background_color: Color de fons
body: Cos
@@ -65,7 +65,6 @@ ca:
twitter: Twitter
wont_show: No es mostrarà
youtube: Youtube
- newsletter_templates:
agenda_events:
body_box_date_time_preview: Novembre, 7 - 15, 10:00
body_box_description_preview: Aquesta és una descripció de l'esdeveniment per a aquesta agenda.
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 70739da..4781428 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -21,7 +21,36 @@ en:
same_years: "%{from_day} %{from_month} - %{until_day} %{until_month}"
year: "%Y"
decidim:
- newsletter_agenda:
+ newsletter_templates:
+ agenda_events:
+ body_box_date_time_preview: November, 7 - 15, 10:00
+ body_box_description_preview: This is an event description for this agenda.
+ body_box_link_text_preview: Read more
+ body_box_title_preview: This is an event title for this agenda
+ body_final_text_preview: But there's more
+ body_title_preview: What is happening during the week
+ canodrom_name: Agenda events (edition Canòdrom)
+ capitalitat_name: Agenda events (edition Capitalitat)
+ footer_additional_text_preview: This is a footer additional text for this
+ agenda
+ footer_box_date_time_preview: 7 – 15 Novembre, 10:00
+ footer_box_description_preview: This is a footer description for this agenda
+ footer_box_link_text_preview: Read more
+ footer_box_title_preview: This is a footer title for this agenda
+ footer_social_links_title_preview: Follow us on social networks
+ footer_title_preview: Whether you want to see what you missed or you want
+ to remember it
+ intro_link_text_preview: Read more
+ intro_text_preview: 'Dummy text for body: Maecenas ac nisl vitae lectus pretium
+ facilisis. Etiam facilisis sem nibh, sit amet rutrum mi aliquam nec. Sed
+ id urna at nisl pretium mollis eu vel velit. Proin vitae suscipit urna,
+ sed faucibus urna. Pellentesque id libero vulputate ipsum scelerisque suscipit.
+ Nam aliquam sodales mi sit amet cursus. Donec mattis faucibus purus. Aenean
+ tincidunt porta lorem ac commodo. Vestibulum in mollis mi. Morbi eros erat,
+ cursus ut tortor sit amet, imperdiet dapibus arcu. Suspendisse id egestas
+ enim. In eget magna sed enim efficitur elementum sit amet aliquam quam.
+ Donec fermentum metus eget urna luctus pulvinar. Read more'
+ intro_title_preview: Dummy title for the newsletter.
agenda_events_settings_form:
background_color: Background color
body: Body
@@ -76,33 +105,3 @@ en:
twitter: Twitter
wont_show: Won't be shown
youtube: Youtube
- newsletter_templates:
- agenda_events:
- body_box_date_time_preview: November, 7 - 15, 10:00
- body_box_description_preview: This is an event description for this agenda.
- body_box_link_text_preview: Read more
- body_box_title_preview: This is an event title for this agenda
- body_final_text_preview: But there's more
- body_title_preview: What is happening during the week
- canodrom_name: Agenda events (edition Canòdrom)
- capitalitat_name: Agenda events (edition Capitalitat)
- footer_additional_text_preview: This is a footer additional text for this
- agenda
- footer_box_date_time_preview: 7 – 15 Novembre, 10:00
- footer_box_description_preview: This is a footer description for this agenda
- footer_box_link_text_preview: Read more
- footer_box_title_preview: This is a footer title for this agenda
- footer_social_links_title_preview: Follow us on social networks
- footer_title_preview: Whether you want to see what you missed or you want
- to remember it
- intro_link_text_preview: Read more
- intro_text_preview: 'Dummy text for body: Maecenas ac nisl vitae lectus pretium
- facilisis. Etiam facilisis sem nibh, sit amet rutrum mi aliquam nec. Sed
- id urna at nisl pretium mollis eu vel velit. Proin vitae suscipit urna,
- sed faucibus urna. Pellentesque id libero vulputate ipsum scelerisque suscipit.
- Nam aliquam sodales mi sit amet cursus. Donec mattis faucibus purus. Aenean
- tincidunt porta lorem ac commodo. Vestibulum in mollis mi. Morbi eros erat,
- cursus ut tortor sit amet, imperdiet dapibus arcu. Suspendisse id egestas
- enim. In eget magna sed enim efficitur elementum sit amet aliquam quam.
- Donec fermentum metus eget urna luctus pulvinar. Read more'
- intro_title_preview: Dummy title for the newsletter.
diff --git a/config/locales/es.yml b/config/locales/es.yml
index 0c7944d..3c1a1bf 100644
--- a/config/locales/es.yml
+++ b/config/locales/es.yml
@@ -19,7 +19,7 @@ es:
same_years: "%{from_day} %{from_month} - %{until_day} %{until_month}"
year: "%Y"
decidim:
- newsletter_agenda:
+ newsletter_templates:
agenda_events_settings_form:
background_color: Color de fondo
body: Cuerpo
@@ -65,7 +65,6 @@ es:
twitter: Twitter
wont_show: Won't be shown
youtube: Youtube
- newsletter_templates:
agenda_events:
body_box_date_time_preview: Noviembre, 7 - 15, 10:00
body_box_description_preview: Esta es una descripción de evento para esta agenda.
diff --git a/lib/decidim/newsletter_agenda/engine.rb b/lib/decidim/newsletter_agenda/engine.rb
index c54b00a..2e5d2f0 100644
--- a/lib/decidim/newsletter_agenda/engine.rb
+++ b/lib/decidim/newsletter_agenda/engine.rb
@@ -19,8 +19,8 @@ class Engine < ::Rails::Engine
initializer "decidim-newsletter_agenda.newsletter_templates" do
Decidim::NewsletterAgenda.themes.each do |theme, properties|
Decidim.content_blocks.register(:newsletter_template, "#{theme}_agenda_events") do |content_block|
- content_block.cell = "decidim/newsletter_agenda/agenda_events"
- content_block.settings_form_cell = "decidim/newsletter_agenda/agenda_events_settings_form"
+ content_block.cell = "decidim/newsletter_templates/agenda_events"
+ content_block.settings_form_cell = "decidim/newsletter_templates/agenda_events_settings_form"
content_block.public_name_key = "decidim.newsletter_templates.agenda_events.#{theme}_name"
content_block.images = [