added special (formerly missing) case if user disabled the display of both cost entries AND time entries

fixed generation of drill down display settings

git-svn-id: https://dev.finn.de/svn/cockpit/trunk@254 7926756e-e54e-46e6-9721-ed318f58905e
pull/6827/head
hjust 15 years ago
parent 029a629a19
commit e2f02d8e44
  1. 5
      app/controllers/cost_reports_controller.rb
  2. 6
      app/views/cost_reports/_list_group_by.rhtml

@ -242,6 +242,11 @@ private
:limit => limit,
:offset => @entry_pages.current.offset}
return
elsif !@query.display_time_entries && !@query.display_time_entries
@entry_sum, @entry_count = [0 , 0]
@entry_pages = Paginator.new self, @entry_count, limit, params['page']
@entries = []
return
end
@entry_count = time_entry_count + cost_entry_count

@ -2,10 +2,10 @@
def display_js(invert=false)
group_by_column = CostQuery.group_by_columns[@query.group_by[:name]]
return "Form.serialize('filter-options')" unless group_by_column[:scope] == :costs
return "'' + Form.serialize('filter-options')" unless group_by_column[:scope] == :costs
display_costs = (CostEntry.column_names.include? group_by_column[:db_field].to_s && @query.display_cost_entries)
display_time = (TimeEntry.column_names.include? group_by_column[:db_field].to_s && @query.display_time_entries)
display_costs = ((CostEntry.column_names.include? group_by_column[:db_field].to_s) && @query.display_cost_entries)
display_time = ((TimeEntry.column_names.include? group_by_column[:db_field].to_s) && @query.display_time_entries)
if invert
display_costs = !display_costs

Loading…
Cancel
Save