Commit 10fd71d9b8869d5d600c841df0402787733ee4c4

Authored by Braulio Bhavamitra
1 parent 2383a17c

Article and product search excerpt changes

app/views/search/_article.rhtml
... ... @@ -3,7 +3,7 @@
3 3 <div class="article-item-meta">
4 4 <% if article.body %>
5 5 <% body_stripped = strip_tags(article.body.to_s) %>
6   - <br /><span class="article-item-body"><%= excerpt(body_stripped, body_stripped.first(3), 300) %></span><br />
  6 + <br /><span class="article-item-body"><%= excerpt(body_stripped, body_stripped.first(3), 200) %></span><br />
7 7 <% end %>
8 8  
9 9 <br /><span><%= _('Tags: ') + article.tags.join(', ') if !article.tags.empty? %></span>
... ...
app/views/search/_product.rhtml
... ... @@ -13,7 +13,8 @@
13 13 </div>
14 14 <div class="product-description">
15 15 <% if product.description %>
16   - <span class="product-item-topic"><%= _('DESCRIPTION') %> </span><%= product.description %>
  16 + <% desc_stripped = strip_tags(product.description) %>
  17 + <span class="product-item-topic"><%= _('DESCRIPTION') %> </span><%= excerpt(desc_stripped, desc_stripped.first(3), 100) %>
17 18 <% end %>
18 19 </div>
19 20 </div>
... ...