rocket_cms 0.9.9 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/views/search/index.html.haml +19 -10
- data/lib/rocket_cms/controllers/search.rb +1 -1
- data/lib/rocket_cms/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 084068e3bef81441aef63cd55db82e08db6caccc
|
4
|
+
data.tar.gz: bfd789e2e3cee4cb2baeda11f25a859a5dec2079
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67db6dd2ab6654dffadf993bf957f2da85800482bd47b7c4214688d225b6402f668597a24a16a8a0df22aa0a8c5334caf950c487b7a2c6ed0b0731b98d7c9dbe
|
7
|
+
data.tar.gz: 5946c05c4a2c181fb1fc37ac5d1bfb049b51a89cef7713c34b33b9b82ff265926e49e69bc8e2c39f12a0decdc46b3fef4d47c423a6ce28b02c3f6eb3144760fa
|
data/Gemfile.lock
CHANGED
@@ -9,24 +9,33 @@
|
|
9
9
|
- any = true
|
10
10
|
%li
|
11
11
|
-if RocketCMS.mongoid?
|
12
|
-
|
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(
|
24
|
+
- u = app_url(r.searchable)
|
18
25
|
- next if u.nil?
|
19
|
-
- next if
|
26
|
+
- next if r.searchable.respond_to?(:enabled) && !r.searchable.enabled
|
20
27
|
- any = true
|
21
|
-
|
22
|
-
%
|
23
|
-
%strong= highlight(
|
24
|
-
|
25
|
-
|
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
|
-
|
35
|
+
= raw strip_tags(SmartExcerpt.h.smart_truncate(r.searchable.content, words: 20))
|
28
36
|
- else
|
29
|
-
|
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
|
|
data/lib/rocket_cms/version.rb
CHANGED