diff options
| author | hukl <contact@smyck.org> | 2009-10-08 22:24:51 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-10-08 22:24:51 +0200 |
| commit | 2fd33c36428ae7684badc43dbe2142152f058b4e (patch) | |
| tree | c1025efc497973e268baa1b531120e726478d992 /app/helpers/content_helper.rb | |
| parent | 0db008d0bfb0803e5b000fcf08058e7d01f588eb (diff) | |
enabled shadowbox for headline images on public pages. if js is disabled the regular html version is rendered
Diffstat (limited to 'app/helpers/content_helper.rb')
| -rw-r--r-- | app/helpers/content_helper.rb | 11 |
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 |
