Skip to content
Browse files

Lightbox improvements?

  • Loading branch information...
1 parent 07d72fd commit 1af8cde6a0769785a2e36146e6eec1f8e1d24d84 @vanderhoorn vanderhoorn committed
View
2 app/views/admin/news_items/_news_items.html.erb
@@ -23,7 +23,7 @@
<% if (image_node = news_item.node.children.accessible.with_content_type('Image').first) -%>
<%=
link_to(
- image_tag(content_node_path(image_node, :action => :thumbnail), :alt => image_node.content.alt.to_s),
+ image_tag(content_node_path(image_node, :action => :thumbnail), :alt => image_node.content.alt.to_s, :title => image_node.content.description),
'#',
{
:rel => "lightbox[#{news_item.node.id}]", :title => 'Vergroot deze afbeelding',
View
2 app/views/admin/weblog_posts/_image.html.haml
@@ -1,2 +1,2 @@
.weblogPostImage{ :id => "weblog_post_image_#{image.id}" }
- = link_to(image_tag(content_node_path(image.node, :action => :thumbnail), :alt => image.alt.to_s), '#', { :rel => "lightbox[#{@weblog_post.node.id}]", :title => 'Vergroot deze afbeelding' })
+ = link_to(image_tag(content_node_path(image.node, :action => :thumbnail), :alt => image.alt.to_s, :title => image.description), '#', { :rel => "lightbox[#{@weblog_post.node.id}]", :title => 'Vergroot deze afbeelding' })
View
2 app/views/images/_content_box_content.html.haml
@@ -2,4 +2,4 @@
- if content.url.present?
= link_to(image_tag(sidebox_image_path(content, :format => :jpg), :alt => content.alt.to_s), h(content.url), :title => "#{h content.description}", :class => 'clearfix')
- else
- = link_to_node(image_tag(sidebox_image_path(content, :format => :jpg), :alt => content.alt.to_s), node, { :action => :full }, { :rel => "lightbox['sidebox']", :title => 'Vergroot deze afbeelding' })
+ = link_to_node(image_tag(sidebox_image_path(content, :format => :jpg), :alt => content.alt.to_s, :title => content.description), node, { :action => :full }, { :rel => "lightbox['sidebox']", :title => 'Vergroot deze afbeelding' })
View
2 app/views/news_items/_news_items.html.haml
@@ -20,7 +20,7 @@
.content.clearfix
- if (image_node = news_item.node.children.accessible.with_content_type('Image').first)
- = link_to_node(image_tag(content_node_path(image_node, :action => :thumbnail), :alt => image_node.content.alt.to_s), image_node, { :action => :full }, { :rel => "lightbox[#{news_item.node.id}]", :title => 'Vergroot deze afbeelding', :class => 'right' })
+ = link_to_node(image_tag(content_node_path(image_node, :action => :thumbnail), :alt => image_node.content.alt.to_s, :title => image_node.content.description), image_node, { :action => :full }, { :rel => "lightbox[#{news_item.node.id}]", :title => 'Vergroot deze afbeelding', :class => 'right' })
- if news_item.preamble.present?
= simple_format(h(news_item.preamble))
View
2 app/views/shared/_images_bar.html.haml
@@ -1,3 +1,3 @@
#images_bar
- images.each do |image|
- = link_to_node(image_tag(thumbnail_image_path(image, :format => :jpg), :alt => image.alt.to_s), image.node, { :action => :full, :format => :jpg}, { :rel => "lightbox[#{rel}]", :title => 'Vergroot deze afbeelding' })
+ = link_to_node(image_tag(thumbnail_image_path(image, :format => :jpg), :alt => image.alt.to_s, :title => image.description), image.node, { :action => :full, :format => :jpg}, { :rel => "lightbox[#{rel}]", :title => 'Vergroot deze afbeelding' })
View
2 app/views/weblog_posts/_image.html.erb
@@ -1,7 +1,7 @@
<div id='weblog_post_image_<%= image.id -%>' class='weblogPostImage'>
<%=
link_to_node(
- image_tag(content_node_path(image.node, :action => :thumbnail), :alt => image.alt.to_s),
+ image_tag(content_node_path(image.node, :action => :thumbnail), :alt => image.alt.to_s, :title => image.description),
image.node,
{ :action => :full },
{ :rel => "lightbox[#{@weblog_post.node.id}]", :title => 'Vergroot deze afbeelding' }

0 comments on commit 1af8cde

Please sign in to comment.
Something went wrong with that request. Please try again.