Index: app/views/time_entry_reports/report.rhtml =================================================================== --- app/views/time_entry_reports/report.rhtml (révision 243) +++ app/views/time_entry_reports/report.rhtml (révision 253) @@ -15,7 +15,11 @@ end -%> <%= render :partial => 'timelog/date_range' %> - +<% + criterias_options = (@available_criterias.keys - @criterias).collect{|k| [l_or_humanize(@available_criterias[k][:label]), k]} + criterias_options.sort!{ |x, y| x[0] <=> y[0] } + criterias_options = [[]] + criterias_options +-%>
<%= l(:label_details) %>: <%= select_tag 'periodicity', options_for_select([[l(:label_year), 'year'], [l(:label_month), 'month'], @@ -23,7 +27,7 @@ [l(:label_day_plural).titleize, 'day']], @periodicity), :onchange => "this.form.onsubmit();" %> - <%= l(:button_add) %>: <%= select_tag('criterias[]', options_for_select([[]] + (@available_criterias.keys - @criterias).collect{|k| [l_or_humanize(@available_criterias[k][:label]), k]}), + <%= l(:button_add) %>: <%= select_tag('criterias[]', options_for_select(criterias_options), :onchange => "this.form.submit();", :style => 'width: 200px', :id => nil,