@@ -1,48 +1,48 | |||||
1 | <h2><%=l(:label_activity)%>: <%= "#{month_name(@month).downcase} #{@year}" %></h2> |
|
1 | <h2><%=l(:label_activity)%>: <%= "#{month_name(@month).downcase} #{@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 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 ('« ' + (@month==1 ? "#{month_name(12)} #{@year-1}" : "#{month_name(@month-1)}")), |
|
23 | <%= link_to_remote ('« ' + (@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)}") + ' »'), |
|
28 | <%= link_to_remote ((@month==12 ? "#{month_name(1)} #{@year+1}" : "#{month_name(@month+1)}") + ' »'), | |
29 | {:update => "content", :url => next_params}, {:href => url_for(next_params)} %> |
|
29 | {:update => "content", :url => next_params}, {:href => url_for(next_params)} %> | |
30 | |
|
30 | | |
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)) -%> |
General Comments 0
You need to be logged in to leave comments.
Login now