Project

General

Profile

Patch #4705 » 5_criterias_for_timelog_report.patch

Frédéric Moulins, 2010-02-01 13:27

View differences:

app/controllers/timelog_controller.rb (copie de travail)
71 71
    @criterias = params[:criterias] || []
72 72
    @criterias = @criterias.select{|criteria| @available_criterias.has_key? criteria}
73 73
    @criterias.uniq!
74
    @criterias = @criterias[0,3]
74
    @criterias = @criterias[0,5]
75 75
    
76 76
    @columns = (params[:columns] && %w(year month week day).include?(params[:columns])) ? params[:columns] : 'month'
77 77
    
app/views/timelog/report.rhtml (copie de travail)
23 23
                                                          :onchange => "this.form.onsubmit();",
24 24
                                                          :style => 'width: 200px',
25 25
                                                          :id => nil,
26
                                                          :disabled => (@criterias.length >= 3)) %>
26
                                                          :disabled => (@criterias.length >= 5)) %>
27 27
     <%= link_to_remote l(:button_clear), {:url => {:project_id => @project, :period_type => params[:period_type], :period => params[:period], :from => @from, :to => @to, :columns => @columns},
28 28
                                           :update => 'content'
29 29
                                          }, :class => 'icon icon-reload' %></p>
    (1-1/1)