Commit 2d900748 authored by jplang's avatar jplang

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
......@@ -811,3 +811,4 @@
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -842,3 +842,4 @@ pl:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -844,3 +844,4 @@ pt-BR:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -830,3 +830,4 @@ pt:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -809,3 +809,4 @@ ro:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -936,3 +936,4 @@ ru:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -811,3 +811,4 @@ sk:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -808,3 +808,4 @@ sl:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -832,3 +832,4 @@
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -866,3 +866,4 @@ sv:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -809,3 +809,4 @@ th:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -845,3 +845,4 @@ tr:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -808,3 +808,4 @@ uk:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -878,3 +878,4 @@ vi:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -916,3 +916,4 @@
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -841,3 +841,4 @@ zh:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time
......@@ -157,6 +157,7 @@ Redmine::Activity.map do |activity|
activity.register :files, :class_name => 'Attachment'
activity.register :wiki_edits, :class_name => 'WikiContent::Version', :default => false
activity.register :messages, :default => false
activity.register :time_entries, :default => false
end
Redmine::WikiFormatting.map do |format|
......
......@@ -244,6 +244,7 @@ dt.wiki-page { background-image: url(../images/wiki_edit.png); }
dt.attachment { background-image: url(../images/attachment.png); }
dt.document { background-image: url(../images/document.png); }
dt.project { background-image: url(../images/projects.png); }
dt.time-entry { background-image: url(../images/time.png); }
#search-results dt.issue.closed { background-image: url(../images/ticket_checked.png); }
......
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