aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2014-02-16 19:08:29 +0100
committerHarald Eilertsen <haraldei@anduin.net>2014-02-16 19:08:29 +0100
commit93421980d48b968b825922063c2dab9e9ee8cb4c (patch)
tree55ae390e4f8b7fe14a947e42615bf4cb0ba6e8d7 /app
parent434d1d3042c2cc6399068beff1d72d4917ac9804 (diff)
downloadhmnoweb-93421980d48b968b825922063c2dab9e9ee8cb4c.tar.gz
hmnoweb-93421980d48b968b825922063c2dab9e9ee8cb4c.tar.bz2
hmnoweb-93421980d48b968b825922063c2dab9e9ee8cb4c.zip
Add refinery-banners engine.
Diffstat (limited to 'app')
-rw-r--r--app/decorators/controllers/refinery/pages_controller_decorator.rb3
-rw-r--r--app/views/refinery/banners/shared/_banner_image.html.erb1
-rw-r--r--app/views/refinery/pages/home.html.erb2
3 files changed, 6 insertions, 0 deletions
diff --git a/app/decorators/controllers/refinery/pages_controller_decorator.rb b/app/decorators/controllers/refinery/pages_controller_decorator.rb
index d93ae9d..2e972e9 100644
--- a/app/decorators/controllers/refinery/pages_controller_decorator.rb
+++ b/app/decorators/controllers/refinery/pages_controller_decorator.rb
@@ -19,6 +19,9 @@ ApplicationController.class_eval do
#
find_all_blog_categories
find_tags
+
+ # Load active banners
+ @banners = Refinery::Banners::Banner.active
end
def populate_home_page
diff --git a/app/views/refinery/banners/shared/_banner_image.html.erb b/app/views/refinery/banners/shared/_banner_image.html.erb
new file mode 100644
index 0000000..7d0dc25
--- /dev/null
+++ b/app/views/refinery/banners/shared/_banner_image.html.erb
@@ -0,0 +1 @@
+<%= link_to(image_fu(banner_image.image, '500x'), banner_image.url) %> \ No newline at end of file
diff --git a/app/views/refinery/pages/home.html.erb b/app/views/refinery/pages/home.html.erb
index 66cd6b7..6207663 100644
--- a/app/views/refinery/pages/home.html.erb
+++ b/app/views/refinery/pages/home.html.erb
@@ -1,4 +1,6 @@
<% content_for :body do %>
+ <%= render :partial => 'refinery/banners/shared/banners' %>
+
<%= raw @page.content_for(Refinery::Pages.default_parts.first.to_sym) if Refinery::Pages.default_parts.any? %>
<% if @posts.any? %>