<% if @calendar.mode == 'month' %>
<%=link_to_function("« expand".html_safe, "wfCalendar.changeMode('quarter', #{@calendar.show_time?})", :style => "font-size:10px; padding-bottom: 3px")%>
<% elsif @calendar.mode == 'quarter' %>
<%=link_to_function("« expand".html_safe, "wfCalendar.changeMode('annual', #{@calendar.show_time?})", :style => "font-size:10px; padding-bottom: 3px")%>
<% end %>
<%=link_to_function(image_tag("will_filter/close.gif", :title=>"Close"), "wfCalendar.hide()")%>
Calendar
<%= form_tag({:controller => "/will_filter/calendar"}, {:method => :get, :id => "wf_calendar_form"}) do %>
<%= hidden_field_tag :wf_calendar_start_date, @calendar.start_date.strftime("%Y/%m/%d") %>
<%= hidden_field_tag :wf_calendar_selected_date, @calendar.selected_date.strftime("%Y/%m/%d") %>
<%= hidden_field_tag :wf_calendar_mode, @calendar.mode %>
<%= hidden_field_tag :wf_calendar_show_time, @calendar.show_time? %>
<%=link_to_function("«".html_safe, "wfCalendar.goToStartDate('#{@calendar.previous_start_date}')", :style=>"font-size:16px;")%>
<% if @calendar.mode != 'annual' %>
<%= select_tag("month", options_for_select(WillFilter::Calendar.month_options, @calendar.month), {:id => "wf_calendar_month", :onChange=>"wfCalendar.goToStartDate('')", :style => "width:auto;"}) %>
<% end %>
<%= select_tag("year", options_for_select(WillFilter::Calendar.year_options, @calendar.year), {:id => "wf_calendar_year",:onChange=>"wfCalendar.goToStartDate('')", :style => "width:auto;"}) %>
<%=link_to_function("»".html_safe, "wfCalendar.goToStartDate('#{@calendar.next_start_date}')", :style=>"font-size:16px;")%>
<%= render :partial => @calendar.mode, :locals => {:calendar => @calendar} %>
<% if @calendar.show_time? %>
Time:
<%= select_tag("wf_calendar_hour", options_for_select(WillFilter::Calendar.hour_options, @calendar.hour), :style => "width:auto;") %>
:
<%= select_tag("wf_calendar_minute", options_for_select(WillFilter::Calendar.minute_options, @calendar.minute), :style => "width:auto;") %>
:
<%= select_tag("wf_calendar_second", options_for_select(WillFilter::Calendar.second_options, @calendar.second), :style => "width:auto;") %>
<%=link_to_function("
Set Date and Time".html_safe, "wfCalendar.setDateTime()", :class => "wf_grey_button wf_pcb") %>
<%=link_to_function("
Cancel".html_safe, "wfCalendar.hide()", :class => "wf_grey_button wf_pcb") %>
<% end %>
<% end %>