##// END OF EJS Templates
Adds spent time to the activity view (#3809)....
Jean-Philippe Lang -
r2763:8faa66f68fb2
parent child
Show More
@@ -26,11 +26,15 class TimeEntry < ActiveRecord::Base
26 26 attr_protected :project_id, :user_id, :tyear, :tmonth, :tweek
27 27
28 28 acts_as_customizable
29 acts_as_event :title => Proc.new {|o| "#{o.user}: #{l_hours(o.hours)} (#{(o.issue || o.project).event_title})"},
30 :url => Proc.new {|o| {:controller => 'timelog', :action => 'details', :project_id => o.project}},
29 acts_as_event :title => Proc.new {|o| "#{l_hours(o.hours)} (#{(o.issue || o.project).event_title})"},
30 :url => Proc.new {|o| {:controller => 'timelog', :action => 'details', :project_id => o.project, :issue_id => o.issue}},
31 31 :author => :user,
32 32 :description => :comments
33
33
34 acts_as_activity_provider :timestamp => "#{table_name}.created_on",
35 :author_key => :user_id,
36 :find_options => {:include => :project}
37
34 38 validates_presence_of :user_id, :activity_id, :project_id, :hours, :spent_on
35 39 validates_numericality_of :hours, :allow_nil => true, :message => :invalid
36 40 validates_length_of :comments, :maximum => 255, :allow_nil => true
@@ -806,3 +806,4 bg:
806 806 label_group_plural: Groups
807 807 label_group: Group
808 808 label_group_new: New group
809 label_time_entry_plural: Spent time
@@ -839,3 +839,4 bs:
839 839 label_group_plural: Groups
840 840 label_group: Group
841 841 label_group_new: New group
842 label_time_entry_plural: Spent time
@@ -809,3 +809,4 ca:
809 809 label_group_plural: Groups
810 810 label_group: Group
811 811 label_group_new: New group
812 label_time_entry_plural: Spent time
@@ -812,3 +812,4 cs:
812 812 label_group_plural: Groups
813 813 label_group: Group
814 814 label_group_new: New group
815 label_time_entry_plural: Spent time
@@ -839,3 +839,4 da:
839 839 label_group_plural: Groups
840 840 label_group: Group
841 841 label_group_new: New group
842 label_time_entry_plural: Spent time
@@ -838,3 +838,4 de:
838 838 label_group_plural: Groups
839 839 label_group: Group
840 840 label_group_new: New group
841 label_time_entry_plural: Spent time
@@ -812,3 +812,4 el:
812 812 label_group_plural: Groups
813 813 label_group: Group
814 814 label_group_new: New group
815 label_time_entry_plural: Spent time
@@ -686,6 +686,7 en:
686 686 label_group: Group
687 687 label_group_plural: Groups
688 688 label_group_new: New group
689 label_time_entry_plural: Spent time
689 690
690 691 button_login: Login
691 692 button_submit: Submit
@@ -859,3 +859,4 es:
859 859 label_group_plural: Groups
860 860 label_group: Group
861 861 label_group_new: New group
862 label_time_entry_plural: Spent time
@@ -849,3 +849,4 fi:
849 849 label_group_plural: Groups
850 850 label_group: Group
851 851 label_group_new: New group
852 label_time_entry_plural: Spent time
@@ -711,6 +711,7 fr:
711 711 label_group_plural: Groupes
712 712 label_group: Groupe
713 713 label_group_new: Nouveau groupe
714 label_time_entry_plural: Temps passé
714 715
715 716 button_login: Connexion
716 717 button_submit: Soumettre
@@ -838,3 +838,4 gl:
838 838 label_group_plural: Groups
839 839 label_group: Group
840 840 label_group_new: New group
841 label_time_entry_plural: Spent time
@@ -821,3 +821,4 he:
821 821 label_group_plural: Groups
822 822 label_group: Group
823 823 label_group_new: New group
824 label_time_entry_plural: Spent time
@@ -844,3 +844,4
844 844 label_group_plural: Groups
845 845 label_group: Group
846 846 label_group_new: New group
847 label_time_entry_plural: Spent time
@@ -824,3 +824,4 it:
824 824 label_group_plural: Groups
825 825 label_group: Group
826 826 label_group_new: New group
827 label_time_entry_plural: Spent time
@@ -846,3 +846,4 ja:
846 846 label_group_plural: Groups
847 847 label_group: Group
848 848 label_group_new: New group
849 label_time_entry_plural: Spent time
@@ -878,3 +878,4 ko:
878 878 label_group_plural: Groups
879 879 label_group: Group
880 880 label_group_new: New group
881 label_time_entry_plural: Spent time
@@ -849,3 +849,4 lt:
849 849 label_group_plural: Groups
850 850 label_group: Group
851 851 label_group_new: New group
852 label_time_entry_plural: Spent time
@@ -794,3 +794,4 nl:
794 794 label_group_plural: Groups
795 795 label_group: Group
796 796 label_group_new: New group
797 label_time_entry_plural: Spent time
@@ -811,3 +811,4
811 811 label_group_plural: Groups
812 812 label_group: Group
813 813 label_group_new: New group
814 label_time_entry_plural: Spent time
@@ -842,3 +842,4 pl:
842 842 label_group_plural: Groups
843 843 label_group: Group
844 844 label_group_new: New group
845 label_time_entry_plural: Spent time
@@ -844,3 +844,4 pt-BR:
844 844 label_group_plural: Groups
845 845 label_group: Group
846 846 label_group_new: New group
847 label_time_entry_plural: Spent time
@@ -830,3 +830,4 pt:
830 830 label_group_plural: Groups
831 831 label_group: Group
832 832 label_group_new: New group
833 label_time_entry_plural: Spent time
@@ -809,3 +809,4 ro:
809 809 label_group_plural: Groups
810 810 label_group: Group
811 811 label_group_new: New group
812 label_time_entry_plural: Spent time
@@ -936,3 +936,4 ru:
936 936 label_group_plural: Groups
937 937 label_group: Group
938 938 label_group_new: New group
939 label_time_entry_plural: Spent time
@@ -811,3 +811,4 sk:
811 811 label_group_plural: Groups
812 812 label_group: Group
813 813 label_group_new: New group
814 label_time_entry_plural: Spent time
@@ -808,3 +808,4 sl:
808 808 label_group_plural: Groups
809 809 label_group: Group
810 810 label_group_new: New group
811 label_time_entry_plural: Spent time
@@ -832,3 +832,4
832 832 label_group_plural: Groups
833 833 label_group: Group
834 834 label_group_new: New group
835 label_time_entry_plural: Spent time
@@ -866,3 +866,4 sv:
866 866 label_group_plural: Groups
867 867 label_group: Group
868 868 label_group_new: New group
869 label_time_entry_plural: Spent time
@@ -809,3 +809,4 th:
809 809 label_group_plural: Groups
810 810 label_group: Group
811 811 label_group_new: New group
812 label_time_entry_plural: Spent time
@@ -845,3 +845,4 tr:
845 845 label_group_plural: Groups
846 846 label_group: Group
847 847 label_group_new: New group
848 label_time_entry_plural: Spent time
@@ -808,3 +808,4 uk:
808 808 label_group_plural: Groups
809 809 label_group: Group
810 810 label_group_new: New group
811 label_time_entry_plural: Spent time
@@ -878,3 +878,4 vi:
878 878 label_group_plural: Groups
879 879 label_group: Group
880 880 label_group_new: New group
881 label_time_entry_plural: Spent time
@@ -916,3 +916,4
916 916 label_group_plural: Groups
917 917 label_group: Group
918 918 label_group_new: New group
919 label_time_entry_plural: Spent time
@@ -841,3 +841,4 zh:
841 841 label_group_plural: Groups
842 842 label_group: Group
843 843 label_group_new: New group
844 label_time_entry_plural: Spent time
@@ -157,6 +157,7 Redmine::Activity.map do |activity|
157 157 activity.register :files, :class_name => 'Attachment'
158 158 activity.register :wiki_edits, :class_name => 'WikiContent::Version', :default => false
159 159 activity.register :messages, :default => false
160 activity.register :time_entries, :default => false
160 161 end
161 162
162 163 Redmine::WikiFormatting.map do |format|
@@ -244,6 +244,7 dt.wiki-page { background-image: url(../images/wiki_edit.png); }
244 244 dt.attachment { background-image: url(../images/attachment.png); }
245 245 dt.document { background-image: url(../images/document.png); }
246 246 dt.project { background-image: url(../images/projects.png); }
247 dt.time-entry { background-image: url(../images/time.png); }
247 248
248 249 #search-results dt.issue.closed { background-image: url(../images/ticket_checked.png); }
249 250
General Comments 0
You need to be logged in to leave comments. Login now