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)
search.register :changesets
search.register :wiki_pages
search.register :messages
search.register :time_entries
search.register :projects
end
app/models/time_entry.rb (working copy)
attr_protected :project_id, :user_id, :tyear, :tmonth, :tweek
acts_as_customizable
acts_as_searchable :columns => 'comments'
acts_as_event :title => Proc.new {|o| "#{l_hours(o.hours)} (#{(o.issue || o.project).event_title})"},
:url => Proc.new {|o| {:controller => 'timelog', :action => 'index', :project_id => o.project, :issue_id => o.issue}},
:author => :user,
app/controllers/timelog_controller.rb (working copy)
class TimelogController < ApplicationController
menu_item :issues
default_search_scope :time_entries
before_filter :find_project_for_new_time_entry, :only => [:create]
before_filter :find_time_entry, :only => [:show, :edit, :update]
(1-1/4)