summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/content_helper.rb11
1 files changed, 4 insertions, 7 deletions
diff --git a/app/helpers/content_helper.rb b/app/helpers/content_helper.rb
index c85fcf5..2eb0c4d 100644
--- a/app/helpers/content_helper.rb
+++ b/app/helpers/content_helper.rb
@@ -31,16 +31,13 @@ module ContentHelper
31 end 31 end
32 32
33 def headline_image 33 def headline_image
34 image = @page.assets.images.first 34 @images = @page.assets.images
35 if image 35
36 link_to_path( 36 unless @images.empty?
37 image_tag(image.upload.url(:headline)), 37 render :partial => 'content/headline_image'
38 ("galleries/" + @page.node.unique_name)
39 )
40 end 38 end
41 end 39 end
42 40
43
44 # Returns the published_at attribute of a page if it is not nil, otherwise 41 # Returns the published_at attribute of a page if it is not nil, otherwise
45 # it returns the auto-filled value of the created_at attribute 42 # it returns the auto-filled value of the created_at attribute
46 def date_for_page page 43 def date_for_page page