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 2.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. </div>
  6. <h2><%= @query.new_record? ? l(:label_spent_time) : @query.name %></h2>
  7. <%= form_tag(_time_entries_path(@project, nil), :method => :get, :id => 'query_form') do %>
  8. <%= render :partial => 'date_range' %>
  9. <% end %>
  10. <% if @query.valid? %>
  11. <% if @entries.empty? %>
  12. <p class="nodata"><%= l(:label_no_data) %></p>
  13. <% else %>
  14. <%= render_query_totals(@query) %>
  15. <%= render :partial => 'list', :locals => { :entries => @entries }%>
  16. <span class="pagination"><%= pagination_links_full @entry_pages, @entry_count %></span>
  17. <% other_formats_links do |f| %>
  18. <%= f.link_to_with_query_parameters 'Atom', :key => User.current.rss_key %>
  19. <%= f.link_to_with_query_parameters 'CSV', {}, :onclick => "showModal('csv-export-options', '330px'); return false;" %>
  20. <% end %>
  21. <div id="csv-export-options" style="display:none;">
  22. <h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3>
  23. <%= form_tag(_time_entries_path(@project, nil, :format => 'csv'), :method => :get, :id => 'csv-export-form') do %>
  24. <%= query_as_hidden_field_tags @query %>
  25. <p>
  26. <label><%= radio_button_tag 'c[]', '', true %> <%= l(:description_selected_columns) %></label><br />
  27. <label><%= radio_button_tag 'c[]', 'all_inline' %> <%= l(:description_all_columns) %></label>
  28. </p>
  29. <%= export_csv_encoding_select_tag %>
  30. <p class="buttons">
  31. <%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);", :data => { :disable_with => false } %>
  32. <%= link_to_function l(:button_cancel), "hideModal(this);" %>
  33. </p>
  34. <% end %>
  35. </div>
  36. <% end %>
  37. <% end %>
  38. <% content_for :sidebar do %>
  39. <%= render_sidebar_queries(TimeEntryQuery, @project) %>
  40. <% end %>
  41. <% html_title(@query.new_record? ? l(:label_spent_time) : @query.name, l(:label_details)) %>
  42. <% content_for :header_tags do %>
  43. <%= auto_discovery_link_tag(:atom, {:issue_id => @issue, :format => 'atom', :key => User.current.rss_key}, :title => l(:label_spent_time)) %>
  44. <% end %>