<% content_for :secondary do %>
<div class="ad_banners_setup">
	<h1><%= t('admin.setup_ad_banners') %></h1>
	<ul class="list">
		<li><%= link_to content_tag(:span, t('admin.new_ad_banner')), new_admin_ad_banner_path, :class => 'seclink1' %></li>
	</ul>
</div>
<% end -%>

<%= flash_messages %>
<div class="main2">
<h1><%= t('admin.list_ad_banners') %></h1>

<table>
<thead>
  <tr>
    <td><%= t('admin.title') %></td>
    <td><%= t('admin.picture_position') %></td>
    <td><%= t('admin.post_date') %></td>
    <td><%= t('admin.unpost_date') %></td>
    <td><%= t('admin.context') %></td>
    <td><%= t('admin.direct_to_after_click') %></td>
    <td><%= t('admin.now_display?') %></td>
  </tr>
</thead>
<% @ad_banners.each do |ad_banner| %>
  <tr class="have">
    <td><%= ad_banner.title %></td>
    <td><%= ad_banner.picture_position %></td>
    <td><%= ad_banner.post_date %></td>
    <td><%= ad_banner.unpost_date.nil?? t('form.date_unlimited'): ad_banner.unpost_date %></td>
    <td><%= ad_banner.context %></td>
    <td><%= ad_banner.direct_to_after_click %></td>
    <td><%= ad_banner.display?  %></td> 
   <td class="action">
			<%= link_to t(:show), admin_ad_banner_path(ad_banner), :class => 'show' %>
      <%= link_to t(:edit), edit_admin_ad_banner_path(ad_banner), :class => 'edit'  %>
      <%= link_to t(:delete), admin_ad_banner_path(ad_banner), :confirm => t('sure?'), :method => :delete, :class => 'delete' %>
    </td>
  </tr>
  <tr></tr>
<% end %>
</table>
</div>

<div class="button_bar">
	<%= link_to t('admin.new_ad_banner'), new_admin_ad_banner_path, :class => 'new' %>
</div>