%= title_tag t('lines.index.title') %> 
<%= search_form_for @q, :url => referential_lines_path(@referential), :html => {:method => :get} do |f| %>
  <%= f.label :name_or_number_cont, "#{t('.name_or_number')} :" %>
  <%= f.text_field :name_or_number_cont %>
  <%= f.hidden_field :company_id_eq %>
  <%= f.hidden_field :network_id_eq %>
  <%= f.hidden_field :group_of_lines_id_eq %>
  <%= f.submit t('actions.search') %> <%= t("or") %>
  <%= link_to t("cancel"), referential_lines_path(@referential) %>
<% end %>
<% if @q.network_id_eq.present? %>
  <%= Chouette::Line.human_attribute_name('network') %> : <%= @referential.networks.find(@q.network_id_eq).name %>
<% end %>
<% if @q.company_id_eq.present? %>
  <%= Chouette::Line.human_attribute_name('company') %> : <%= @referential.companies.find(@q.company_id_eq).name %>
<% end %>
<% if @q.group_of_lines_id_eq.present? %>
  <%= Chouette::Line.human_attribute_name('group_of_line') %> : <%= @referential.group_of_lines.find(@q.group_of_lines_id_eq).name %>
<% end %>
   <%= t("will_paginate.page_entries_info.search") %> <%= page_entries_info @lines %>
  <%= render :partial => "line", :collection => @lines %>
<% content_for :sidebar do %>
  - <%= link_to t('lines.actions.new'), new_referential_line_path(@referential), :class => "add" %>
  
  - <%= link_to t('lines.actions.import'), new_referential_import_path(@referential), :class => "import" %>
  
<%= t(".selection") %>
<%= Chouette::Company.model_name.human.pluralize %>
<% @referential.companies.each do |company| %>
- <%= link_with_search company.name, "company_id_eq" => company.id %>
 
<% end %>
- <%= link_with_search t(".selection_all"), {"company_id_eq" => nil}, :class => "all" %>
 
<%= Chouette::Network.model_name.human.pluralize %>
<% @referential.networks.each do |network| %>
- <%= link_with_search network.name, "network_id_eq" => network.id %>
 
<% end %>
- <%= link_with_search t(".selection_all"), {"network_id_eq" => nil}, :class => "all" %>
 
<% if  @referential.group_of_lines.count > 0 %>
	<%= Chouette::GroupOfLine.model_name.human.pluralize %>
	
	
	<% @referential.group_of_lines.each do |group_of_line| %>
	- <%= link_with_search group_of_line.name, "group_of_lines_id_eq" => group_of_line.id %>
 
	<% end %>
	- <%= link_with_search t(".selection_all"), {"group_of_lines_id_eq" => nil}, :class => "all" %>
 
	
<% end %>
<% end %>