spud_search 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,21 @@
|
|
1
|
+
<h3>Search Results</h3>
|
2
|
+
<div class="results">
|
3
|
+
<%if @results.blank?%>
|
4
|
+
<p>No Results Found.</p>
|
5
|
+
<%else%>
|
6
|
+
<%@results.each do |result|%>
|
7
|
+
<div class="result">
|
8
|
+
<%if result.class.name == 'SpudPost'%>
|
9
|
+
<h4><%=link_to result.title,blog_post_path(result.url_name)%></h4>
|
10
|
+
<p><%=truncate(result.content,:length => 200, :separator => ' ')%></p>
|
11
|
+
<%elsif result.class.name == 'SpudPage'%>
|
12
|
+
<h4><%=link_to result.name,page_path(:id => result.url_name)%></h4>
|
13
|
+
|
14
|
+
<p><%=truncate(result.meta_description,:length => 200, :separator => ' ')%></p>
|
15
|
+
|
16
|
+
<%end%>
|
17
|
+
</div>
|
18
|
+
<%end%>
|
19
|
+
<%=will_paginate @results%>
|
20
|
+
<%end%>
|
21
|
+
</div>
|
@@ -1,21 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
<%if result.class.name == 'SpudPost'%>
|
9
|
-
<h4><%=link_to result.title,blog_post_path(result.url_name)%></h4>
|
10
|
-
<p><%=truncate(result.content,:length => 200, :separator => ' ')%></p>
|
11
|
-
<%elsif result.class.name == 'SpudPage'%>
|
12
|
-
<h4><%=link_to result.name,page_path(:id => result.url_name)%></h4>
|
13
|
-
|
14
|
-
<p><%=truncate(result.meta_description,:length => 200, :separator => ' ')%></p>
|
15
|
-
|
16
|
-
<%end%>
|
17
|
-
</div>
|
18
|
-
<%end%>
|
19
|
-
<%=will_paginate @results%>
|
20
|
-
<%end%>
|
21
|
-
</div>
|
1
|
+
<%if Spud::Search.content_for.blank? == false%>
|
2
|
+
<%=content_for Spud::Search.content_for do%>
|
3
|
+
<%=render "index"%>
|
4
|
+
<%end%>
|
5
|
+
<%else%>
|
6
|
+
<%=render "index"%>
|
7
|
+
<%end%>
|
data/lib/spud_search/engine.rb
CHANGED
@@ -6,11 +6,7 @@ module Spud
|
|
6
6
|
module Search
|
7
7
|
class Engine < Rails::Engine
|
8
8
|
engine_name :spud_search
|
9
|
-
|
10
|
-
Spud::Core.configure do |config|
|
11
|
-
config.admin_applications += [{:name => "Search",:thumbnail => "spud/admin/template_thumb.png",:url => "/spud/admin/template_root",:order => 10}]
|
12
|
-
end
|
13
|
-
end
|
9
|
+
|
14
10
|
initializer :assets do |config|
|
15
11
|
Rails.application.config.assets.precompile += [
|
16
12
|
"spud/admin/search*"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spud_search
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-02-10 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: spud_core
|
16
|
-
requirement: &
|
16
|
+
requirement: &70315766139120 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.3.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70315766139120
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: acts_as_indexed
|
27
|
-
requirement: &
|
27
|
+
requirement: &70315766136960 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: 0.7.7
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70315766136960
|
36
36
|
description:
|
37
37
|
email: destes@redwindsw.com
|
38
38
|
executables: []
|
@@ -47,6 +47,7 @@ files:
|
|
47
47
|
- app/helpers/search_helper.rb
|
48
48
|
- app/helpers/spud/admin/users_helper.rb
|
49
49
|
- app/helpers/spud/user_sessions_helper.rb
|
50
|
+
- app/views/search/_index.html.erb
|
50
51
|
- app/views/search/index.html.erb
|
51
52
|
- config/application.rb
|
52
53
|
- config/boot.rb
|