You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_list.html.erb 2.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <%= form_tag({}, :data => {:cm_url => time_entries_context_menu_path}) do -%>
  2. <%= hidden_field_tag 'back_url', url_for(:params => request.query_parameters), :id => nil %>
  3. <div class="autoscroll">
  4. <table class="list odd-even time-entries">
  5. <thead>
  6. <tr>
  7. <th class="checkbox hide-when-print">
  8. <%= check_box_tag 'check_all', '', false, :class => 'toggle-selection',
  9. :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}" %>
  10. </th>
  11. <% @query.inline_columns.each do |column| %>
  12. <%= column_header(@query, column) %>
  13. <% end %>
  14. <th></th>
  15. </tr>
  16. </thead>
  17. <tbody>
  18. <% grouped_query_results(entries, @query) do |entry, group_name, group_count, group_totals| -%>
  19. <% if group_name %>
  20. <% reset_cycle %>
  21. <tr class="group open">
  22. <td colspan="<%= @query.inline_columns.size + 2 %>">
  23. <span class="expander" onclick="toggleRowGroup(this);">&nbsp;</span>
  24. <span class="name"><%= group_name %></span>
  25. <% if group_count %>
  26. <span class="count"><%= group_count %></span>
  27. <% end %>
  28. <span class="totals"><%= group_totals %></span>
  29. <%= link_to_function("#{l(:button_collapse_all)}/#{l(:button_expand_all)}",
  30. "toggleAllRowGroups(this)", :class => 'toggle-all') %>
  31. </td>
  32. </tr>
  33. <% end %>
  34. <tr id="time-entry-<%= entry.id %>" class="time-entry <%= cycle("odd", "even") %> hascontextmenu">
  35. <td class="checkbox hide-when-print"><%= check_box_tag("ids[]", entry.id, false, :id => nil) %></td>
  36. <% @query.inline_columns.each do |column| %>
  37. <%= content_tag('td', column_content(column, entry), :class => column.css_classes) %>
  38. <% end %>
  39. <td class="buttons">
  40. <% if entry.editable_by?(User.current) -%>
  41. <%= link_to l(:button_edit), edit_time_entry_path(entry),
  42. :title => l(:button_edit),
  43. :class => 'icon-only icon-edit' %>
  44. <%= link_to l(:button_delete), time_entry_path(entry),
  45. :data => {:confirm => l(:text_are_you_sure)},
  46. :method => :delete,
  47. :title => l(:button_delete),
  48. :class => 'icon-only icon-del' %>
  49. <% end -%>
  50. <%= link_to_context_menu %>
  51. </td>
  52. </tr>
  53. <% @query.block_columns.each do |column|
  54. if (text = column_content(column, issue)) && text.present? -%>
  55. <tr class="<%= current_cycle %>">
  56. <td colspan="<%= @query.inline_columns.size + 1 %>" class="<%= column.css_classes %>">
  57. <% if query.block_columns.count > 1 %>
  58. <span><%= column.caption %></span>
  59. <% end %>
  60. <%= text %>
  61. </td>
  62. </tr>
  63. <% end -%>
  64. <% end -%>
  65. <% end -%>
  66. </tbody>
  67. </table>
  68. </div>
  69. <% end -%>
  70. <%= context_menu %>