summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2009-09-01 11:49:56 +0200
committerhukl <contact@smyck.org>2009-09-01 11:49:56 +0200
commit4aa4a0e4a44735d22ac7f8fd1b12b19699af087b (patch)
tree34c78c00617a504c7d713540fb349fd9af1d0e23 /app/helpers
parentc95126d6b6abd6302a07fbb17cd9ad0181e048c7 (diff)
added expirimental routing for image galeries
added plain image gallery template refinements
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/content_helper.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/helpers/content_helper.rb b/app/helpers/content_helper.rb
index 6309c8b..8b16462 100644
--- a/app/helpers/content_helper.rb
+++ b/app/helpers/content_helper.rb
@@ -16,6 +16,16 @@ module ContentHelper
16 ) 16 )
17 end 17 end
18 18
19 def headline_image
20 image = @page.assets.images.first
21 if image
22 link_to_path(
23 image_tag(image.upload.url(:headline)),
24 ("galleries/" + @page.node.unique_name)
25 )
26 end
27 end
28
19 29
20 # Returns the published_at attribute of a page if it is not nil, otherwise 30 # Returns the published_at attribute of a page if it is not nil, otherwise
21 # it returns the auto-filled value of the created_at attribute 31 # it returns the auto-filled value of the created_at attribute