diff --git a/app/views/search/index.html.erb b/app/views/search/index.html.erb old mode 100644 new mode 100755 index 53ec17a..2b86e8e --- a/app/views/search/index.html.erb +++ b/app/views/search/index.html.erb @@ -42,7 +42,7 @@

<%= l(:label_result_plural) %> (<%= @result_count %>)

<% @results.each do |e| %> -
+
<%= content_tag('span', e.project, :class => 'project') unless @project == e.project %> <%= link_to(highlight_tokens(e.event_title.truncate(255), @tokens), e.event_url) %>
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 42b1365..fb340a1 100755 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -422,7 +422,6 @@ div.journal ul.details a:hover, ul.revision-info a:hover {color:#D14848;} div#activity dl, #search-results { margin-left: 2em; } div#activity dd, #search-results dd { margin-bottom: 1em; padding-left: 18px; font-size: 0.9em; } -#search-results dt { margin-bottom: 0px; padding-left: 20px; line-height: 18px; background-position: 0 50%; background-repeat: no-repeat; } div#activity dt.me .time { border-bottom: 1px solid #999; } div#activity dt .time { color: #777; font-size: 80%; } div#activity dd .description, #search-results dd .description { font-style: italic; } @@ -438,8 +437,6 @@ div#search-results-counts {float:right;} div#search-results-counts ul { margin-top: 0.5em; } div#search-results-counts li { list-style-type:none; float: left; margin-left: 1em; } -#search-results dt.issue.closed { background-image: url(../images/ticket_checked.png); } - div#roadmap .related-issues { margin-bottom: 1em; } div#roadmap .related-issues td.checkbox { display: none; } div#roadmap .wiki h1:first-child { display: none; } diff --git a/test/functional/search_controller_test.rb b/test/functional/search_controller_test.rb old mode 100644 new mode 100755 index 54148a2..c6b0c49 --- a/test/functional/search_controller_test.rb +++ b/test/functional/search_controller_test.rb @@ -39,7 +39,7 @@ class SearchControllerTest < Redmine::ControllerTest def test_search_for_projects get :index, :params => {:q => "cook"} assert_response :success - assert_select '#search-results dt.project a', :text => /eCookbook/ + assert_select '#search-results dt.icon-project a', :text => /eCookbook/ end def test_search_on_archived_project_should_return_404 @@ -72,11 +72,11 @@ class SearchControllerTest < Redmine::ControllerTest assert_response :success assert_select '#search-results' do - assert_select 'dt.issue a', :text => /Feature request #2/ - assert_select 'dt.issue a', :text => /Bug #5/ - assert_select 'dt.changeset a', :text => /Revision 1/ + assert_select 'dt.icon-issue a', :text => /Feature request #2/ + assert_select 'dt.icon-issue a', :text => /Bug #5/ + assert_select 'dt.icon-changeset a', :text => /Revision 1/ - assert_select 'dt.issue a', :text => /Add ingredients categories/ + assert_select 'dt.icon-issue a', :text => /Add ingredients categories/ assert_select 'dd', :text => /should be classified by categories/ end @@ -93,8 +93,8 @@ class SearchControllerTest < Redmine::ControllerTest assert_select 'input[name=titles_only]:not([checked])' assert_select '#search-results' do - assert_select 'dt.issue a', :text => /Bug #5/ - assert_select 'dt.issue.closed a', :text => /Bug #8 \(Closed\)/ + assert_select 'dt.icon-issue a', :text => /Bug #5/ + assert_select 'dt.icon-issue-closed a', :text => /Bug #8 \(Closed\)/ end end @@ -105,7 +105,7 @@ class SearchControllerTest < Redmine::ControllerTest assert_response :success assert_select '#search-results' do - assert_select 'dt.issue a', :text => /Feature request #2/ + assert_select 'dt.icon-issue a', :text => /Feature request #2/ end end @@ -117,7 +117,7 @@ class SearchControllerTest < Redmine::ControllerTest assert_response :success assert_select '#search-results' do - assert_select 'dt.issue a', :text => /Feature request #2/ + assert_select 'dt.icon-issue a', :text => /Feature request #2/ assert_select 'dt', 1 end end @@ -130,7 +130,7 @@ class SearchControllerTest < Redmine::ControllerTest get :index, :params => {:q => 'searchkeyword', :issues => 1} assert_response :success assert_select '#search-results' do - assert_select 'dt.issue a', :text => /Feature request #2/ + assert_select 'dt.icon-issue a', :text => /Feature request #2/ end Role.find(1).remove_permission! :view_private_notes @@ -154,7 +154,7 @@ class SearchControllerTest < Redmine::ControllerTest assert_response :success assert_select '#search-results' do - assert_select 'dt.issue', :text => /Bug #1/ + assert_select 'dt.icon-issue', :text => /Bug #1/ assert_select 'dt', :text => /Bug #5/, :count => 0 end end @@ -174,8 +174,8 @@ class SearchControllerTest < Redmine::ControllerTest assert_response :success assert_select '#search-results' do - assert_select 'dt.issue', :text => /Bug #1/ - assert_select 'dt.issue', :text => /Bug #5/ + assert_select 'dt.icon-issue', :text => /Bug #1/ + assert_select 'dt.icon-issue', :text => /Bug #5/ end end @@ -194,7 +194,7 @@ class SearchControllerTest < Redmine::ControllerTest assert_response :success assert_select '#search-results' do - assert_select 'dt.issue', :text => /#7/ + assert_select 'dt.icon-issue', :text => /#7/ assert_select 'dt', 1 end end @@ -207,7 +207,7 @@ class SearchControllerTest < Redmine::ControllerTest assert_response :success assert_select '#search-results' do - assert_select 'dt.issue', :text => /##{issue.id}/ + assert_select 'dt.icon-issue', :text => /##{issue.id}/ assert_select 'dt', 1 end end @@ -220,7 +220,7 @@ class SearchControllerTest < Redmine::ControllerTest assert_response :success assert_select '#search-results' do - assert_select 'dt.issue', :text => / #1 / + assert_select 'dt.icon-issue', :text => / #1 / assert_select 'dt', 1 end end @@ -233,8 +233,8 @@ class SearchControllerTest < Redmine::ControllerTest assert_response :success assert_select '#search-results' do - assert_select 'dt.issue', :text => / #1 / - assert_select 'dt.issue', :text => / ##{issue.id} / + assert_select 'dt.icon-issue', :text => / #1 / + assert_select 'dt.icon-issue', :text => / ##{issue.id} / assert_select 'dt', 2 end end @@ -258,7 +258,7 @@ class SearchControllerTest < Redmine::ControllerTest assert_select 'input[name=all_words][checked=checked]' assert_select '#search-results' do - assert_select 'dt.issue', :text => / #3 / + assert_select 'dt.icon-issue', :text => / #3 / assert_select 'dt', 1 end end @@ -269,7 +269,7 @@ class SearchControllerTest < Redmine::ControllerTest assert_select 'input[name=all_words]:not([checked])' assert_select '#search-results' do - assert_select 'dt.issue', :text => / #3 / + assert_select 'dt.icon-issue', :text => / #3 / assert_select 'dt', 3 end end @@ -302,7 +302,7 @@ class SearchControllerTest < Redmine::ControllerTest assert_select 'input[name=titles_only]:not([checked])' assert_select '#search-results' do - assert_select 'dt.issue', :text => / #1 / + assert_select 'dt.icon-issue', :text => / #1 / assert_select 'dt', 1 end end @@ -313,19 +313,19 @@ class SearchControllerTest < Redmine::ControllerTest get :index, :params => {:q => 'search_with_limited_results'} assert_response :success issues[0..9].each do |issue| - assert_select '#search-results dt.issue', :text => / ##{issue.id} / + assert_select '#search-results dt.icon-issue', :text => / ##{issue.id} / end get :index, :params => {:q => 'search_with_limited_results', :page => 2} assert_response :success issues[10..19].each do |issue| - assert_select '#search-results dt.issue', :text => / ##{issue.id} / + assert_select '#search-results dt.icon-issue', :text => / ##{issue.id} / end get :index, :params => {:q => 'search_with_limited_results', :page => 3} assert_response :success issues[20..24].each do |issue| - assert_select '#search-results dt.issue', :text => / ##{issue.id} / + assert_select '#search-results dt.icon-issue', :text => / ##{issue.id} / end get :index, :params => {:q => 'search_with_limited_results', :page => 4} @@ -361,9 +361,9 @@ class SearchControllerTest < Redmine::ControllerTest get :index, :params => {:q => '"good bye" hello "bye bye"', :all_words => ''} assert_response :success assert_select '#search-results' do - assert_select 'dt.issue a', :text => / ##{issue1.id} / - assert_select 'dt.issue a', :text => / ##{issue2.id} / - assert_select 'dt.issue a', :text => / ##{issue3.id} /, :count => 0 + assert_select 'dt.icon-issue a', :text => / ##{issue1.id} / + assert_select 'dt.icon-issue a', :text => / ##{issue2.id} / + assert_select 'dt.icon-issue a', :text => / ##{issue3.id} /, :count => 0 end end @@ -372,7 +372,7 @@ class SearchControllerTest < Redmine::ControllerTest get :index, :params => {:q => 'escaped_once'} assert_response :success assert_select '#search-results' do - assert_select 'dt.issue a', :text => // + assert_select 'dt.icon-issue a', :text => // assert_select 'dd', :text => // end end @@ -382,7 +382,7 @@ class SearchControllerTest < Redmine::ControllerTest get :index, :params => {:q => 'highlighted'} assert_response :success assert_select '#search-results' do - assert_select 'dt.issue a span.highlight', :text => 'highlighted' + assert_select 'dt.icon-issue a span.highlight', :text => 'highlighted' assert_select 'dd span.highlight', :text => 'highlighted' end end