refinerycms-recommendations 0.0.1 → 0.0.2
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.
- data/app/views/refinery/recommendations/recommendations/_item.html.erb +12 -10
- data/app/views/refinery/recommendations/recommendations/show.html.erb +1 -1
- data/lib/generators/refinery/recommendations_generator.rb +4 -4
- metadata +2 -6
- data/lib/generators/refinery/templates/images/close_quote.gif +0 -0
- data/lib/generators/refinery/templates/images/open_quote.gif +0 -0
- data/lib/generators/refinery/templates/recommendations.css.scss +0 -44
- data/lib/generators/refinery/templates/recommendations.js +0 -0
@@ -1,18 +1,20 @@
|
|
1
1
|
<div class="recommendation">
|
2
2
|
<div class="left-media">
|
3
|
-
<% if recommendation.photo.present? %>
|
4
|
-
<%= image_fu recommendation.photo, '120x150#' %>
|
5
|
-
<% end %>
|
6
|
-
</div>
|
7
|
-
<div class="right-media">
|
8
3
|
<% if recommendation.youtube_id.present? %>
|
9
|
-
|
4
|
+
<iframe width="240" height="140" src="http://www.youtube.com/embed/<%= recommendation.youtube_id%>" frameborder="0" allowfullscreen></iframe>
|
5
|
+
<% elsif recommendation.photo.present? %>
|
6
|
+
<%= image_fu recommendation.photo, '120x150#' %>
|
10
7
|
<% end %>
|
11
8
|
</div>
|
12
|
-
<
|
13
|
-
|
14
|
-
|
15
|
-
|
9
|
+
<div class="main-quote">
|
10
|
+
<blockquote cite="http://stackoverflow.com">
|
11
|
+
<p><%= raw recommendation.description %></p>
|
12
|
+
</blockquote>
|
13
|
+
<p>
|
14
|
+
<cite><%= raw citation_line(recommendation) %></cite>
|
15
|
+
</p>
|
16
|
+
</div>
|
17
|
+
|
16
18
|
</div>
|
17
19
|
|
18
20
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<div class="recommendations">
|
3
3
|
<%= render 'item', :recommendation => @recommendation %>
|
4
4
|
<% @other_recommendations.each do |rec| %>
|
5
|
-
<%= render 'item', :recommendation => rec %>
|
5
|
+
<%= render 'item', :recommendation => rec unless (@recommendation.id == rec.id) %>
|
6
6
|
<% end %>
|
7
7
|
</div>
|
8
8
|
<% end %>
|
@@ -20,7 +20,7 @@ Refinery::Recommendations::Engine.load_seed
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def add_assets
|
23
|
-
insert_into_file "app/assets/javascripts/application.js", "//= require recommendations \n", :after => "jquery_ujs\n"
|
23
|
+
#insert_into_file "app/assets/javascripts/application.js", "//= require recommendations \n", :after => "jquery_ujs\n"
|
24
24
|
|
25
25
|
# Add our own require:
|
26
26
|
content = File.read("app/assets/stylesheets/application.css")
|
@@ -31,9 +31,9 @@ Refinery::Recommendations::Engine.load_seed
|
|
31
31
|
insert_into_file "app/assets/stylesheets/application.css", style_require_block, :after => "require_self\n"
|
32
32
|
end
|
33
33
|
|
34
|
-
copy_file "recommendations.js", "app/assets/javascripts/recommendations.js"
|
35
|
-
copy_file "recommendations.css.scss", "app/assets/stylesheets/recommendations.css.scss"
|
36
|
-
directory 'images', 'app/assets/images'
|
34
|
+
#copy_file "recommendations.js", "app/assets/javascripts/recommendations.js"
|
35
|
+
#copy_file "recommendations.css.scss", "app/assets/stylesheets/recommendations.css.scss"
|
36
|
+
#directory 'images', 'app/assets/images'
|
37
37
|
directory 'helpers', 'app/helpers'
|
38
38
|
end
|
39
39
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: refinerycms-recommendations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-06-
|
13
|
+
date: 2012-06-25 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: refinerycms-core
|
@@ -94,10 +94,6 @@ files:
|
|
94
94
|
- db/seeds.rb
|
95
95
|
- lib/generators/refinery/recommendations_generator.rb
|
96
96
|
- lib/generators/refinery/templates/helpers/recommendations_helper.rb
|
97
|
-
- lib/generators/refinery/templates/images/close_quote.gif
|
98
|
-
- lib/generators/refinery/templates/images/open_quote.gif
|
99
|
-
- lib/generators/refinery/templates/recommendations.css.scss
|
100
|
-
- lib/generators/refinery/templates/recommendations.js
|
101
97
|
- lib/refinery/recommendations/engine.rb
|
102
98
|
- lib/refinery/recommendations.rb
|
103
99
|
- lib/refinerycms-recommendations.rb
|
Binary file
|
Binary file
|
@@ -1,44 +0,0 @@
|
|
1
|
-
.recommendations {
|
2
|
-
border-bottom:1px dashed #ddd; margin:20px 0;
|
3
|
-
}
|
4
|
-
|
5
|
-
.recommendation {
|
6
|
-
border-top:1px dashed #ddd;
|
7
|
-
width: 100%;
|
8
|
-
min-height: 180px;
|
9
|
-
clear: both;
|
10
|
-
position: relative;
|
11
|
-
|
12
|
-
.left-media{
|
13
|
-
left: 0;
|
14
|
-
position: absolute;
|
15
|
-
top: 0;
|
16
|
-
width:200px;
|
17
|
-
height:100%;
|
18
|
-
padding:25px;
|
19
|
-
}
|
20
|
-
.right-media{
|
21
|
-
width:280px;
|
22
|
-
height:100%;
|
23
|
-
float: right;
|
24
|
-
padding:25px;
|
25
|
-
padding-top:30px;
|
26
|
-
}
|
27
|
-
}
|
28
|
-
|
29
|
-
cite {font-style:normal;}
|
30
|
-
blockquote p {
|
31
|
-
padding: 0 10px 0 240px;}
|
32
|
-
|
33
|
-
blockquote p:first-child {
|
34
|
-
background: transparent url(open_quote.gif) no-repeat scroll 0 0;
|
35
|
-
padding-top:36px;
|
36
|
-
margin-left:200px;
|
37
|
-
}
|
38
|
-
|
39
|
-
blockquote {
|
40
|
-
background: transparent url(close_quote.gif) no-repeat scroll right bottom;
|
41
|
-
margin:0 0 14px;
|
42
|
-
margin-right:320px;
|
43
|
-
}
|
44
|
-
|
File without changes
|