annotate app/views/projects/.svn/text-base/activity.rhtml.svn-base @ 0:513646585e45

* Import Redmine trunk SVN rev 3859
author Chris Cannam
date Fri, 23 Jul 2010 15:52:44 +0100
parents
children
rev   line source
Chris@0 1 <h2><%= @author.nil? ? l(:label_activity) : l(:label_user_activity, link_to_user(@author)) %></h2>
Chris@0 2 <p class="subtitle"><%= l(:label_date_from_to, :start => format_date(@date_to - @days), :end => format_date(@date_to-1)) %></p>
Chris@0 3
Chris@0 4 <div id="activity">
Chris@0 5 <% @events_by_day.keys.sort.reverse.each do |day| %>
Chris@0 6 <h3><%= format_activity_day(day) %></h3>
Chris@0 7 <dl>
Chris@0 8 <% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%>
Chris@0 9 <dt class="<%= e.event_type %> <%= User.current.logged? && e.respond_to?(:event_author) && User.current == e.event_author ? 'me' : nil %>">
Chris@0 10 <%= avatar(e.event_author, :size => "24") if e.respond_to?(:event_author) %>
Chris@0 11 <span class="time"><%= format_time(e.event_datetime, false) %></span>
Chris@0 12 <%= content_tag('span', h(e.project), :class => 'project') if @project.nil? || @project != e.project %>
Chris@0 13 <%= link_to format_activity_title(e.event_title), e.event_url %></dt>
Chris@0 14 <dd><span class="description"><%= format_activity_description(e.event_description) %></span>
Chris@0 15 <span class="author"><%= e.event_author if e.respond_to?(:event_author) %></span></dd>
Chris@0 16 <% end -%>
Chris@0 17 </dl>
Chris@0 18 <% end -%>
Chris@0 19 </div>
Chris@0 20
Chris@0 21 <%= content_tag('p', l(:label_no_data), :class => 'nodata') if @events_by_day.empty? %>
Chris@0 22
Chris@0 23 <div style="float:left;">
Chris@0 24 <%= link_to_remote(('&#171; ' + l(:label_previous)),
Chris@0 25 {:update => "content", :url => params.merge(:from => @date_to - @days - 1), :method => :get, :complete => 'window.scrollTo(0,0)'},
Chris@0 26 {:href => url_for(params.merge(:from => @date_to - @days - 1)),
Chris@0 27 :title => l(:label_date_from_to, :start => format_date(@date_to - 2*@days), :end => format_date(@date_to - @days - 1))}) %>
Chris@0 28 </div>
Chris@0 29 <div style="float:right;">
Chris@0 30 <%= link_to_remote((l(:label_next) + ' &#187;'),
Chris@0 31 {:update => "content", :url => params.merge(:from => @date_to + @days - 1), :method => :get, :complete => 'window.scrollTo(0,0)'},
Chris@0 32 {:href => url_for(params.merge(:from => @date_to + @days - 1)),
Chris@0 33 :title => l(:label_date_from_to, :start => format_date(@date_to), :end => format_date(@date_to + @days - 1))}) unless @date_to >= Date.today %>
Chris@0 34 </div>
Chris@0 35 &nbsp;
Chris@0 36 <% other_formats_links do |f| %>
Chris@0 37 <%= f.link_to 'Atom', :url => params.merge(:from => nil, :key => User.current.rss_key) %>
Chris@0 38 <% end %>
Chris@0 39
Chris@0 40 <% content_for :header_tags do %>
Chris@0 41 <%= auto_discovery_link_tag(:atom, params.merge(:format => 'atom', :from => nil, :key => User.current.rss_key)) %>
Chris@0 42 <% end %>
Chris@0 43
Chris@0 44 <% content_for :sidebar do %>
Chris@0 45 <% form_tag({}, :method => :get) do %>
Chris@0 46 <h3><%= l(:label_activity) %></h3>
Chris@0 47 <p><% @activity.event_types.each do |t| %>
Chris@0 48 <%= check_box_tag "show_#{t}", 1, @activity.scope.include?(t) %>
Chris@0 49 <%= link_to(l("label_#{t.singularize}_plural"), {"show_#{t}" => 1, :user_id => params[:user_id]})%>
Chris@0 50 <br />
Chris@0 51 <% end %></p>
Chris@0 52 <% if @project && @project.descendants.active.any? %>
Chris@0 53 <%= hidden_field_tag 'with_subprojects', 0 %>
Chris@0 54 <p><label><%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%></label></p>
Chris@0 55 <% end %>
Chris@0 56 <%= hidden_field_tag('user_id', params[:user_id]) unless params[:user_id].blank? %>
Chris@0 57 <p><%= submit_tag l(:button_apply), :class => 'button-small', :name => nil %></p>
Chris@0 58 <% end %>
Chris@0 59 <% end %>
Chris@0 60
Chris@0 61 <% html_title(l(:label_activity), @author) -%>