<% content_for :status_bar do %>

<%= t('listing_fonds') %>

<% end %>
<% if @fonds.total_entries > Fond.per_page || params[:q].present? %> <% # OPTIMIZE: questo forse potrebbe stare in helper, se ripetuto in tutti gli index %> <% form_tag('/fonds', :method => :get, :class => "skip-prompt form-search pull-right") do %> <%= text_field_tag :q, params[:q], :class => "search-query", :placeholder => "Denominazione" %> <%= submit_tag "Cerca", :name => "", :class => "btn btn-small" %> <% end %> <% end %> <% # OPTIMIZE: qui forse div contenitore toolbar o buttons ? %> <%= link_to t('new'), "#add_fond_modal", {:"data-toggle" => "modal", :class => "btn btn-small new"} %> <%= link_to ' ' + t('import_tree'), save_a_tree_fonds_path, { :class => "btn btn-small" } %> <%= render :partial => "new_fond" %>
<% if @fonds.size > 0 %> <%= display_page_entries_info @fonds %> <% @fonds.each do |fond| %> "> <% end %>
<%= sortable("name", t('name')) %> <%= sortable("updated_at", t('updated_at')) %>      
<%= link_to fond.name, treeview_fond_path(fond) %> <%= fond.preferred_event.try(:full_display_date) %> <% if fond.fond_type.present? %> (<%= fond.fond_type %>) <% end %> <%# FIXME: rivedere e impostare classe css astratta %>

<%= link_to "#{number_with_delimiter(@units_counts[fond.id] || "0")} unità", fond_units_path(fond) %>

<%= l fond.updated_at, :format => :long %> <%= link_to t('show'), fond %> <%= link_to_if(@fonds.size > 1, t('merge_with'), '#', {:class => 'merge', :"data-id" => fond.id}) %> <%= link_to_unless(@units_counts[fond.id], t('destroy'), fond, :confirm => t('are_you_sure'), :method => :delete) do |name| "#{name}" end %>
<%= will_paginate @fonds %> <% else %> <% if params[:q].present? %>

La ricerca di <%= params[:q] %> non ha prodotto risultati. Vedi <%= link_to "tutti i complessi archivistici", fonds_path %>

<% else %>

Non sono presenti schede complesso archivistico.

<% end %> <% end %> <%# TODO: i18n per tutte le pagine index, a navigazione definita. Simile a config/locales/views/shared.yml no_related_records_available. Valutare se usare una sola key YAML %>