mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-04 22:59:47 +00:00
remove spaces inside {} of app/models/time_entry_query.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20391 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
5115ff8b17
commit
37b9c54655
@ -40,50 +40,50 @@ class TimeEntryQuery < Query
|
||||
|
||||
def initialize(attributes=nil, *args)
|
||||
super attributes
|
||||
self.filters ||= { 'spent_on' => {:operator => "*", :values => []} }
|
||||
self.filters ||= {'spent_on' => {:operator => "*", :values => []}}
|
||||
end
|
||||
|
||||
def initialize_available_filters
|
||||
add_available_filter "spent_on", :type => :date_past
|
||||
add_available_filter(
|
||||
"project_id",
|
||||
:type => :list, :values => lambda { project_values }
|
||||
:type => :list, :values => lambda {project_values}
|
||||
) if project.nil?
|
||||
if project && !project.leaf?
|
||||
add_available_filter(
|
||||
"subproject_id",
|
||||
:type => :list_subprojects,
|
||||
:values => lambda { subproject_values })
|
||||
:values => lambda {subproject_values})
|
||||
end
|
||||
add_available_filter("issue_id", :type => :tree, :label => :label_issue)
|
||||
add_available_filter(
|
||||
"issue.tracker_id",
|
||||
:type => :list,
|
||||
:name => l("label_attribute_of_issue", :name => l(:field_tracker)),
|
||||
:values => lambda { trackers.map {|t| [t.name, t.id.to_s]} })
|
||||
:values => lambda {trackers.map {|t| [t.name, t.id.to_s]}})
|
||||
add_available_filter(
|
||||
"issue.status_id",
|
||||
:type => :list,
|
||||
:name => l("label_attribute_of_issue", :name => l(:field_status)),
|
||||
:values => lambda { issue_statuses_values })
|
||||
:values => lambda {issue_statuses_values})
|
||||
add_available_filter(
|
||||
"issue.fixed_version_id",
|
||||
:type => :list,
|
||||
:name => l("label_attribute_of_issue", :name => l(:field_fixed_version)),
|
||||
:values => lambda { fixed_version_values })
|
||||
:values => lambda {fixed_version_values})
|
||||
add_available_filter(
|
||||
"issue.category_id",
|
||||
:type => :list_optional,
|
||||
:name => l("label_attribute_of_issue", :name => l(:field_category)),
|
||||
:values => lambda { project.issue_categories.collect{|s| [s.name, s.id.to_s] } }
|
||||
:values => lambda {project.issue_categories.collect{|s| [s.name, s.id.to_s]}}
|
||||
) if project
|
||||
add_available_filter(
|
||||
"user_id",
|
||||
:type => :list_optional, :values => lambda { author_values }
|
||||
:type => :list_optional, :values => lambda {author_values}
|
||||
)
|
||||
add_available_filter(
|
||||
"author_id",
|
||||
:type => :list_optional, :values => lambda { author_values }
|
||||
:type => :list_optional, :values => lambda {author_values}
|
||||
)
|
||||
activities = (project ? project.activities : TimeEntryActivity.shared)
|
||||
add_available_filter(
|
||||
@ -94,7 +94,7 @@ class TimeEntryQuery < Query
|
||||
"project.status",
|
||||
:type => :list,
|
||||
:name => l(:label_attribute_of_project, :name => l(:field_status)),
|
||||
:values => lambda { project_statuses_values }
|
||||
:values => lambda {project_statuses_values}
|
||||
) if project.nil? || !project.leaf?
|
||||
|
||||
add_available_filter "comments", :type => :text
|
||||
@ -111,11 +111,11 @@ class TimeEntryQuery < Query
|
||||
|
||||
@available_columns = self.class.available_columns.dup
|
||||
@available_columns += time_entry_custom_fields.visible.
|
||||
map {|cf| QueryCustomFieldColumn.new(cf) }
|
||||
map {|cf| QueryCustomFieldColumn.new(cf)}
|
||||
@available_columns += issue_custom_fields.visible.
|
||||
map {|cf| QueryAssociationCustomFieldColumn.new(:issue, cf, :totalable => false) }
|
||||
map {|cf| QueryAssociationCustomFieldColumn.new(:issue, cf, :totalable => false)}
|
||||
@available_columns += project_custom_fields.visible.
|
||||
map {|cf| QueryAssociationCustomFieldColumn.new(:project, cf) }
|
||||
map {|cf| QueryAssociationCustomFieldColumn.new(:project, cf)}
|
||||
@available_columns
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user