]> source.dussan.org Git - redmine.git/commitdiff
Show no data message when searching only.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 13 May 2017 09:26:43 +0000 (09:26 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 13 May 2017 09:26:43 +0000 (09:26 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@16552 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/projects/autocomplete.js.erb

index de6c3f5791291918145cd035b48a1b0bdc2beb25..03f7fa640dfe96d3337169a1388acbc040ef6e31 100644 (file)
@@ -1,2 +1,9 @@
-<% s = @projects.any? ? render_projects_for_jump_box(@projects) : content_tag('span', l(:label_no_data)) %>
+<%
+  s = ''
+  if @projects.any?
+    s = render_projects_for_jump_box(@projects)
+  elsif params[:q].present?
+    s = content_tag('span', l(:label_no_data))
+  end
+%>
 $('#project-jump .drdn-items.projects').html('<%= escape_javascript s %>');