<%= link_to(l(:button_back), { :action => 'index' }, :class => 'icon icon-cancel') %>
<%= link_to(l(:label_clear_hits), { :action => :clear, :id => @advertisement }, :class => 'icon icon-reload') if @advertisement.hits > 0 %>
<% form = form_tag({ :action => :update, :id => @advertisement }, :id => 'advertisement-form', :multipart => true) do %>
<%= render(:partial => 'form') %>
<%= submit_tag(l(:button_save)) %>
<% if defined? link_to_remote %>
<%= link_to_remote(l(:label_preview), { :url => { :controller => 'advertisements', :action => 'preview', :id => @advertisement },
:method => 'post',
:update => 'preview',
:with => "Form.serialize('advertisement-form')",
:complete => "Element.scrollTo('preview')"
}, :accesskey => accesskey(:preview)) %>
<% else %>
<%= preview_link({ :controller => 'advertisements', :action => 'preview', :id => @advertisement }, 'advertisement-form') %>
<% end %>
<%= render(:partial => 'keywords') %>
<%= render(:partial => 'projects') if @projects.any? %>
<% end %>
<%= form if Rails::VERSION::MAJOR >= 3 %>
<% content_for(:header_tags) do %>
<%= javascript_include_tag('advertisement', :plugin => 'reklama') %>
<% end %>
<% html_title(@advertisement.heading) %>