Commit 2d900748 authored by jplang's avatar jplang
Browse files

Adds spent time to the activity view (#3809).

git-svn-id: https://svn.redmine.org/redmine/trunk@2877 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 7c4623d6
......@@ -26,11 +26,15 @@ class TimeEntry < ActiveRecord::Base
attr_protected :project_id, :user_id, :tyear, :tmonth, :tweek
acts_as_customizable
acts_as_event :title => Proc.new {|o| "#{o.user}: #{l_hours(o.hours)} (#{(o.issue || o.project).event_title})"},
:url => Proc.new {|o| {:controller => 'timelog', :action => 'details', :project_id => o.project}},
acts_as_event :title => Proc.new {|o| "#{l_hours(o.hours)} (#{(o.issue || o.project).event_title})"},
:url => Proc.new {|o| {:controller => 'timelog', :action => 'details', :project_id => o.project, :issue_id => o.issue}},
:author => :user,
:description => :comments
acts_as_activity_provider :timestamp => "#{table_name}.created_on",
:author_key => :user_id,
:find_options => {:include => :project}
validates_presence_of :user_id, :activity_id, :project_id, :hours, :spent_on
validates_numericality_of :hours, :allow_nil => true, :message => :invalid
validates_length_of :comments, :maximum => 255, :allow_nil => true
......
......@@ -806,3 +806,4 @@ bg:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -839,3 +839,4 @@ bs:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -809,3 +809,4 @@ ca:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -812,3 +812,4 @@ cs:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -839,3 +839,4 @@ da:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -838,3 +838,4 @@ de:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -812,3 +812,4 @@ el:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -686,6 +686,7 @@ en:
label_group: Group
label_group_plural: Groups
label_group_new: New group
label_time_entry_plural: Spent time
button_login: Login
button_submit: Submit
......
......@@ -859,3 +859,4 @@ es:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -849,3 +849,4 @@ fi:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -711,6 +711,7 @@ fr:
label_group_plural: Groupes
label_group: Groupe
label_group_new: Nouveau groupe
label_time_entry_plural: Temps passé
button_login: Connexion
button_submit: Soumettre
......
......@@ -838,3 +838,4 @@ gl:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -821,3 +821,4 @@ he:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -844,3 +844,4 @@
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -824,3 +824,4 @@ it:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -846,3 +846,4 @@ ja:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -878,3 +878,4 @@ ko:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -849,3 +849,4 @@ lt:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -794,3 +794,4 @@ nl:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment