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

Fix #1395

parent d587763b
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,10 @@ class Communication::Block::Template::Agenda < Communication::Block::Template::B
has_component :description, :rich_text
has_component :quantity, :number, options: 3
has_component :time, :option, options: [:future_or_present, :future, :present, :archive]
has_component :show_category, :boolean
has_component :show_summary, :boolean
has_component :show_status, :boolean
def selected_events
@selected_events ||= events_with_time_scope
end
......
<fieldset class="mb-3">
<legend class="col-form-label"><%= label %></legend>
<legend class="form-label"><%= label %></legend>
<% component.options.each do |option| %>
<div class="form-check">
<input class="form-check-input"
......
......@@ -4,9 +4,17 @@
<div class="col-xl-6">
<%= block_component_edit block, :description %>
</div>
</div>
<div class="row pure__row--small">
<div class="col-xl-6">
<%= block_component_edit block, :quantity %>
<%= block_component_edit block, :show_summary %>
<%= block_component_edit block, :show_category %>
<%= block_component_edit block, :show_status %>
</div>
<div class="col-xl-6">
<%= block_component_edit block, :time %>
</div>
</div>
<%= block_component_edit block, :time %>
\ No newline at end of file
layout: <%= block.template.layout %>
<%= block_component_static block, :description %>
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 %>"
......
......@@ -71,6 +71,12 @@ en:
quantity:
label: Quantity of events to show
placeholder: Enter quantity
show_category:
label: Show events' categories
show_summary:
label: Show events' summaries
show_status:
label: Show events' status (present, future...)
time:
label: Which events?
options:
......
......@@ -71,6 +71,12 @@ fr:
quantity:
label: Quantité d'événements à afficher
placeholder: Entrer la quantité
show_category:
label: Afficher les catégories des événements
show_summary:
label: Afficher le résumé des événements
show_status:
label: Afficher le statut des événements (en cours, à venir...)
time:
label: Quels événements afficher ?
options:
......
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