<%= _('Highlights') %>
<% for image in @block.images do %> <% end %>
<%= _('Image') %><%= _('Address') %><%= _('Position') %><%= _('Title') %>
<%= select_tag 'block[images][][image_id]', content_tag(:option) + option_groups_from_collection_for_select(@block.folder_choices, :images, :name, :id, :name, image[:image_id].to_i), :style => "width: 100px" %>

<%= text_field_tag 'block[images][][address]', image[:address], :class => 'highlight-address', :size => 10 %> <%= text_field_tag 'block[images][][position]', image[:position], :class => 'highlight-position', :size => 3 %> <%= text_field_tag 'block[images][][title]', image[:title], :class => 'highlight-title', :size => 10 %>
<%= link_to_function(_('New highlight'), nil, :class => 'button icon-add with-text') do |page| page.insert_html :bottom, 'highlights', content_tag('tr', content_tag('td', select_tag('block[images][][image_id]', content_tag(:option) + option_groups_from_collection_for_select(@block.folder_choices, :images, :name, :id, :name), :style => "width: 100px")) + content_tag('td', text_field_tag('block[images][][address]', nil, :class => 'highlight-address', :size => 10)) + content_tag('td', text_field_tag('block[images][][position]', nil, :class => 'highlight-position', :size => 3)) + content_tag('td', text_field_tag('block[images][][title]', nil, :class => 'highlight-position', :size => 10)) ) + javascript_tag("$('edit-link-list-block').scrollTop = $('edit-link-list-block').scrollHeight") end %> <%= labelled_form_field _('Image transition:'), select('block', 'interval', [[_('No automatic transition'), 0]] + [1, 2, 3, 4, 5, 10, 20, 30, 60].map {|item| [n_('Every 1 second', 'Every %d seconds', item) % item, item]}) %> <%= labelled_form_field check_box(:block, :shuffle) + _('Show images in random order'), '' %> <%= labelled_form_field check_box(:block, :navigation) + _('Display navigation buttons'), '' %>