return << me >> as an available value when we need users

git-svn-id: https://dev.finn.de/svn/cockpit/branches/reporting_merge@1260 7926756e-e54e-46e6-9721-ed318f58905e
pull/6827/head
p.tessenow 15 years ago
parent 5cae908287
commit 2f363264bf
  1. 4
      app/models/cost_query/filter/user_id.rb

@ -2,6 +2,8 @@ class CostQuery::Filter::UserId < CostQuery::Filter::Base
label :field_user label :field_user
def self.available_values def self.available_values
User.all.map { |u| [u.name, u.id] } values = User.all.map { |u| [u.name, u.id] }
values.unshift ["<< #{l(:label_me)} >>", User.current.id.to_s] if User.current.logged?
values
end end
end end

Loading…
Cancel
Save