rocket_cms 0.9.9 → 0.10.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cc8d2b701c0e2440c7e2e48cc779b4dd8a9bf716
4
- data.tar.gz: 8e206fcf706c65f999a8c95b14d9299f16782718
3
+ metadata.gz: 084068e3bef81441aef63cd55db82e08db6caccc
4
+ data.tar.gz: bfd789e2e3cee4cb2baeda11f25a859a5dec2079
5
5
  SHA512:
6
- metadata.gz: 53e60aea291159f81bc393befff0a17fea3bb7a0c28f994e701b4aed5a46e2dec33898640e1bf508de9664b5a8c456818b481bfb63101610d24280c573246642
7
- data.tar.gz: fade693649c9aa2300f6b2a9f02023ffb1104a32e248544d276b52ecb6b885ccf0b27c1b98d83e5606b5dcaeda18c50ff13a0d3223c3a86fa65cc2e7f4519d30
6
+ metadata.gz: 67db6dd2ab6654dffadf993bf957f2da85800482bd47b7c4214688d225b6402f668597a24a16a8a0df22aa0a8c5334caf950c487b7a2c6ed0b0731b98d7c9dbe
7
+ data.tar.gz: 5946c05c4a2c181fb1fc37ac5d1bfb049b51a89cef7713c34b33b9b82ff265926e49e69bc8e2c39f12a0decdc46b3fef4d47c423a6ce28b02c3f6eb3144760fa
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rocket_cms (0.9.9)
4
+ rocket_cms (0.10.0)
5
5
  addressable
6
6
  coffee-rails
7
7
  devise
@@ -9,24 +9,33 @@
9
9
  - any = true
10
10
  %li
11
11
  -if RocketCMS.mongoid?
12
- .title= link_to (r._highlight.nil? || r._highlight['name'].nil?) ? r.name : r._highlight['name'].join(' ... ').html_safe, url_for(r)
12
+ - u = app_url(r)
13
+ - next if u.nil?
14
+ - next if u.respond_to?(:enabled) && !u.searchable.enabled
15
+ - any = true
16
+ .title
17
+ %a{href: u}
18
+ %strong= raw (r._highlight.nil? || r._highlight['name'].nil?) ? r.name : r._highlight['name'].join(' ... ')
19
+ (#{r.class.model_name.human})
13
20
  .text
14
21
  = raw (r._highlight.nil? || r._highlight['content'].nil?) ? (r.content.blank? ? '' : SmartExcerpt.truncate(r.content)) : r._highlight['content'].join(' ... ')
15
22
  %span.more= link_to '', url_for(r)
16
23
  - else
17
- - u = app_url(result.searchable)
24
+ - u = app_url(r.searchable)
18
25
  - next if u.nil?
19
- - next if result.searchable.respond_to?(:enabled) && !result.searchable.enabled
26
+ - next if r.searchable.respond_to?(:enabled) && !r.searchable.enabled
20
27
  - any = true
21
- %a{href: u}
22
- %span
23
- %strong= highlight(result.searchable.name, params[:query], highlighter: '<em>\1</em>')
24
- | (#{result.searchable.class.model_name.human})
25
- - ex = excerpt(strip_tags(result.searchable.content), params[:query], radius: 150)
28
+ .title
29
+ %a{href: u}
30
+ %strong= raw highlight(r.searchable.name, params[:query], highlighter: '<em>\1</em>')
31
+ (#{r.searchable.class.model_name.human})
32
+ .text
33
+ - ex = excerpt(strip_tags(r.searchable.content), params[:query], radius: 150)
26
34
  - if ex.nil?
27
- == strip_tags(SmartExcerpt.h.smart_truncate(result.searchable.content, words: 20))
35
+ = raw strip_tags(SmartExcerpt.h.smart_truncate(r.searchable.content, words: 20))
28
36
  - else
29
- == highlight(ex, params[:query], highlighter: '<em>\1</em>')
37
+ = raw highlight(ex, params[:query], highlighter: '<em>\1</em>')
38
+ %span.more= link_to '', u
30
39
  - unless any
31
40
  .rs-search-no-results К сожалению, ничего не найдено
32
41
 
@@ -25,7 +25,7 @@ module RocketCMS
25
25
  per_page: RocketCMS.config.search_per_page,
26
26
  )
27
27
  else
28
- @results = PgSearch.multisearch(params[:query])
28
+ @results = PgSearch.multisearch(params[:query]).page(params[:page])
29
29
  end
30
30
  end
31
31
  end
@@ -1,3 +1,3 @@
1
1
  module RocketCMS
2
- VERSION = "0.9.9"
2
+ VERSION = "0.10.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rocket_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.9
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - glebtv