Affichage agenda
This commit is contained in:
parent
93390930c0
commit
2fdafeb297
@ -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
|
||||
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user