Project

General

Profile

Feature #2471 » patch-2471.diff

Go MAEDA, 2014-06-26 03:39

View differences:

app/controllers/my_controller.rb (working copy)
30 30
             'news' => :label_news_latest,
31 31
             'calendar' => :label_calendar,
32 32
             'documents' => :label_document_plural,
33
             'timelog' => :label_spent_time
33
             'timelog' => :label_spent_time,
34
             'my_activity' => :label_my_activity
34 35
           }.merge(Redmine::Views::MyPage::Block.additional_blocks).freeze
35 36

  
36 37
  DEFAULT_LAYOUT = {  'left' => ['issuesassignedtome'],
app/views/my/blocks/_my_activity.html.erb (working copy)
1
<%
2
  current_user = User.current
3
  events = Redmine::Activity::Fetcher.new(current_user, :author => current_user).events(nil, nil, :limit => 10)
4
  events_by_day = events.group_by(&:event_date)
5
%>
6
<h3>
7
  <%= link_to l(:label_my_activity),
8
    :controller => 'activities', :action => 'index', :id => nil, :user_id => current_user, :from => events_by_day.keys.first %>
9
</h3>
10

  
11
<div id="activity">
12
<% events_by_day.keys.sort.reverse.each do |day| %>
13
<h4><%= format_activity_day(day) %></h4>
14
<dl>
15
<% events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%>
16
  <dt class="<%= e.event_type %>">
17
  <span class="time"><%= format_time(e.event_datetime, false) %></span>
18
  <%= content_tag('span', h(e.project), :class => 'project') %>
19
  <%= link_to format_activity_title(e.event_title), e.event_url %></dt>
20
  <dd><span class="description"><%= format_activity_description(e.event_description) %></span></dd>
21
<% end -%>
22
</dl>
23
<% end -%>
24
</div>
config/locales/en.yml (working copy)
555 555
  label_help: Help
556 556
  label_reported_issues: Reported issues
557 557
  label_assigned_to_me_issues: Issues assigned to me
558
  label_my_activity: My activity
558 559
  label_last_login: Last connection
559 560
  label_registered_on: Registered on
560 561
  label_activity: Activity
(1-1/5)