imagine_cms 3.0.14 → 3.0.15

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5 @@
1
+ <%- if @pages.blank? -%>
2
+ Sorry, no pages matched your search.
3
+ <%- else -%>
4
+ <%= render :partial => 'search_result', :collection => @pages %>
5
+ <%- end -%>
@@ -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>
@@ -1,3 +1,3 @@
1
1
  module ImagineCms
2
- VERSION = "3.0.14"
2
+ VERSION = "3.0.15"
3
3
  end
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.14
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