imagine_cms 3.0.14 → 3.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<%-
|
|
2
|
+
page = search_result
|
|
3
|
+
|
|
4
|
+
title = page.title
|
|
5
|
+
|
|
6
|
+
summary = 'error'
|
|
7
|
+
begin
|
|
8
|
+
summary = truncate(page.search_index, :length => 300)
|
|
9
|
+
summary = excerpt(page.search_index, @terms.first, 150) || truncate(page.search_index, :length => 300)
|
|
10
|
+
rescue Exception => e
|
|
11
|
+
logger.error "Error creating search index excerpt: #{e}"
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
@terms.each do |term|
|
|
15
|
+
title = highlight(title, term)
|
|
16
|
+
summary = highlight(summary, term)
|
|
17
|
+
end
|
|
18
|
+
-%>
|
|
19
|
+
|
|
20
|
+
<p>
|
|
21
|
+
<a href="/<%= page.path %>"><%= title %></a><br/>
|
|
22
|
+
<%= summary %>
|
|
23
|
+
</p>
|
data/lib/imagine_cms/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: imagine_cms
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.15
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -348,6 +348,8 @@ files:
|
|
|
348
348
|
- app/models/user.rb
|
|
349
349
|
- app/models/user_group.rb
|
|
350
350
|
- app/sweepers/cms_content_sweeper.rb
|
|
351
|
+
- app/views/cms/content/_search.html.erb
|
|
352
|
+
- app/views/cms/content/_search_result.html.erb
|
|
351
353
|
- app/views/cms/content/rss_feed.xml.builder
|
|
352
354
|
- app/views/imagine_cms/_dialogs.html.erb
|
|
353
355
|
- app/views/imagine_cms/_header.html.erb
|