<%= "#{t('actions.listing')} #{t('pages')}" %>

<%= image_tag "spinner.gif", :plugin=>"spree", :style => "display:none", :id => 'busy_indicator' %>
<% hook :admin_pages_index_headers do %> <% end %> <% @collection.each do |page| %> <%- locals = {:page => page} -%> <% hook :admin_pages_index_rows, locals do %> <% end %> <% end %>
<%= order @search, :by => :title, :as => t("cms.title") %> <%= order @search, :by => :date, :as => t("cms.date") %> <%= hook :admin_pages_index_header_actions %>
<%= link_to h(page.title), [:edit,:admin,page] %> (<%= page.is_active == 1 ? t("cms.published") : t("cms.draft") %>) <%= (page.published_at.blank? ? page.updated_at : page.published_at).strftime("%B %d, %Y at %I:%M%p") %> <% hook :admin_pages_index_row_actions, locals do %> <%= link_to_edit page %>   <%= link_to_delete page %> <% end %>
<%= will_paginate(:previous_label => "« #{t('previous')}", :next_label => "#{t('next')} »") %> <% content_for :sidebar do %> <% form_for @search do |f| %>

<%= t(:search) %>

<%- locals = {:f => f} -%> <% hook :admin_pages_index_search, locals do %>


<%= f.text_field :title_contains, :size => 15 %>


<%= f.unobtrusive_date_text_picker :published_at_after %>
<%= f.unobtrusive_date_text_picker :published_at_before %>

<%= f.check_box :is_active, {:style => "vertical-align:middle;"}, "1", "" %>

<% end %> <% hook :admin_pages_index_search_buttons, locals do %>

<%= button t("search") %>

<% end %>
<% end %> <% end %>