annotate app/views/activities/.svn/text-base/index.html.erb.svn-base @ 307:c7d3b58bd01c feature_117

Produce a single en.yml which contains British texts but describes itself as just English. The difference between en and en-GB is minimal for this application, apart from date formats, and the pain in maintaining both is significant. See #117 and #58.
author Chris Cannam
date Mon, 28 Mar 2011 17:41:07 +0100
parents 40f7cfd4df19
children cbce1fd3b1b7
rev   line source
chris@22 1 <h2><%= @author.nil? ? l(:label_activity) : l(:label_user_activity, link_to_user(@author)) %></h2>
chris@22 2 <p class="subtitle"><%= l(:label_date_from_to, :start => format_date(@date_to - @days), :end => format_date(@date_to-1)) %></p>
chris@22 3
chris@22 4 <div id="activity">
chris@22 5 <% @events_by_day.keys.sort.reverse.each do |day| %>
chris@22 6 <h3><%= format_activity_day(day) %></h3>
chris@22 7 <dl>
chris@22 8 <% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%>
chris@22 9 <dt class="<%= e.event_type %> <%= User.current.logged? && e.respond_to?(:event_author) && User.current == e.event_author ? 'me' : nil %>">
chris@22 10 <%= avatar(e.event_author, :size => "24") if e.respond_to?(:event_author) %>
chris@22 11 <span class="time"><%= format_time(e.event_datetime, false) %></span>
chris@22 12 <%= content_tag('span', h(e.project), :class => 'project') if @project.nil? || @project != e.project %>
chris@22 13 <%= link_to format_activity_title(e.event_title), e.event_url %></dt>
chris@22 14 <dd><span class="description"><%= format_activity_description(e.event_description) %></span>
chris@22 15 <span class="author"><%= e.event_author if e.respond_to?(:event_author) %></span></dd>
chris@22 16 <% end -%>
chris@22 17 </dl>
chris@22 18 <% end -%>
chris@22 19 </div>
chris@22 20
chris@22 21 <%= content_tag('p', l(:label_no_data), :class => 'nodata') if @events_by_day.empty? %>
chris@22 22
chris@22 23 <div style="float:left;">
chris@22 24 <%= link_to_remote(('&#171; ' + l(:label_previous)),
chris@22 25 {:update => "content", :url => params.merge(:from => @date_to - @days - 1), :method => :get, :complete => 'window.scrollTo(0,0)'},
chris@22 26 {:href => url_for(params.merge(:from => @date_to - @days - 1)),
chris@22 27 :title => l(:label_date_from_to, :start => format_date(@date_to - 2*@days), :end => format_date(@date_to - @days - 1))}) %>
chris@22 28 </div>
chris@22 29 <div style="float:right;">
chris@22 30 <%= link_to_remote((l(:label_next) + ' &#187;'),
chris@22 31 {:update => "content", :url => params.merge(:from => @date_to + @days - 1), :method => :get, :complete => 'window.scrollTo(0,0)'},
chris@22 32 {:href => url_for(params.merge(:from => @date_to + @days - 1)),
chris@22 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@22 34 </div>
chris@22 35 &nbsp;
chris@22 36 <% other_formats_links do |f| %>
chris@22 37 <%= f.link_to 'Atom', :url => params.merge(:from => nil, :key => User.current.rss_key) %>
chris@22 38 <% end %>
chris@22 39
chris@22 40 <% content_for :header_tags do %>
chris@22 41 <%= auto_discovery_link_tag(:atom, params.merge(:format => 'atom', :from => nil, :key => User.current.rss_key)) %>
chris@22 42 <% end %>
chris@22 43
chris@22 44 <% content_for :sidebar do %>
chris@22 45 <% form_tag({}, :method => :get) do %>
chris@22 46 <h3><%= l(:label_activity) %></h3>
chris@22 47 <p><% @activity.event_types.each do |t| %>
chris@22 48 <%= check_box_tag "show_#{t}", 1, @activity.scope.include?(t) %>
chris@22 49 <%= link_to(l("label_#{t.singularize}_plural"), {"show_#{t}" => 1, :user_id => params[:user_id]})%>
chris@22 50 <br />
chris@22 51 <% end %></p>
chris@22 52 <% if @project && @project.descendants.active.any? %>
chris@22 53 <%= hidden_field_tag 'with_subprojects', 0 %>
chris@22 54 <p><label><%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%></label></p>
chris@22 55 <% end %>
chris@22 56 <%= hidden_field_tag('user_id', params[:user_id]) unless params[:user_id].blank? %>
chris@22 57 <p><%= submit_tag l(:button_apply), :class => 'button-small', :name => nil %></p>
chris@22 58 <% end %>
chris@22 59 <% end %>
chris@22 60
chris@22 61 <% html_title(l(:label_activity), @author) -%>