<%= link_to(l(:label_advertisement_new), { :action => :new }, :class => 'icon icon-add') %> <%= link_to(l(:label_clear_hits), { :action => :clear }, :class => 'icon icon-reload') %>

<%= l(:label_advertisements) %> (<%= l(:label_total_hits, Advertisement.sum(:hits)) %>)

<% if @advertisements.empty? %>

<%= l(:label_no_data) %>

<% else %>
<%= sort_header_tag('preview', :caption => l(:label_preview), :title => l(:label_sort_by_heading)) %> <%= sort_header_tag('strict', :caption => l(:label_strict)) %> <%= sort_header_tag('language', :caption => l(:field_language)) %> <%= sort_header_tag('author', :caption => l(:field_author), :title => l(:label_sort_by_last_and_first_name)) %> <%= sort_header_tag('hits', :caption => l(:label_hits)) %> <%= sort_header_tag('enabled', :caption => l(:label_enabled)) %> <%= sort_header_tag('created_on', :caption => l(:field_created_on)) %> <%= sort_header_tag('updated_on', :caption => l(:field_updated_on)) %> <% @advertisements.each do |ad| %> <% lang = find_language(ad.language) %> <% end %>
<%= l(:label_keywords) %><%= l(:label_project_plural) %>
<%= ad.keywords.sort.join(', ') %> <%= checked_image(ad.strict?) %> <%= ll(lang.to_s, :general_lang_name) if lang %> <% if ad.projects.empty? %> <%= l(:label_none) %> <% elsif ad.projects.size == 1 && ad.projects.first == 0 %> <%= l(:label_all) %> <% else %> <%= l(:label_selected) %> <% end %> <%= link_to_user(ad.author) %> <%= ad.hits %> <%= checked_image(ad.enabled?) %> <%= format_time(ad.created_on) %> <%= format_time(ad.updated_on) %> <% if ad.enabled? %> <%= link_to(l(:button_disable), { :controller => 'advertisements', :action => 'disable', :id => ad }, :class => 'icon icon-lock') %> <% else %> <%= link_to(l(:button_enable), { :controller => 'advertisements', :action => 'enable', :id => ad }, :class => 'icon icon-unlock') %> <% end %> <%= link_to(l(:button_edit), { :controller => 'advertisements', :action => 'edit', :id => ad }, :class => 'icon icon-edit') %> <%= link_to(l(:button_delete), { :controller => 'advertisements', :action => 'destroy', :id => ad }, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del') %>

<%= pagination_links_full(@advertisement_pages, @advertisement_count) %>

<% end %> <% html_title(l(:label_advertisements)) %>