diff --git a/app/models/communication/block/template/feature.rb b/app/models/communication/block/template/feature.rb index f7a7887a5..d9a013bf0 100644 --- a/app/models/communication/block/template/feature.rb +++ b/app/models/communication/block/template/feature.rb @@ -3,10 +3,12 @@ class Communication::Block::Template::Feature < Communication::Block::Template:: has_elements has_component :description, :rich_text + has_component :option_icons, :boolean, default: false + def allowed_for_about? !about.respond_to?(:extranet) end - + def children elements end diff --git a/app/views/admin/communication/blocks/templates/features/_edit.html.erb b/app/views/admin/communication/blocks/templates/features/_edit.html.erb index b13c93db8..89bc67e90 100644 --- a/app/views/admin/communication/blocks/templates/features/_edit.html.erb +++ b/app/views/admin/communication/blocks/templates/features/_edit.html.erb @@ -2,8 +2,8 @@ <%= osuny_separator %> -
@@ -41,4 +41,8 @@
<%= block_component_add_element block, t('.add_element') %> -
\ No newline at end of file +
+ +<%= osuny_separator %> + +<%= block_component_edit block, :option_icons %> diff --git a/app/views/admin/communication/blocks/templates/features/_static.html.erb b/app/views/admin/communication/blocks/templates/features/_static.html.erb index 265d924f2..b2fb1a611 100644 --- a/app/views/admin/communication/blocks/templates/features/_static.html.erb +++ b/app/views/admin/communication/blocks/templates/features/_static.html.erb @@ -1,4 +1,5 @@ <%= block_component_static block, :description %> +<%= block_options_static block %> elements: <% block.template.elements.each do |element| %> <%= block_component_static block, :title, template: element, list: true, depth: 4 %> diff --git a/app/views/admin/communication/blocks/templates/links/_edit.html.erb b/app/views/admin/communication/blocks/templates/links/_edit.html.erb index 0ccfef9ae..f8e11495f 100644 --- a/app/views/admin/communication/blocks/templates/links/_edit.html.erb +++ b/app/views/admin/communication/blocks/templates/links/_edit.html.erb @@ -43,4 +43,4 @@ <%= osuny_small_panel t('admin.communication.blocks.components.layouts.label') do %> <%= block_component_edit block, :layout %> <%= block_component_edit block, :option_icons %> -<% end %> \ No newline at end of file +<% end %> diff --git a/config/locales/communication/blocks/en.yml b/config/locales/communication/blocks/en.yml index 711c3822d..12c0ab712 100644 --- a/config/locales/communication/blocks/en.yml +++ b/config/locales/communication/blocks/en.yml @@ -351,6 +351,8 @@ en: title: label: Title placeholder: Enter title here + option_icons: + label: Show images as small icons remove_element: Remove feature files: description: A list of downloadable files, mentioning their file size. diff --git a/config/locales/communication/blocks/fr.yml b/config/locales/communication/blocks/fr.yml index 7e4836970..8f3d3bc6c 100644 --- a/config/locales/communication/blocks/fr.yml +++ b/config/locales/communication/blocks/fr.yml @@ -352,6 +352,8 @@ fr: title: label: Titre placeholder: Entrer le titre de la fonctionnalité + option_icons: + label: Afficher les images comme de petites icônes remove_element: Supprimer la fonctionnalité files: description: Une liste de fichiers téléchargeables, présentés avec leur poids.