Project

General

Profile

Feature #4138 » rm4138-make_time_entries_searchable-trunk_12160.diff

Mischa The Evil, 2013-09-24 22:55

View differences:

lib/redmine.rb (working copy)
274 274
  search.register :changesets
275 275
  search.register :wiki_pages
276 276
  search.register :messages
277
  search.register :time_entries
277 278
  search.register :projects
278 279
end
279 280

  
app/models/time_entry.rb (working copy)
27 27
  attr_protected :project_id, :user_id, :tyear, :tmonth, :tweek
28 28

  
29 29
  acts_as_customizable
30
  acts_as_searchable :columns => 'comments'
30 31
  acts_as_event :title => Proc.new {|o| "#{l_hours(o.hours)} (#{(o.issue || o.project).event_title})"},
31 32
                :url => Proc.new {|o| {:controller => 'timelog', :action => 'index', :project_id => o.project, :issue_id => o.issue}},
32 33
                :author => :user,
app/controllers/timelog_controller.rb (working copy)
17 17

  
18 18
class TimelogController < ApplicationController
19 19
  menu_item :issues
20
  default_search_scope :time_entries
20 21

  
21 22
  before_filter :find_project_for_new_time_entry, :only => [:create]
22 23
  before_filter :find_time_entry, :only => [:show, :edit, :update]
(1-1/4)