Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix webversion #32

Merged
merged 3 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

module Decidim
module NewsletterAgenda
module NewsletterTemplates
module ThemeMethods
extend ActiveSupport::Concern

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# frozen_string_literal: true

module Decidim
module NewsletterTemplates
class CapitalitatAgendaEventsCell < AgendaEventsCell
end
end
end
2 changes: 1 addition & 1 deletion config/i18n-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 1 addition & 2 deletions config/locales/ca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
61 changes: 30 additions & 31 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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. <a href="#">Read more</a>'
intro_title_preview: Dummy title for the newsletter.
agenda_events_settings_form:
background_color: Background color
body: Body
Expand Down Expand Up @@ -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. <a href="#">Read more</a>'
intro_title_preview: Dummy title for the newsletter.
3 changes: 1 addition & 2 deletions config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions lib/decidim/newsletter_agenda/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
Loading