Affichage agenda

This commit is contained in:
Nicolas Bally 2020-08-07 12:58:36 +02:00
parent 93390930c0
commit 2fdafeb297
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ class Public::EventsController < ApplicationController
else
@start_list_date = Time.now.beginning_of_month
@end_list_date = Event.order("stop_at DESC").first.start_at.end_of_month.next_month
@end_list_date = Event.order("start_at DESC").first.start_at.end_of_month.next_month

View File

@ -8,7 +8,7 @@
-while the_month <= last_month
%h2{:class => "month_title"}=l(the_month.to_date, :format => :month_and_year)
.month_content
=render :partial => "public/events/event", :collection =>Event.where('(start_at < ? AND start_at > ?) OR (stop_at < ? AND stop_at > ?)',the_month.end_of_month, the_month.beginning_of_month,the_month.end_of_month, the_month.beginning_of_month).order(:start_at)
=render :partial => "public/events/event", :collection =>Event.where('(start_at <= ? AND start_at >= ?) OR (stop_at <= ? AND stop_at >= ?)',the_month.end_of_month, the_month.beginning_of_month,the_month.end_of_month, the_month.beginning_of_month).order(:start_at)
-the_month = the_month.next_month