Adds spent time to the activity view ().

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2877 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2009-09-12 10:37:49 +00:00
parent 563c927e13
commit 8faa66f68f
38 changed files with 44 additions and 3 deletions

View File

@ -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

View File

@ -806,3 +806,4 @@ bg:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -839,3 +839,4 @@ bs:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -809,3 +809,4 @@ ca:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -812,3 +812,4 @@ cs:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -839,3 +839,4 @@ da:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -838,3 +838,4 @@ de:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -812,3 +812,4 @@ el:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -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

View File

@ -859,3 +859,4 @@ es:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -849,3 +849,4 @@ fi:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -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

View File

@ -838,3 +838,4 @@ gl:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -821,3 +821,4 @@ he:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -844,3 +844,4 @@
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -824,3 +824,4 @@ it:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -846,3 +846,4 @@ ja:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -878,3 +878,4 @@ ko:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -849,3 +849,4 @@ lt:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -794,3 +794,4 @@ nl:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -811,3 +811,4 @@
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -842,3 +842,4 @@ pl:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -844,3 +844,4 @@ pt-BR:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -830,3 +830,4 @@ pt:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -809,3 +809,4 @@ ro:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -936,3 +936,4 @@ ru:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -811,3 +811,4 @@ sk:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -808,3 +808,4 @@ sl:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -832,3 +832,4 @@
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -866,3 +866,4 @@ sv:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -809,3 +809,4 @@ th:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -845,3 +845,4 @@ tr:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -808,3 +808,4 @@ uk:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -878,3 +878,4 @@ vi:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -916,3 +916,4 @@
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -841,3 +841,4 @@ zh:
label_group_plural: Groups
label_group: Group
label_group_new: New group
label_time_entry_plural: Spent time

View File

@ -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|

View File

@ -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); }