Project

General

Profile

Feature #1043 » calendar.rhtml

Carl Nygard, 2008-04-11 21:25

 
1
<h2><%= l(:label_calendar) %>: <%= "#{month_name(@month).downcase}  #{@year}" %></h2>
2

    
3
<table width="100%">
4
<tr><td align="left">
5
    <%= link_to_remote ('&#171; ' + (@month==1 ? "#{month_name(12)} #{@year-1}" : "#{month_name(@month-1)}")), 
6
                        {:update => "content", :url => { :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1), :tracker_ids => @selected_tracker_ids }},
7
                        {:href => url_for(:action => 'calendar', :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1), :tracker_ids => @selected_tracker_ids )}
8
                        %>
9
</td><td align="right">
10
    <%= link_to_remote ((@month==12 ? "#{month_name(1)} #{@year+1}" : "#{month_name(@month+1)}") + ' &#187;'), 
11
                        {:update => "content", :url => { :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1), :tracker_ids => @selected_tracker_ids }},
12
                        {:href => url_for(:action => 'calendar', :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1), :tracker_ids => @selected_tracker_ids )}
13
                        %>
14
</td></tr>
15
</table>
16

    
17
<%= render :partial => 'common/calendar', :locals => {:calendar => @calendar} %>
18

    
19
<%= image_tag 'arrow_from.png' %>&nbsp;&nbsp;<%= l(:text_tip_task_begin_day) %><br />
20
<%= image_tag 'arrow_to.png' %>&nbsp;&nbsp;<%= l(:text_tip_task_end_day) %><br />
21
<%= image_tag 'arrow_bw.png' %>&nbsp;&nbsp;<%= l(:text_tip_task_begin_end_day) %><br />
22

    
23

    
24
<% content_for :sidebar do %>
25
    <h3><%= l(:label_calendar) %></h3>
26
    
27
    <% form_tag() do %>
28
    <p><%= select_month(@month, :prefix => "month", :discard_type => true) %>
29
    <%= select_year(@year, :prefix => "year", :discard_type => true) %></p>
30

    
31
    <% @trackers.each do |tracker| %>
32
      <label><%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %> <%= tracker.name %></label><br />
33
    <% end %>
34

    
35
    <p><%= submit_tag l(:button_apply), :class => 'button-small' %></p>
36

    
37
    <% end %>
38

    
39
<% end %>
40

    
41
<% set_html_title l(:label_calendar) -%>
(2-2/3)