Skip to content
Open
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions app/models/communication/block/template/testimonial.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
class Communication::Block::Template::Testimonial < Communication::Block::Template::Base

has_elements
has_layouts [
:carousel,
:grid,
:list,
:large
]

def allowed_for_about?
!about.respond_to?(:extranet)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,8 @@
</div>
</div>
</div>

<%= osuny_separator %>
<%= osuny_small_panel t('admin.communication.blocks.components.layouts.label') do %>
<%= block_component_edit block, :layout %>
<% end %>
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<%= block_component_static block, :layout %>
testimonials:
<% block.template.elements.each do |element| %>
<%= block_component_static block, :text, template: element, depth: 4, list: true %>
Expand Down
14 changes: 13 additions & 1 deletion config/locales/communication/blocks/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ en:
large:
description: Each event is presented in majesty, across the full width available, with a large image.
label: Large
more: Show more
list:
description: A list of events with dates, small images, all the same width.
label: List
Expand Down Expand Up @@ -792,6 +791,19 @@ en:
label: Text
placeholder: Enter testimonial's text
remove_testimonial: Remove testimonial
layouts:
carousel:
description: Testimonials are large, with an automatic animation.
label: Carousel
grid:
description: Testimonials are shown as a grid, all the same width.
label: Grid
large:
description: Testimonials are as large as possible, using all screen width.
label: Large
list:
description: Testimonials are displayed one above the other, somewhat like a table.
label: List
timeline:
description: A list of events with their description, on a timeline.
edit:
Expand Down
13 changes: 13 additions & 0 deletions config/locales/communication/blocks/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,19 @@ fr:
label: Texte
placeholder: Entrer le texte du témoignage
remove_testimonial: Enlever le témoignage
layouts:
carousel:
description: Les témoignages sont présentés en grand, avec un système de défilement automatique.
label: Carrousel
grid:
description: Les témoignages sont présentés en grille, tous de la même largeur.
label: Grille
large:
description: Les témoignages sont présentés en grand, sur toute la largeur disponible.
label: Grand
list:
description: Les témoignages sont présentés les uns après les autres, en une sorte de tableau.
label: Liste
timeline:
description: Une liste d'événements avec leur description, présentés en frise.
edit:
Expand Down
Loading