-@prev_month = @date.prev_month -@next_month = @date.next_month -@start_date = @date -@end_date = @start_date + 1.month -@start_month_date = @start_date.beginning_of_month -@end_month_date = @start_month_date.end_of_month -@start_week_date = @start_month_date.beginning_of_week #reservations_index_block -date_actu = @start_week_date -@compteur = 0 %table.top %tr %td.prev =link_to raw("< "+l(@prev_month, :format => :month)), public_reservations_path(:month => @prev_month.month.to_i, :year => @prev_month.year.to_i, :format => :js), :remote => true %td %h1=l @start_month_date, :format => :month %td.next =link_to raw(l(@next_month, :format => :month)+" >"), public_reservations_path(:month => @next_month.month.to_i, :year => @next_month.year.to_i, :format => :js), :remote => true #calendar %table %tr %th{:style => "width:14%;"} Lundi %th{:style => "width:14%;"} Mardi %th{:style => "width:14%;"} Mercredi %th{:style => "width:14%;"} Jeudi %th{:style => "width:14%;"} Vendredi %th{:style => "width:14%;"} Samedi %th{:style => "width:14%;"} Dimanche %tr -while date_actu < @start_month_date %td.day_td=render :partial => "public/reservations/day", :locals => {:day => date_actu} -date_actu = date_actu + 1.day -@compteur += 1 -if @compteur == 7 =raw "" -@compteur = 0 -while date_actu <= @end_month_date %td.day_td=render :partial => "public/reservations/day", :locals => {:day => date_actu} -date_actu = date_actu + 1.day -@compteur += 1 -if @compteur == 7 =raw "" -@compteur = 0 -while date_actu <= @end_month_date.end_of_week %td.day_td=render :partial => "public/reservations/day", :locals => {:day => date_actu} -date_actu = date_actu + 1.day -@compteur += 1 -if @compteur == 7 =raw "" -@compteur = 0