<% if options[:dialog] %> <%= link_to_dialog( render_icon(options[:icon]), options[:url], options[:dialog_options], { class: 'icon_button', title: options[:title], 'data-alchemy-hotkey' => options[:hotkey] }.merge(options[:link_options]) ) %> <% else %> <%= link_to( options[:url], { class: "icon_button#{options[:loading_indicator] ? ' please_wait' : ''}", title: options[:title], 'data-alchemy-hotkey' => options[:hotkey] }.merge(options[:link_options]) ) do %> <%= render_icon(options[:icon]) %> <% end %> <% end %>