diff options
-rw-r--r-- | app/helpers/application_helper.rb | 4 | ||||
-rw-r--r-- | app/views/general/_frontpage_requests_list.html.erb | 2 | ||||
-rw-r--r-- | app/views/request/_request_listing_single.html.erb | 10 |
3 files changed, 8 insertions, 8 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 99322c65f..6d0a111e9 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -61,9 +61,9 @@ module ApplicationHelper end def highlight_and_excerpt(t, words, excount, html = true) - newt = excerpt(t, words[0], excount) + newt = excerpt(t, words[0], :radius => excount) if not newt - newt = excerpt(t, '', excount) + newt = excerpt(t, '', :radius => excount) end t = newt t = highlight_words(t, words, html) diff --git a/app/views/general/_frontpage_requests_list.html.erb b/app/views/general/_frontpage_requests_list.html.erb index fa498dfa7..a628c14ef 100644 --- a/app/views/general/_frontpage_requests_list.html.erb +++ b/app/views/general/_frontpage_requests_list.html.erb @@ -21,7 +21,7 @@ <%=link_to h(event.info_request.title), request_path(event.info_request)%> <%= _('{{length_of_time}} ago', :length_of_time => time_ago_in_words(event.described_at)) %> - <p class="excerpt" onclick="document.location.href='<%=request_path(event.info_request)%>'"><%= excerpt(event.search_text_main(true), "", 200) %></p> + <p class="excerpt" onclick="document.location.href='<%=request_path(event.info_request)%>'"><%= excerpt(event.search_text_main(true), "", :radius => 200) %></p> </li> <% end %> </ul> diff --git a/app/views/request/_request_listing_single.html.erb b/app/views/request/_request_listing_single.html.erb index 56737fd3e..50f889d75 100644 --- a/app/views/request/_request_listing_single.html.erb +++ b/app/views/request/_request_listing_single.html.erb @@ -1,9 +1,9 @@ <div class="request_listing"> - <span class="head"> - <%= link_to h(info_request.title), (@play_urls ? categorise_request_path(:url_title => info_request.url_title) : request_path(info_request)) %> - </span> - <span class="desc"> - <%= excerpt(info_request.initial_request_text, "", 150) %> + <span class="head"> + <%= link_to h(info_request.title), (@play_urls ? categorise_request_path(:url_title => info_request.url_title) : request_path(info_request)) %> + </span> + <span class="desc"> + <%= excerpt(info_request.initial_request_text, "", :radius => 150) %> </span> <span class="bottomline icon_<%= info_request.calculate_status %>"> <strong> |