<%= render :partial => 'date_range' %>
<% end %>
+<% if @query.valid? %>
<% if @entries.empty? %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% else %>
<% end %>
</div>
<% end %>
+<% end %>
<% content_for :sidebar do %>
<%= render_sidebar_queries(TimeEntryQuery, @project) %>
<%= link_to l(:button_clear), {:params => request.query_parameters.merge(:criteria => nil)}, :class => 'icon icon-reload' %></p>
<% end %>
+<% if @query.valid? %>
<% unless @report.criteria.empty? %>
<% if @report.hours.empty? %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>
<% end %>
<% end %>
+<% end %>
<% content_for :sidebar do %>
<%= render_sidebar_queries(TimeEntryQuery, @project) %>
assert_equal 3, values.size
end
+ def test_index_with_invalid_date_filter_should_not_validate
+ @request.session[:user_id] = 2
+
+ get :index, :params => {:set_filter => '1', :f => ['spent_on'], :op => {'spent_on' => '='}, :v => {'spent_on' => ['2016-09-010']}}
+ assert_select_error 'Date is invalid'
+ assert_select 'table.time-entries', 0
+ end
+
def test_index_with_query
query = TimeEntryQuery.new(:project_id => 1, :name => 'Time Entry Query', :visibility => 2)
query.save!