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.

index.html.erb 3.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <div class="contextual">
  2. <%= link_to l(:button_log_time),
  3. _new_time_entry_path(@project, @query.filtered_issue_id),
  4. :class => 'icon icon-time-add' if User.current.allowed_to?(:log_time, @project, :global => true) %>
  5. <%= actions_dropdown do %>
  6. <% if User.current.allowed_to?(:import_time_entries, @project, :global => true) %>
  7. <%= link_to l(:button_import), new_time_entries_import_path(:project_id => @project), :class => 'icon icon-import' %>
  8. <% end %>
  9. <%= link_to_if_authorized l(:label_settings),
  10. {:controller => 'projects', :action => 'settings', :id => @project, :tab => 'activities'},
  11. :class => 'icon icon-settings' if User.current.allowed_to?(:manage_project_activities, @project) %>
  12. <% end %>
  13. </div>
  14. <h2><%= @query.new_record? ? l(:label_spent_time) : @query.name %></h2>
  15. <%= form_tag(_time_entries_path(@project, nil), :method => :get, :id => 'query_form') do %>
  16. <%= render :partial => 'date_range' %>
  17. <% end %>
  18. <% if @query.valid? %>
  19. <% if @entries.empty? %>
  20. <p class="nodata"><%= l(:label_no_data) %></p>
  21. <% else %>
  22. <%= render_query_totals(@query) %>
  23. <%= render :partial => 'list', :locals => { :entries => @entries }%>
  24. <span class="pagination"><%= pagination_links_full @entry_pages, @entry_count %></span>
  25. <% other_formats_links do |f| %>
  26. <%= f.link_to_with_query_parameters 'Atom', :key => User.current.atom_key %>
  27. <%= f.link_to_with_query_parameters 'CSV', {}, :onclick => "showModal('csv-export-options', '330px'); return false;" %>
  28. <% end %>
  29. <div id="csv-export-options" style="display:none;">
  30. <h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3>
  31. <%= form_tag(_time_entries_path(@project, nil, :format => 'csv'), :method => :get, :id => 'csv-export-form') do %>
  32. <%= query_as_hidden_field_tags @query %>
  33. <%= hidden_field_tag('query_name', @query.name) %>
  34. <p>
  35. <label><%= radio_button_tag 'c[]', '', true %> <%= l(:description_selected_columns) %></label><br />
  36. <label><%= radio_button_tag 'c[]', 'all_inline' %> <%= l(:description_all_columns) %></label>
  37. </p>
  38. <% if @query.available_block_columns.any? %>
  39. <fieldset id="csv-export-block-columns">
  40. <legend>
  41. <%= toggle_checkboxes_link('#csv-export-block-columns input[type=checkbox]') %>
  42. </legend>
  43. <% @query.available_block_columns.each do |column| %>
  44. <label><%= check_box_tag 'c[]', column.name, @query.has_column?(:column), :id => nil %> <%= column.caption %></label>
  45. <% end %>
  46. </fieldset>
  47. <% end %>
  48. <%= export_csv_encoding_select_tag %>
  49. <%= export_csv_separator_select_tag %>
  50. <p class="buttons">
  51. <%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);", :data => { :disable_with => false } %>
  52. <%= link_to_function l(:button_cancel), "hideModal(this);" %>
  53. </p>
  54. <% end %>
  55. </div>
  56. <% end %>
  57. <% end %>
  58. <% content_for :sidebar do %>
  59. <%= render :partial => 'timelog/sidebar' %>
  60. <% end %>
  61. <% html_title(@query.new_record? ? l(:label_spent_time) : @query.name, l(:label_details)) %>
  62. <% content_for :header_tags do %>
  63. <%= auto_discovery_link_tag(:atom, {:issue_id => @issue, :format => 'atom', :key => User.current.atom_key}, :title => l(:label_spent_time)) %>
  64. <% end %>