<% buildings = Building.where(house_id: @house.id).order('descrizione') %>
<%= view_table_open %>
<%= view_table_head_open %>
<%= view_table_row_open %>
<%= view_table_head_cell ('Descrizione') %>
<%= view_table_head_cell ('Nucleo') %>
<%= view_table_head_cell ('Edificio principale') %>
<%= view_table_head_cell ('Affitto Istat') %>
<%= view_table_head_cell ('Affitto Rettifica') %>
<%= view_table_head_cell ('Indirizzo') %>
<%= view_table_head_cell ('Comune') %>
<%= view_table_head_cell ('Codice radio') %>
<%= view_table_head_cell ('Telefono') %>
<%= view_table_head_cell ('Coordinate') %>
<%= view_table_row_close %>
<%= view_table_head_close %>
<%= view_table_body_open %>
<% buildings.each do |building| %>
<%= view_table_row_open %>
<%= view_table_cell ( link_to(building.descrizione, building_path(building))) %>
<%= view_table_cell ( link_to(building.house.descrizione, house_path(building.house))) %>
<%= view_table_cell ( check_box_tag :main_building, :main_building, building.main_building, disabled: true) %>
<%= view_table_cell ( building.affitto_istat) %>
<%= view_table_cell ( building.affitto_rettifica) %>
<%= view_table_cell ( building.indirizzo) %>
<%= view_table_cell ( building.comune) %>
<%= view_table_cell ( building.codice_radio) %>
<%= view_table_cell ( building.telefono) %>
<%= view_table_cell ( building.coordinate) %>
<%= view_table_row_close %>
<% end %>
<%= view_table_body_close %>
<%= view_table_close %>
<%= icon('chevron-up') %> Torna all'inizio della pagina