@@ -1,69 +1,69 | |||
|
1 | 1 | <h2><%= l(:label_calendar) %></h2> |
|
2 | 2 | |
|
3 | 3 | <table width="100%"> |
|
4 | 4 | <tr> |
|
5 | 5 | <td align="left" width="150"> |
|
6 | 6 | <%= link_to_remote ('« ' + (@month==1 ? "#{month_name(12)} #{@year-1}" : "#{month_name(@month-1)}")), |
|
7 | 7 | {:update => "content", :url => { :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1) }}, |
|
8 | 8 | {:href => url_for(:action => 'calendar', :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1))} |
|
9 | 9 | %> |
|
10 | 10 | </td> |
|
11 | 11 | <td align="center"> |
|
12 | 12 | <%= start_form_tag :action => 'calendar', :id => @project %> |
|
13 | 13 | <%= select_month(@month, :prefix => "month", :discard_type => true) %> |
|
14 | 14 | <%= select_year(@year, :prefix => "year", :discard_type => true) %> |
|
15 | 15 | <%= submit_tag l(:button_submit), :class => "button-small" %> |
|
16 | 16 | <%= end_form_tag %> |
|
17 | 17 | </td> |
|
18 | 18 | <td align="right" width="150"> |
|
19 | 19 | <%= link_to_remote ((@month==12 ? "#{month_name(1)} #{@year+1}" : "#{month_name(@month+1)}") + ' »'), |
|
20 | 20 | {:update => "content", :url => { :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1) }}, |
|
21 | 21 | {:href => url_for(:action => 'calendar', :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1))} |
|
22 | 22 | %> |
|
23 | 23 | </td> |
|
24 | 24 | </tr> |
|
25 | 25 | </table> |
|
26 | 26 | <br /> |
|
27 | 27 | |
|
28 | 28 | <table class="list with-cells"> |
|
29 | 29 | <thead> |
|
30 | 30 | <tr> |
|
31 | 31 | <th></th> |
|
32 | 32 | <% 1.upto(7) do |d| %> |
|
33 | 33 | <th width="14%"><%= day_name(d) %></th> |
|
34 | 34 | <% end %> |
|
35 | 35 | </tr> |
|
36 | 36 | </thead> |
|
37 | 37 | <tbody> |
|
38 | 38 | <tr height="100"> |
|
39 | 39 | <% day = @date_from |
|
40 | 40 | while day <= @date_to |
|
41 | 41 | if day.cwday == 1 %> |
|
42 | 42 | <th><%= day.cweek %></th> |
|
43 | 43 | <% end %> |
|
44 | 44 | <td valign="top" width="14%" class="<%= day.month==@month ? "even" : "odd" %>"> |
|
45 | 45 | <p align="right"><%= day==Date.today ? "<b>#{day.day}</b>" : day.day %></p> |
|
46 | 46 | <% day_issues = [] |
|
47 | 47 | @issues.each { |i| day_issues << i if i.start_date == day or i.due_date == day } |
|
48 | 48 | day_issues.each do |i| %> |
|
49 | 49 | <%= if day == i.start_date and day == i.due_date |
|
50 | 50 | image_tag('arrow_bw') |
|
51 | 51 | elsif day == i.start_date |
|
52 | 52 | image_tag('arrow_from') |
|
53 | 53 | elsif day == i.due_date |
|
54 | 54 | image_tag('arrow_to') |
|
55 | 55 | end %> |
|
56 | <small><%= link_to "#{i.tracker.name} ##{i.id}", :controller => 'issues', :action => 'show', :id => i %>: <%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small><br /> | |
|
56 | <small><%= link_to "#{i.tracker.name} ##{i.id}", { :controller => 'issues', :action => 'show', :id => i }, :title => "#{i.subject}" %>: <%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small><br /> | |
|
57 | 57 | <% end %> |
|
58 | 58 | </td> |
|
59 | 59 | <%= '</tr><tr height="100">' if day.cwday >= 7 and day!=@date_to %> |
|
60 | 60 | <% |
|
61 | 61 | day = day + 1 |
|
62 | 62 | end %> |
|
63 | 63 | </tr> |
|
64 | 64 | </tbody> |
|
65 | 65 | </table> |
|
66 | 66 | |
|
67 | 67 | <%= image_tag 'arrow_from' %> <%= l(:text_tip_task_begin_day) %><br /> |
|
68 | 68 | <%= image_tag 'arrow_to' %> <%= l(:text_tip_task_end_day) %><br /> |
|
69 | 69 | <%= image_tag 'arrow_bw' %> <%= l(:text_tip_task_begin_end_day) %><br /> No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now