Module: Gluttonberg::Public::Assets
- Included in:
- Gluttonberg::Public
- Defined in:
- app/helpers/gluttonberg/public/assets.rb
Instance Method Summary collapse
-
#gallery_ul(slug, gallery_thumb_image, gallery_large_image, html_opts_for_ul = {}, html_opts_for_li = {}, html_opts_for_a = {}) ⇒ Object
Generates a <ul> with list of the images.
Instance Method Details
#gallery_ul(slug, gallery_thumb_image, gallery_large_image, html_opts_for_ul = {}, html_opts_for_li = {}, html_opts_for_a = {}) ⇒ Object
Generates a <ul> with list of the images.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'app/helpers/gluttonberg/public/assets.rb', line 15 def gallery_ul(slug, gallery_thumb_image, gallery_large_image, html_opts_for_ul = {}, html_opts_for_li = {}, html_opts_for_a = {}) gallery = Gluttonberg::Gallery.where(:slug => slug).published.first unless gallery.blank? || gallery.gallery_images.blank? = render(:partial => "/gluttonberg/public/shared/gallery_images_lis", :locals => { :gallery => gallery, :gallery_thumb_image => gallery_thumb_image, :gallery_large_image => gallery_large_image, :html_opts_for_li => html_opts_for_li, :html_opts_for_a => html_opts_for_a }) html_opts_for_ul[:id] = "gallery_#{gallery.slug}" content_tag(:ul , .html_safe , html_opts_for_ul) end end |