From 70002be0998b51ed11d658b6ec98c8b0400e7562 Mon Sep 17 00:00:00 2001 From: elviabth Date: Tue, 6 Feb 2024 14:03:37 +0100 Subject: [PATCH] add tabs and accordions --- .../agenda_events_settings_form/scripts.erb | 29 --- .../agenda_events_settings_form/show.erb | 199 +++++++++--------- 2 files changed, 103 insertions(+), 125 deletions(-) delete mode 100644 app/cells/decidim/newsletter_templates/agenda_events_settings_form/scripts.erb diff --git a/app/cells/decidim/newsletter_templates/agenda_events_settings_form/scripts.erb b/app/cells/decidim/newsletter_templates/agenda_events_settings_form/scripts.erb deleted file mode 100644 index 29b2d76..0000000 --- a/app/cells/decidim/newsletter_templates/agenda_events_settings_form/scripts.erb +++ /dev/null @@ -1,29 +0,0 @@ - diff --git a/app/cells/decidim/newsletter_templates/agenda_events_settings_form/show.erb b/app/cells/decidim/newsletter_templates/agenda_events_settings_form/show.erb index d36be67..497be06 100644 --- a/app/cells/decidim/newsletter_templates/agenda_events_settings_form/show.erb +++ b/app/cells/decidim/newsletter_templates/agenda_events_settings_form/show.erb @@ -7,110 +7,117 @@ <%= settings_fields.text_field :font_color_over_bg, label: t(".font_color_over_bg"), type: "color" %> <% end %> - +
+ -
-
-
- <% form.fields_for :settings, settings do |settings_fields| %> - <%= settings_fields.translated :text_field, :intro_title, label: t(".intro_title") %> - <%= settings_fields.translated :editor, :intro_text, label: t(".intro_text") %> - <%= settings_fields.translated :text_field, :intro_link_text, label: t(".intro_link_text") if theme == :capitalitat %> - <%= settings_fields.text_field :intro_link_url, label: t(".intro_link_url") if theme == :capitalitat %> - <% end %> - <% form.fields_for :images, form.object.images do |images_fields| %> - <%= images_fields.upload :main_image, label: t(".main_image") %> - <% end %> -
-
+
+
+ <% form.fields_for :settings, settings do |settings_fields| %> + <%= settings_fields.translated :text_field, :intro_title, label: t(".intro_title") %> + <%= settings_fields.translated :editor, :intro_text, label: t(".intro_text") %> + <%= settings_fields.translated :text_field, :intro_link_text, label: t(".intro_link_text") if theme == :capitalitat %> + <%= settings_fields.text_field :intro_link_url, label: t(".intro_link_url") if theme == :capitalitat %> + <% end %> + <% form.fields_for :images, form.object.images do |images_fields| %> + <%= images_fields.upload :main_image, label: t(".main_image") %> + <% end %> +
+
-
-

<%= t(".tab_body_description") %>

-
- <% form.fields_for :settings, settings do |settings_fields| %> - <%= settings_fields.translated :text_field, :body_title, label: t(".body_title") unless theme == :capitalitat %> - <%= settings_fields.translated :text_field, :body_subtitle, label: t(".body_subtitle") unless theme == :capitalitat %> -
    - <% (1..4).each do |num| %> -
  • - <%= t(".boxes_number_title", number: num) %>: -
    - <%= settings_fields.translated :text_field, "body_box_title_#{num}", label: t(".body_box_title") %> - <%= settings_fields.translated :text_field, "body_box_date_time_#{num}", label: t(".body_box_date_time") %> - <%= settings_fields.translated :text_field, "body_box_description_#{num}", label: t(".body_box_description"), maxlength: 250, class: "mb-0 !mb-0" %> - <%= settings_fields.translated :text_field, "body_box_link_text_#{num}", label: t(".body_box_link_text") %> - <%= settings_fields.translated :text_field, "body_box_link_url_#{num}", label: t(".body_box_link_url") %> - <% form.fields_for :images, form.object.images do |images_fields| %> - <%= images_fields.upload :"body_box_image_#{num}", label: t(".body_box_image") %> - <% end %> -
    -
  • - <% end %> -
- <%= settings_fields.translated :text_field, :body_final_text, label: t(".body_final_text") unless theme == "capitalitat" %> - <% end %> -
-
+
+

<%= t(".tab_body_description") %>

+
+ <% form.fields_for :settings, settings do |settings_fields| %> + <%= settings_fields.translated :text_field, :body_title, label: t(".body_title") unless theme == :capitalitat %> + <%= settings_fields.translated :text_field, :body_subtitle, label: t(".body_subtitle") unless theme == :capitalitat %> +
+ <% (1..4).each do |num| %> + +
+ <%= settings_fields.translated :text_field, "body_box_title_#{num}", label: t(".body_box_title") %> + <%= settings_fields.translated :text_field, "body_box_date_time_#{num}", label: t(".body_box_date_time") %> + <%= settings_fields.translated :text_field, "body_box_description_#{num}", label: t(".body_box_description"), maxlength: 250, class: "mb-0 !mb-0" %> + <%= settings_fields.translated :text_field, "body_box_link_text_#{num}", label: t(".body_box_link_text") %> + <%= settings_fields.translated :text_field, "body_box_link_url_#{num}", label: t(".body_box_link_url") %> + <% form.fields_for :images, form.object.images do |images_fields| %> + <%= images_fields.upload :"body_box_image_#{num}", label: t(".body_box_image") %> + <% end %> +
+ + <% end %> +
+ <%= settings_fields.translated :text_field, :body_final_text, label: t(".body_final_text") unless theme == "capitalitat" %> + <% end %> +
+
-
-

<%= t(".tab_footer_description") %>

-
- <% form.fields_for :settings, settings do |settings_fields| %> - <%= settings_fields.translated :text_field, :footer_title, label: t(".footer_title") %> +
+
+ + +
+ <%= t(".interpolations_hint") %>
-
-
- <%= t(".interpolations_hint") %>
-<%= render :scripts %> +