aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/refinery/banners/shared
diff options
context:
space:
mode:
authorJames Thompson <james.b.thompson@gmail.com>2012-03-14 11:40:16 +0200
committerJames Thompson <james.b.thompson@gmail.com>2012-03-14 11:40:16 +0200
commit56d7747f54e86993415b76c92e101608e5ea44e2 (patch)
tree025b7b37f50c4c291e7e676286e7767c40adb1f9 /app/views/refinery/banners/shared
downloadrefinerycms-pc_banners-56d7747f54e86993415b76c92e101608e5ea44e2.tar.gz
refinerycms-pc_banners-56d7747f54e86993415b76c92e101608e5ea44e2.tar.bz2
refinerycms-pc_banners-56d7747f54e86993415b76c92e101608e5ea44e2.zip
initial commit
Diffstat (limited to 'app/views/refinery/banners/shared')
-rw-r--r--app/views/refinery/banners/shared/_banner_image.html.erb1
-rw-r--r--app/views/refinery/banners/shared/_banners.html.erb9
2 files changed, 10 insertions, 0 deletions
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..74eebb4
--- /dev/null
+++ b/app/views/refinery/banners/shared/_banner_image.html.erb
@@ -0,0 +1 @@
+<%= image_fu(banner_image.image, '960x310#c') %> \ No newline at end of file
diff --git a/app/views/refinery/banners/shared/_banners.html.erb b/app/views/refinery/banners/shared/_banners.html.erb
new file mode 100644
index 0000000..d436cc7
--- /dev/null
+++ b/app/views/refinery/banners/shared/_banners.html.erb
@@ -0,0 +1,9 @@
+<div id="slider">
+ <% if @page.present? and @page.banners.published.present? %>
+ <%= render :partial => 'refinery/banners/shared/banner_image', :collection => @page.banners.published %>
+ <% elsif @banners.present? then %>
+ <%= render :partial => 'refinery/banners/shared/banner_image', :collection => @banners %>
+ <% else %>
+ <!--todo: insert static images here-->
+ <% end %>
+</div> \ No newline at end of file