<%= view_table_head_open %> <%= view_table_row_open %> <%= view_table_head_cell_span 2 %> <%= view_table_head_cell (Commitment.human_attribute_name(:enabled)) %> <%= view_table_head_cell (Commitment.human_attribute_name(:datestart)) %> <%= view_table_head_cell (Commitment.human_attribute_name(:dateend)) %> <%= view_table_head_cell (Commitment.human_attribute_name(:person_id)) %> <%= view_table_head_cell (Commitment.human_attribute_name(:house_id)) %> <%= view_table_head_cell (Commitment.human_attribute_name(:region_id)) %> <%= view_table_head_cell (Commitment.human_attribute_name(:amount)) %> <%= view_table_head_cell (Commitment.human_attribute_name(:name)) %> <%= view_table_head_cell (Commitment.human_attribute_name(:notes)) %> <%= view_table_head_cell (Commitment.human_attribute_name(:srg_pn_costcenter_id)) %> <%= view_table_head_cell (Commitment.human_attribute_name(:srg_crb_id)) %> <%= view_table_head_cell (Commitment.human_attribute_name(:srg_service_id)) %> <%= view_table_row_close %> <%= view_table_head_close %> <%= view_table_body_open %> <% commitments.each do |commitment| %> <%= view_table_row_open %> <%= view_table_cell ( iconbutton_view commitment, nil) %> <%= view_table_cell ( iconbutton_edit edit_commitment_path(commitment), nil) %> <%#= view_table_cell ( iconbutton_delete commitment, nil) %> <%= view_table_cell ( check_box_tag :enabled, :enabled, commitment.enabled, disabled: true) %> <%= view_table_cell ( commitment.datestart ? commitment.datestart.to_dmy : nil) %> <%= view_table_cell ( commitment.dateend ? commitment.dateend.to_dmy : nil) %> <%= view_table_cell ( commitment.person_id ? link_to( commitment.person.dh_person_name, person_path(commitment.person_id) ) : nil) %> <%= view_table_cell ( commitment.house_id ? link_to( commitment.house.format_for_formselect, house_path(commitment.house_id) ) : nil) %> <%= view_table_cell ( commitment.region_id ? link_to( commitment.region.descrizione, region_path(commitment.region_id) ) : nil) %> <%= view_table_cell_right ( money_format_zero(commitment.amount) ) %> <%= view_table_cell ( commitment.name) %> <%= view_table_cell ( commitment.notes) %> <%= view_table_cell ( commitment.srg_pn_costcenter_id.present? ? link_to( notetext(commitment.srg_pn_costcenter.format_for_formselect), srg_pn_costcenters_path(commitment.srg_pn_costcenter_id) ) : nil ) %> <%= view_table_cell ( commitment.srg_crb_id.present? ? link_to( notetext(commitment.srg_crb.format_for_formselect), srg_crbs_path(commitment.srg_crb_id) ) : nil ) %> <%= view_table_cell ( commitment.srg_service_id.present? ? link_to( notetext(commitment.srg_service.format_for_formselect), srg_services_path(commitment.srg_service_id) ) : nil ) %> <%= view_table_row_close %> <% end %> <%= view_table_body_close %>