1
|
<h2><%=l(:label_activity)%>: <%= "#{month_name(@month).downcase} #{@year}" %></h2>
|
2
|
|
3
|
<% @events_by_day.keys.sort {|x,y| y <=> x }.each do |day| %>
|
4
|
<h3><%= day_name(day.cwday) %> <%= day.day %></h3>
|
5
|
<ul>
|
6
|
<% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| %>
|
7
|
<li><p><%= format_time(e.event_datetime, false) %> <%= link_to e.event_title[0,100], e.event_url %><br />
|
8
|
<% unless e.event_description.blank? %><em><%= e.event_description[0,500] %></em><br /><% end %>
|
9
|
<span class="author"><%= e.event_author if e.respond_to?(:event_author) %></span></p></li>
|
10
|
<% end %>
|
11
|
</ul>
|
12
|
<% end %>
|
13
|
|
14
|
<% if @events_by_day.empty? %><p class="nodata"><%= l(:label_no_data) %></p><% end %>
|
15
|
|
16
|
<div style="float:left;">
|
17
|
<% prev_params = params.clone.update :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1) %>
|
18
|
<%= link_to_remote ('« ' + (@month==1 ? "#{month_name(12)} #{@year-1}" : "#{month_name(@month-1)}")),
|
19
|
{:update => "content", :url => prev_params}, {:href => url_for(prev_params)} %>
|
20
|
</div>
|
21
|
<div style="float:right;">
|
22
|
<% next_params = params.clone.update :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1) %>
|
23
|
<%= link_to_remote ((@month==12 ? "#{month_name(1)} #{@year+1}" : "#{month_name(@month+1)}") + ' »'),
|
24
|
{:update => "content", :url => next_params}, {:href => url_for(next_params)} %>
|
25
|
|
26
|
</div>
|
27
|
<br />
|
28
|
|
29
|
<% content_for :header_tags do %>
|
30
|
<%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :year => nil, :month => nil, :key => User.current.rss_key})) %>
|
31
|
<% end %>
|
32
|
|
33
|
<% content_for :sidebar do %>
|
34
|
<% form_tag do %>
|
35
|
<h3><%= l(:label_activity) %></h3>
|
36
|
<p><% @event_types.each do |t| %>
|
37
|
<label><%= check_box_tag "show_#{t}", 1, @scope.include?(t) %> <%= l("label_#{t.singularize}_plural")%></label><br />
|
38
|
<% end %></p>
|
39
|
<p><%= submit_tag l(:button_apply), :class => 'button-small' %></p>
|
40
|
<% end %>
|
41
|
<% end %>
|
42
|
|
43
|
<% set_html_title l(:label_activity) -%>
|