##// END OF EJS Templates
Slight changes to calendar and activity h2 titles....
Jean-Philippe Lang -
r1133:377a45ae1adc
parent child
Show More
@@ -1,48 +1,48
1 <h2><%=l(:label_activity)%>: <%= "#{month_name(@month).downcase} #{@year}" %></h2>
1 <h2><%= "#{month_name(@month)} #{@year}" %></h2>
2
2
3 <div id="activity">
3 <div id="activity">
4 <% @events_by_day.keys.sort {|x,y| y <=> x }.each do |day| %>
4 <% @events_by_day.keys.sort {|x,y| y <=> x }.each do |day| %>
5 <h3><%= day_name(day.cwday) %> <%= day.day %></h3>
5 <h3><%= day_name(day.cwday) %> <%= day.day %></h3>
6 <dl>
6 <dl>
7 <% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%>
7 <% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%>
8 <dt class="<%= e.class.name.downcase %>"><span class="time"><%= format_time(e.event_datetime, false) %></span>
8 <dt class="<%= e.class.name.downcase %>"><span class="time"><%= format_time(e.event_datetime, false) %></span>
9 <%= link_to h(truncate(e.event_title, 100)), e.event_url %></dt>
9 <%= link_to h(truncate(e.event_title, 100)), e.event_url %></dt>
10 <dd><% unless e.event_description.blank? -%>
10 <dd><% unless e.event_description.blank? -%>
11 <span class="description"><%= format_activity_description(e.event_description) %></span><br />
11 <span class="description"><%= format_activity_description(e.event_description) %></span><br />
12 <% end %>
12 <% end %>
13 <span class="author"><%= e.event_author if e.respond_to?(:event_author) %></span></dd>
13 <span class="author"><%= e.event_author if e.respond_to?(:event_author) %></span></dd>
14 <% end -%>
14 <% end -%>
15 </dl>
15 </dl>
16 <% end -%>
16 <% end -%>
17 </div>
17 </div>
18
18
19 <%= content_tag('p', l(:label_no_data), :class => 'nodata') if @events_by_day.empty? %>
19 <%= content_tag('p', l(:label_no_data), :class => 'nodata') if @events_by_day.empty? %>
20
20
21 <div style="float:left;">
21 <div style="float:left;">
22 <% prev_params = params.clone.update :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1) %>
22 <% prev_params = params.clone.update :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1) %>
23 <%= link_to_remote ('&#171; ' + (@month==1 ? "#{month_name(12)} #{@year-1}" : "#{month_name(@month-1)}")),
23 <%= link_to_remote ('&#171; ' + (@month==1 ? "#{month_name(12)} #{@year-1}" : "#{month_name(@month-1)}")),
24 {:update => "content", :url => prev_params}, {:href => url_for(prev_params)} %>
24 {:update => "content", :url => prev_params}, {:href => url_for(prev_params)} %>
25 </div>
25 </div>
26 <div style="float:right;">
26 <div style="float:right;">
27 <% next_params = params.clone.update :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1) %>
27 <% next_params = params.clone.update :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1) %>
28 <%= link_to_remote ((@month==12 ? "#{month_name(1)} #{@year+1}" : "#{month_name(@month+1)}") + ' &#187;'),
28 <%= link_to_remote ((@month==12 ? "#{month_name(1)} #{@year+1}" : "#{month_name(@month+1)}") + ' &#187;'),
29 {:update => "content", :url => next_params}, {:href => url_for(next_params)} %>
29 {:update => "content", :url => next_params}, {:href => url_for(next_params)} %>
30 &nbsp;
30 &nbsp;
31 </div>
31 </div>
32 <br />
32 <br />
33
33
34 <% content_for :header_tags do %>
34 <% content_for :header_tags do %>
35 <%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :year => nil, :month => nil, :key => User.current.rss_key})) %>
35 <%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :year => nil, :month => nil, :key => User.current.rss_key})) %>
36 <% end %>
36 <% end %>
37
37
38 <% content_for :sidebar do %>
38 <% content_for :sidebar do %>
39 <% form_tag do %>
39 <% form_tag do %>
40 <h3><%= l(:label_activity) %></h3>
40 <h3><%= l(:label_activity) %></h3>
41 <p><% @event_types.each do |t| %>
41 <p><% @event_types.each do |t| %>
42 <label><%= check_box_tag "show_#{t}", 1, @scope.include?(t) %> <%= l("label_#{t.singularize}_plural")%></label><br />
42 <label><%= check_box_tag "show_#{t}", 1, @scope.include?(t) %> <%= l("label_#{t.singularize}_plural")%></label><br />
43 <% end %></p>
43 <% end %></p>
44 <p><%= submit_tag l(:button_apply), :class => 'button-small' %></p>
44 <p><%= submit_tag l(:button_apply), :class => 'button-small' %></p>
45 <% end %>
45 <% end %>
46 <% end %>
46 <% end %>
47
47
48 <% html_title(l(:label_activity)) -%>
48 <% html_title(l(:label_activity)) -%>
@@ -1,42 +1,42
1 <% cache(:year => @year, :month => @month, :tracker_ids => @selected_tracker_ids, :subprojects => params[:with_subprojects], :lang => current_language) do %>
1 <% cache(:year => @year, :month => @month, :tracker_ids => @selected_tracker_ids, :subprojects => params[:with_subprojects], :lang => current_language) do %>
2 <h2><%= l(:label_calendar) %>: <%= "#{month_name(@month).downcase} #{@year}" %></h2>
2 <h2><%= "#{month_name(@month)} #{@year}" %></h2>
3
3
4 <table width="100%">
4 <table width="100%">
5 <tr><td align="left">
5 <tr><td align="left">
6 <%= link_to_remote ('&#171; ' + (@month==1 ? "#{month_name(12)} #{@year-1}" : "#{month_name(@month-1)}")),
6 <%= link_to_remote ('&#171; ' + (@month==1 ? "#{month_name(12)} #{@year-1}" : "#{month_name(@month-1)}")),
7 {:update => "content", :url => { :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1), :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects] }},
7 {:update => "content", :url => { :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1), :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects] }},
8 {:href => url_for(:action => 'calendar', :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1), :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects])}
8 {:href => url_for(:action => 'calendar', :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1), :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects])}
9 %>
9 %>
10 </td><td align="right">
10 </td><td align="right">
11 <%= link_to_remote ((@month==12 ? "#{month_name(1)} #{@year+1}" : "#{month_name(@month+1)}") + ' &#187;'),
11 <%= link_to_remote ((@month==12 ? "#{month_name(1)} #{@year+1}" : "#{month_name(@month+1)}") + ' &#187;'),
12 {:update => "content", :url => { :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1), :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects] }},
12 {:update => "content", :url => { :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1), :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects] }},
13 {:href => url_for(:action => 'calendar', :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1), :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects])}
13 {:href => url_for(:action => 'calendar', :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1), :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects])}
14 %>
14 %>
15 </td></tr>
15 </td></tr>
16 </table>
16 </table>
17
17
18 <%= render :partial => 'common/calendar', :locals => {:calendar => @calendar} %>
18 <%= render :partial => 'common/calendar', :locals => {:calendar => @calendar} %>
19
19
20 <%= image_tag 'arrow_from.png' %>&nbsp;&nbsp;<%= l(:text_tip_task_begin_day) %><br />
20 <%= image_tag 'arrow_from.png' %>&nbsp;&nbsp;<%= l(:text_tip_task_begin_day) %><br />
21 <%= image_tag 'arrow_to.png' %>&nbsp;&nbsp;<%= l(:text_tip_task_end_day) %><br />
21 <%= image_tag 'arrow_to.png' %>&nbsp;&nbsp;<%= l(:text_tip_task_end_day) %><br />
22 <%= image_tag 'arrow_bw.png' %>&nbsp;&nbsp;<%= l(:text_tip_task_begin_end_day) %><br />
22 <%= image_tag 'arrow_bw.png' %>&nbsp;&nbsp;<%= l(:text_tip_task_begin_end_day) %><br />
23 <% end %>
23 <% end %>
24
24
25 <% content_for :sidebar do %>
25 <% content_for :sidebar do %>
26 <h3><%= l(:label_calendar) %></h3>
26 <h3><%= l(:label_calendar) %></h3>
27
27
28 <% form_tag() do %>
28 <% form_tag() do %>
29 <p><%= select_month(@month, :prefix => "month", :discard_type => true) %>
29 <p><%= select_month(@month, :prefix => "month", :discard_type => true) %>
30 <%= select_year(@year, :prefix => "year", :discard_type => true) %></p>
30 <%= select_year(@year, :prefix => "year", :discard_type => true) %></p>
31
31
32 <% @trackers.each do |tracker| %>
32 <% @trackers.each do |tracker| %>
33 <label><%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %> <%= tracker.name %></label><br />
33 <label><%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %> <%= tracker.name %></label><br />
34 <% end %>
34 <% end %>
35 <% if @project.active_children.any? %>
35 <% if @project.active_children.any? %>
36 <br /><label><%= check_box_tag "with_subprojects", 1, params[:with_subprojects] %> <%=l(:label_subproject_plural)%></label>
36 <br /><label><%= check_box_tag "with_subprojects", 1, params[:with_subprojects] %> <%=l(:label_subproject_plural)%></label>
37 <% end %>
37 <% end %>
38 <p><%= submit_tag l(:button_apply), :class => 'button-small' %></p>
38 <p><%= submit_tag l(:button_apply), :class => 'button-small' %></p>
39 <% end %>
39 <% end %>
40 <% end %>
40 <% end %>
41
41
42 <% html_title(l(:label_calendar)) -%>
42 <% html_title(l(:label_calendar)) -%>
General Comments 0
You need to be logged in to leave comments. Login now