Skip to content
Snippets Groups Projects
Commit 260818a3 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

#1499

parent 6451a543
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,7 @@ class Communication::Block::Template::Agenda < Communication::Block::Template::B
has_component :show_category, :boolean
has_component :show_summary, :boolean
has_component :show_status, :boolean
has_component :no_event_message, :string
def selected_events
@selected_events ||= send "selected_events_#{mode}"
......
......@@ -58,6 +58,7 @@
<%= block_component_edit block, :show_summary %>
<%= block_component_edit block, :show_category %>
<%= block_component_edit block, :show_status %>
<%= block_component_edit block, :no_event_message %>
</div>
</div>
</div>
......@@ -38,6 +38,9 @@ end
</div>
</article>
<% end %>
<% if block.template.selected_events.empty? %>
<p><%= block.template.no_event_message %></p>
<% end %>
<% end %>
</div>
</div>
......
<%= block_component_static block, :mode %>
<%= block_component_static block, :layout %>
<%= block_component_static block, :description %>
<%= block_component_static block, :no_event_message %>
<%= block_component_static block, :show_summary %>
<%= block_component_static block, :show_category %>
<%= block_component_static block, :show_status %>
<% if block.template.mode == 'category' && block.template.category %>
category: "<%= block.template.category.path %>"
<% end %>
show_summary: <%= block.template.show_summary %>
show_category: <%= block.template.show_category %>
show_status: <%= block.template.show_status %>
events:
<% block.template.selected_events.each do |element| %>
- path: "<%= element.current_permalink_in_website(@website)&.path %>"
......
......@@ -86,6 +86,9 @@ en:
category: A specific category of events
selection: A selection of events
categories: A list of all events' categories
no_event_message:
label: Sentence to be displayed if there is no event
placeholder: Enter the desired sentence
quantity:
label: Quantity of events to show
placeholder: Enter quantity
......
......@@ -86,6 +86,9 @@ fr:
category: Une catégorie spécifique d'événements
selection: Une sélection d'événements
categories: La liste des catégories d'événements
no_event_message:
label: Phrase à afficher s'il n'y a aucun événement
placeholder: Entrer la phrase souhaitée
quantity:
label: Quantité d'événements à afficher
placeholder: Entrer la quantité
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment