Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <div class="contextual">
  2. <%= link_to_if_authorized l(:button_log_time), {:controller => 'timelog', :action => 'edit', :project_id => @project, :issue_id => @issue}, :class => 'icon icon-time' %>
  3. </div>
  4. <h2><%= l(:label_spent_time) %></h2>
  5. <% form_remote_tag(:url => {}, :update => 'content') do %>
  6. <% @criterias.each do |criteria| %>
  7. <%= hidden_field_tag 'criterias[]', criteria, :id => nil %>
  8. <% end %>
  9. <%= hidden_field_tag 'project_id', params[:project_id] %>
  10. <%= render :partial => 'date_range' %>
  11. <p><%= l(:label_details) %>: <%= select_tag 'columns', options_for_select([[l(:label_year), 'year'],
  12. [l(:label_month), 'month'],
  13. [l(:label_week), 'week'],
  14. [l(:label_day_plural).titleize, 'day']], @columns),
  15. :onchange => "this.form.onsubmit();" %>
  16. <%= l(:button_add) %>: <%= select_tag('criterias[]', options_for_select([[]] + (@available_criterias.keys - @criterias).collect{|k| [l(@available_criterias[k][:label]), k]}),
  17. :onchange => "this.form.onsubmit();",
  18. :style => 'width: 200px',
  19. :id => nil,
  20. :disabled => (@criterias.length >= 3)) %>
  21. <%= link_to_remote l(:button_clear), {:url => {:project_id => @project, :period_type => params[:period_type], :period => params[:period], :from => @from, :to => @to, :columns => @columns},
  22. :update => 'content'
  23. }, :class => 'icon icon-reload' %></p>
  24. <% end %>
  25. <% unless @criterias.empty? %>
  26. <div class="total-hours">
  27. <p><%= l(:label_total) %>: <%= html_hours(lwr(:label_f_hour, @total_hours)) %></p>
  28. </div>
  29. <% unless @hours.empty? %>
  30. <table class="list" id="time-report">
  31. <thead>
  32. <tr>
  33. <% @criterias.each do |criteria| %>
  34. <th><%= l(@available_criterias[criteria][:label]) %></th>
  35. <% end %>
  36. <% columns_width = (40 / (@periods.length+1)).to_i %>
  37. <% @periods.each do |period| %>
  38. <th class="period" width="<%= columns_width %>%"><%= period %></th>
  39. <% end %>
  40. <th class="total" width="<%= columns_width %>%"><%= l(:label_total) %></th>
  41. </tr>
  42. </thead>
  43. <tbody>
  44. <%= render :partial => 'report_criteria', :locals => {:criterias => @criterias, :hours => @hours, :level => 0} %>
  45. <tr class="total">
  46. <td><%= l(:label_total) %></td>
  47. <%= '<td></td>' * (@criterias.size - 1) %>
  48. <% total = 0 -%>
  49. <% @periods.each do |period| -%>
  50. <% sum = sum_hours(select_hours(@hours, @columns, period.to_s)); total += sum -%>
  51. <td class="hours"><%= html_hours("%.2f" % sum) if sum > 0 %></td>
  52. <% end -%>
  53. <td class="hours"><%= html_hours("%.2f" % total) if total > 0 %></td>
  54. </tr>
  55. </tbody>
  56. </table>
  57. <p class="other-formats">
  58. <%= l(:label_export_to) %>
  59. <span><%= link_to 'CSV', params.merge({:format => 'csv'}), :class => 'csv' %></span>
  60. </p>
  61. <% end %>
  62. <% end %>
  63. <% html_title l(:label_spent_time), l(:label_report) %>