"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "app/helpers/timelog_helper.rb" between
redmine-4.1.0.tar.gz and redmine-4.1.1.tar.gz

About: Redmine is a flexible project management and bug-tracking web application (using the Ruby on Rails framework). It supports also project wikis and forums, documents management, and multiple version control systems.

timelog_helper.rb  (redmine-4.1.0):timelog_helper.rb  (redmine-4.1.1)
skipping to change at line 47 skipping to change at line 47
collection << [ "--- #{l(:actionview_instancetag_blank_option)} ---", '' ] collection << [ "--- #{l(:actionview_instancetag_blank_option)} ---", '' ]
else else
collection << [ "--- #{l(:actionview_instancetag_blank_option)} ---", '' ] unless activities.detect(&:is_default) collection << [ "--- #{l(:actionview_instancetag_blank_option)} ---", '' ] unless activities.detect(&:is_default)
end end
activities.each { |a| collection << [a.name, a.id] } activities.each { |a| collection << [a.name, a.id] }
collection collection
end end
def user_collection_for_select_options(time_entry) def user_collection_for_select_options(time_entry)
collection = time_entry.assignable_users collection = time_entry.assignable_users
principals_options_for_select(collection, time_entry.user_id) collection << time_entry.user unless time_entry.user.nil? && !collection.inc
lude?(time_entry.user)
principals_options_for_select(collection, time_entry.user_id.to_s)
end end
def select_hours(data, criteria, value) def select_hours(data, criteria, value)
if value.to_s.empty? if value.to_s.empty?
data.select {|row| row[criteria].blank? } data.select {|row| row[criteria].blank? }
else else
data.select {|row| row[criteria].to_s == value.to_s} data.select {|row| row[criteria].to_s == value.to_s}
end end
end end
skipping to change at line 71 skipping to change at line 72
sum += row['hours'].to_f sum += row['hours'].to_f
end end
sum sum
end end
def format_criteria_value(criteria_options, value, html=true) def format_criteria_value(criteria_options, value, html=true)
if value.blank? if value.blank?
"[#{l(:label_none)}]" "[#{l(:label_none)}]"
elsif k = criteria_options[:klass] elsif k = criteria_options[:klass]
obj = k.find_by_id(value.to_i) obj = k.find_by_id(value.to_i)
format_object(obj, html) if obj.is_a?(Issue)
if obj.visible?
html ? link_to_issue(obj) : "#{obj.tracker} ##{obj.id}: #{obj.subject}
"
else
"##{obj.id}"
end
else
format_object(obj, html)
end
elsif cf = criteria_options[:custom_field] elsif cf = criteria_options[:custom_field]
format_value(value, cf) format_value(value, cf)
else else
value.to_s value.to_s
end end
end end
def report_to_csv(report) def report_to_csv(report)
Redmine::Export::CSV.generate(:encoding => params[:encoding]) do |csv| Redmine::Export::CSV.generate(:encoding => params[:encoding]) do |csv|
# Column headers # Column headers
 End of changes. 2 change blocks. 
2 lines changed or deleted 13 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)